alSeq.3p
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.TH alSeq 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
alSeq \- Ultra 64 MIDI sequence routines
.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
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);
.Op
\f1
.fi
.SH DESCRIPTION
The Ultra 64 Audio Library supports 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.
.PP
To use a MIDI sequence in your game, you must first initialize a
runtime ALSeq structure to represent it. This is accomplished with
alSeqNew.
.PP
After initializing the sequence structure, you can perform sequence
operations.
.PP
The alSeqNextEvent call returns the next MIDI event from the sequencer's
current location. Normally, you won't call alSeqNextEvent directly, as
it is used by the Sequence Player in sequence playback.
.PP
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.
.PP
The convenience functions alSeqTicksToSec and alSeqSecToTicks 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.
.SH SEE ALSO
.IR alSeqNew (3P),
.IR alSeqNextEvent (3P),
.IR alSeqNewMarker (3P),
.IR alSeqTicksToSec (3P),
.IR alSeqSecToTicks (3P)