MT(MixerChannelIndex) -- MIDI Trigger -- automatic

MIDI Trigger provides a number of slots corresponding to keys on a MIDI keyboard. Each slot can hold a BP. When receiving a MIDI note on, the slot toggles between three states:

Stopped: idle (grey background in the GUI)

Ready: waiting to confirm the play/stop action (blue background)

Playing: process is running (green background)

The "ready" state is protection against accidental key triggers. To play or stop a process, you have to hit the MIDI key twice. If you hit the wrong key, you can simply omit the second keystroke. After a few seconds, ready state will end and the slot will go back to its previous state.

Assign a process to a slot either programmatically, or dragging it into the GUI. Processes displayed in the GUI may be triggered by clicking on the slot. In this case, there is no ready state.

MT(1).gui // note, here you don't need .v

BP(\someProcess) => MT(1) // assign to first unused midi note

BP(\otherProcess) =>.72 MT(1) // assign to midi note 72

You may also chuck a BP factory into an MT.

Fact(\someProcess) => MT(1);

This is the same as executing the following, to make the BP and subsequently put it in the GUI.

Fact(\someProcess) => BP(\someProcess) => MT(1);

Note: When using SwingOSC for GUI representation, simply clicking on a slot in the GUI is not sufficient to trigger the action. This is because Swing handles drag actions slightly differently. In Cocoa dragging begins as soon as you click the mouse. In Swing, you must move the mouse before dragging commences. To trigger a process with Swing, you must drag a very short distance.

Why is dragging involved? Because you should be able to drag into any MT slot, and also drag a BP from its slot in the GUI to other GUI objects such as MixerChannel GUI or Voicer GUI, so a simple SCButton is not sufficient.