MidiOutStream

HC Sound programming Midi MidiOutStream
MidiAllSoundsOff MidiOutStreamsStart

MidiOutStream channel tonelist
(MidiOutStream channel pitchs durations velocities)


command to start a new thread which will play the Midi tones in tonelist or in the lists pitchs, durations and velocities.

The created threads must be activated using the command MidiOutStreamsStart.

tonelist is a list of triples of numbers: [pitch1 duration1 velocity1 pitch2 duration2 velocity2 ...]

channel must be an integer in the range 0..15.

pitch must be an number in the range 0..127.

velocity must be an integer in the range 0..127.

duration must be a number and is measured in milliseconds.

Example:

MidiOpen 0
MidiOutStream 0 [60 1000 127  62 1000 127  64 1000 127  65 1000 127]
MidiOutStream 1 [64 1000 127  65 1000 127  67 1000 127]
MidiOutStream 2 [67 1000 127  69 1000 127]
MidiOutStreamsStart
MidiClose

Example:

References:

MidiAllSoundsOff MidiOutStreamsStart