1 #ifndef LIBRARIES_XMODULECLASS_H
2 #define LIBRARIES_XMODULECLASS_H
6 ** Copyright (C) 1993,94,95,96,97 Bernardo Innocenti
8 ** Use 4 chars wide TABs to read this file
10 ** IFF XMOD file format definition.
14 #ifndef IFF_IFFPARSE_H
15 #include <libraries/iffparse.h>
16 #endif /* !IFF_IFFPARSE_H */
18 #ifndef DATATYPES_SOUNDCLASS_H
19 #include <datatypes/soundclass.h>
20 #endif /* !DATATYPES_SOUNDCLASS_H */
23 #define ID_AUTH MAKE_ID('A','U','T','H')
24 #define ID_ANNO MAKE_ID('A','N','N','O')
26 #define ID_XMOD MAKE_ID('X','M','O','D')
28 /* The following chunk ID definition conflicts with <libraries/maud.h> */
30 #define ID_MHDR MAKE_ID('M','H','D','R')
33 #define ID_SONG MAKE_ID('S','O','N','G')
34 #define ID_SHDR MAKE_ID('S','H','D','R')
35 #define ID_SEQN MAKE_ID('S','E','Q','N')
37 #define ID_PATT MAKE_ID('P','A','T','T')
38 #define ID_PHDR MAKE_ID('P','H','D','R')
40 #define ID_INST MAKE_ID('I','N','S','T')
45 UWORD XModuleVersion; /* XModule version used to save this file */
46 UWORD XModuleRevision; /* XModule revision used to save this file */
47 UWORD NumSongs; /* Number of songs in this module */
58 UWORD MaxTracks; /* Number of tracks in song */
59 UWORD Length; /* Number of positions in song */
60 UWORD NumPatterns; /* Number of patterns in song */
61 UWORD LastInstrument; /* Last used instrument */
62 UWORD GlobalSpeed; /* Global song speed */
63 UWORD GlobalTempo; /* Global song tempo */
64 UWORD RestartPos; /* Position to restart from */
71 /* New fields added in XModule version 3.5 -
72 * not present in modules saved by version 3.4 and below
74 UWORD DefNumTracks; /* Default number of tracks in new patterns */
75 UWORD DefPattLen; /* Default number of lines in new patterns */
76 ULONG TotalChanges; /* Total number of changes made so far */
77 ULONG CreationDate; /* Date of OM_NEW */
78 ULONG LastChanged; /* Date of last saving */
85 UWORD Tracks; /* Number of tracks in pattern */
86 UWORD Lines; /* Number of lines in pattern */
91 #ifndef LIBRARIES_SONGCLASS_H
95 UBYTE Note; /* See below for more info */
96 UBYTE Inst; /* Instrument number */
97 UBYTE Vol; /* Volume for this note */
98 UBYTE Pad; /* Unused */
99 UBYTE EffNum; /* See definitions below. */
100 UBYTE EffVal; /* Effect value ($00-$FF) */
114 /* Values for Note->EffNum */
118 EFF_PORTAMENTOUP, /* $01 */
119 EFF_PORTAMENTODOWN, /* $02 */
120 EFF_TONEPORTAMENTO, /* $03 */
121 EFF_VIBRATO, /* $04 */
122 EFF_TONEPVOLSLIDE, /* $05 */
123 EFF_VIBRATOVOLSLIDE, /* $06 */
124 EFF_TREMOLO, /* $07 */
125 EFF_UNUSED, /* $08 */
126 EFF_SAMPLEOFFSET, /* $09 */
127 EFF_VOLSLIDE, /* $0A */
128 EFF_POSJUMP, /* $0B */
129 EFF_SETVOLUME, /* $0C */
130 EFF_PATTERNBREAK, /* $0D */
132 EFF_SETSPEED, /* $0F */
133 EFF_SETTEMPO, /* $10 */
134 EFF_ARPEGGIO, /* $11 */
139 #endif /* !LIBRARIES_SONGCLASS_H */
143 struct InstrumentHeader
145 WORD Num; /* Instrument slot number */
146 UWORD Type; /* Instrument type (see defs) */
147 WORD FineTune; /* Instrument FineTune (-8..+7) */
152 #ifndef LIBRARIES_SONGCLASS_H
154 /* Possible values for Instrument->InstType */
156 ITYPE_SAMPLE8, /* signed 8bit sample */
157 ITYPE_SAMPLE16, /* TODO: signed 16bit sample */
158 ITYPE_SYNTH, /* TODO: Synthetic instrument */
159 ITYPE_HYBRID, /* TODO: Both Synth & Sample */
160 ITYPE_MIDI /* TODO: Played by external MIDI device */
162 #endif /* !LIBRARIES_SONGCLASS_H */
164 #endif /* !LIBRARIES_XMODULECLASS_H */