Nintendo 64 MIDI sequence routines
Syntax
#include <libaudio.h> /* libaudio.h */ void alSeqNew(ALSeq *seq, u8 *ptr, s32 len); void alSeqNextEvent(ALSeq *seq, ALEvent *event); void alSeqNewMarker(ALSeq *seq, ALSeqMarker *m, u32 ticks); f32 alSeqTicksToSec(ALSeq *seq, s32 ticks, u32 tempo); u32 alSeqSecToTicks(ALSeq *seq, f32 sec, u32 tempo);
Description
The Nintendo 64 Audio Library supports the playback of musical sequences that conform to the Standard MIDI Files 1.0 specification for Type 0 MIDI files. The Type 0 MIDI file format contains a time-ordered MIDI event list that describes music and is described in detail in the "Standard MIDI Files 1.0" specification published by the MIDI manufacturers association.
To use a MIDI sequence in your game, you must first call the alSeqNew function to initialize a runtime ALSeq structure to represent the MIDI sequence.
After initializing the sequence structure, you can perform sequence operations.
The alSeqNextEvent call returns the next MIDI event from the sequencer's current location. Usually, you will not call alSeqNextEvent directly because it is used by the Sequence Player in sequence playback.
The alSeqNewMarker call creates a sequence position marker that can be used in conjunction with the Sequence Player to set playback time and loop points.
The two functions alSeqTicksToSec and alSeqSecToTicks are convenient to use to convert between time formats. The "ticks" format is in units of time relative to the MIDI clock at the resolution specified in the MIDI sequence header.
See Also
alSeqNew, alSeqNextEvent, alCSeqNewMarker, alSeqTicksToSec, and alSeqSecToTicks
1999/04/30 Changed Format