alCSPSendMidi

alCSPSendMidi, n_alCSPSendMidi

Sends the given MIDI message to the compressed sequence player

Syntax

#include <libaudio.h>
void alCSPSendMidi(   ALCSPPlayer *seqp, long ticks, 
                u8 status, u8 byte1, u8 byte2);
#include <n_libaudio.h>
void n_alCSPSendMidi(N_ALCSPlayer *seqp,  s32 ticks, 
		u8 status, u8 byte1, u8 byte2);

Arguments

seqp
Pointer to compressed MIDI sequence player

ticks
Time offset in MIDI clock ticks that specifies when the MIDI event is to occur

status
Message's MIDI status byte

byte1
The first byte in the message

byte2
The second byte in the message (optional)

Description

alCSPSendMidi sends a MIDI message to the compressed MIDI sequence player. This function is used as trigger notes that are not in the sequence. For example, it changes the controller in real time, and changes the execution of the sequence. You can use the alCSPSendMidi function as an alternative to the alCSPSetChlProgram, alCSPSetChlVol, alCSPSetChlPan, and alCSPSetChlFXMix functions.

Note that only channel voice messages are supported. See the MIDI 1.0 specification or any of the various World Wide Web MIDI pages for more information.

ticks containes the time offset (in MIDI clock ticks) that specifies when an event is to occur. The status byte contains the message type in the high bytes and the channel number in the low bytes. The next bytes are the MIDI data, which is determined by the message type.

For details on n_audio library, see "Chapter 28: n_audio library" in the N64 Programming Manual.

See Also

alCSeqPlayer