Midi Play
midi_playPlays a project's notes to a MIDI output in real time so you can audition parts on hardware synths or DAWs, with optional bars, tracks, channel, clock sync, and duration limits.
Instructions
Play the song's notes to a MIDI output in real time, from here, with no live set: to hear a part on a hardware synth, or through a loopMIDI / IAC port on an instrument in Ableton or FL Studio, or to check a port and a channel before a set. Blocks until the last note ends (Ctrl+C stops it; every note gets its note-off). port: an output's name or a unique part of it (midi_ports). tracks: names (default every unmuted track with notes); bars: [a, b] plays those bars, bar a first (default the whole song). Channels as midi_write: kits on 10, other tracks 1 to 16 in order; channel=<1-16> puts every track on that one (one synth). Notes land where they sound, nudges included, at the project's tempo. clock=True also sends MIDI clock (24 per beat, one beat of pulses before Start, Stop at the end) so a drum machine or a DAW on external sync plays along. max_s: refuses a longer span (choose bars). The reply says how late the messages went out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | ||
| port | Yes | ||
| clock | No | ||
| max_s | No | ||
| tracks | No | ||
| channel | No | ||
| project | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |