MIDI::MMC
This is a Ruby gem to facilitate controlling MIDI devices using the MIDI Machine Control protocol.
Features
- Implements the common MMC commands, including transport (stop, play, record, etc.) and track arming.
Limitations
- Does not handle any command responses, whether status (like timecode) or errors.
- Does not implement full MMC specification.
Usage
require 'midi-mmc'
require 'unimidi'
# set up
midi_output = UniMIDI::Output.gets
mmc = MIDI::MMC.new(output: midi_output)
mmc.reset
# record
mmc.goto_zero
mmc.arm_tracks(1)
# record something here
mmc.stop
mmc.arm_tracks(nil)
# play back
mmc.goto_zero
mmc.play
Requirements
MIDI::MMC is designed to work with the unimidi gem, although any object passed in the output
parameter to MIDI::MMC.new
that responds to the #puts
method can be used.