N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

alSeq

Format
#include <libaudio.h>
void alSeqNew(ALSeq *seq, u8 *ptr, s32 len);
void alSeqNextEvent(ALSeq *seq, ALEvent *event);
void alSeqNewMarker(ALSeq *seq, ALSeqMarker *m, u32 ticks);
f32alSeqTicksToSec(ALSeq *seq, s32 ticks, u32 tempo);
u32alSeqSecToTicks(ALSeq *seq, f32 sec, u32 tempo);

What This Function Does
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 won't 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
alSeqNewMarker
alSeqTicksToSec
alSeqSecToTicks



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated January 1998