PLAYMIDI$

Top  Previous  Next

Syntax

POINTER = PLAYMIDI$(strMidi as STRING,OPT bAsync as INT)

Description

Plays a stream of MIDI notes on the default MIDI device.

Parameters

strMidi - Music string containing notes to play.

bAsync - Optional. Specifies asynchronous playback if TRUE.

Return value

None if played synchronously or a pointer to the stream thread being played if asynchronous.

Remarks

Synchronous playback will wait until the entire stream is done playing. Asynchronous playback will return immediately and play the notes in the background using a separate execution thread. Windows only allows one stream to open a device at a time. If a stream is already playing then attempting to start a second stream will fail.

See Also: STOPMIDI$, Music and Sound commands for the format of the input string.

Example usage

PLAYMIDI$ "T180 N0 I0 O5 C8C#DD#EFF#GG#AA#B O6 CC#DD#EFF#GG#AA#B O7 C1"