1 IFND LIBRARIES_SONGLCASS_I
2 LIBRARIES_SONGCLASS_I SET 1
4 ** $VER: songclass.i 3.9 (7.1.96)
5 ** Copyright (C) 1995,96 Bernardo Innocenti
7 ** Set TAB size to 8 chars to read this header file
9 ** Assembler structure definitions for the song class
21 IFND EXEC_SEMAPHORES_I
22 include exec/semaphores.i
23 ENDC ; EXEC_SEMAPHORES_I
26 MAXOCTAVES EQU 6 ; Number of octaves currently supported
27 MAXNOTES EQU (12*MAXOCTAVES+1) ; Entries in note conversion table
28 MAXTRACKS EQU 255 ; Maximum number of tracks in a pattern
29 MAXINSTRUMENTS EQU 255 ; Maximum number of instruments in a song
30 MAXPATTLINES EQU 32767 ; Maximum number of lines in a pattern
31 MAXPOSITIONS EQU 32767 ; Maximum number of song positions
32 MAXPATTERNS EQU 32767 ; Maximum number of patterns
36 **************************************************************************
37 ** Some definitions transcripted from "XModule.h"
38 **************************************************************************
43 EITEM EFF_PORTAMENTOUP
44 EITEM EFF_PORTAMENTODOWN
45 EITEM EFF_TONEPORTAMENTO
47 EITEM EFF_TONEPVOLSLIDE
48 EITEM EFF_VIBRATOVOLSLIDE
51 EITEM EFF_SAMPLEOFFSET
55 EITEM EFF_PATTERNBREAK
75 STRUCTURE Instrument,0
76 UWORD in_InstType ; Instrument type (See defs)
77 UWORD in_Volume ; Volume (max $40)
78 APTR in_Name ; Instrument Name
79 APTR in_SampleData ; Sampled data
80 ULONG in_Length ; Length of instr
81 ULONG in_Repeat ; Loop start (No loop = 0)
82 ULONG in_Replen ; Loop size (No loop = 1)
83 WORD in_FineTune ; Instrument FineTune (-8..+7)
84 UWORD in_Flags ; Unused
89 UWORD pa_Tracks ; Support for variable number of tracks
90 UWORD pa_Lines ; Number of lines in pattern
91 APTR pa_Name ; Pattern Name
92 STRUCT pa_Reserved,8 ; Reserved for future enhancements
93 LABEL pa_Notes,0 ; Pointers to all tracks follow
97 * Song class white box istance
99 * You can read from this structure directly for speed critical operations.
100 * Modifying the data contained in the SongInfo structure is only allowed
101 * by means of object methods.
103 * Before using a public song, please protect yourself against other tasks
104 * modifying these fields. Always obtainin a (shared) lock on the
105 * SignalSemaphore contained in the SongInfo structure before doing anything
106 * with it. The methods provided by the song class will not handle access
107 * arbitration for you.
109 STRUCTURE SongInfo,LN_SIZE
110 STRUCT si_Lock,SS_SIZE
111 UWORD si_Length ; Number of positions in song
112 UWORD si_MaxTracks ; Number of tracks in song
113 UWORD si_NumPatterns ; Number of patterns in song
114 UWORD si_LastInstrument ; Unused
119 UWORD si_CurrentTrack
120 UWORD si_DefNumTracks ; Default number of tracks in new patterns
121 UWORD si_DefPattLen ; Default number of lines in new patterns
123 UWORD si_GlobalSpeed ; Default song speed
124 UWORD si_GlobalTempo ; Default song tempo
125 UWORD si_RestartPos ; Position to restart from
126 STRUCT si_Reserved,8 ; Reserved for future enhancements
128 * Note: all data beyond this point is longword aligned
130 ULONG si_Flags ; See definitions below
131 APTR si_Pool ; The memory pool where song data
132 ; must be allocated from.
133 APTR si_Sequence ; UWORD *: Pointer to song sequence
136 APTR si_ActiveTracks ; UWORD *: Active Tracks (-1 = disabled)
137 APTR si_Title ; Song name
138 APTR si_Author ; Author of song
139 APTR si_Path ; Original song path
140 APTR si_Description ; Verbose song description
142 ULONG si_Changes ; Number of changes made to this song
143 ULONG si_TotalChanges ; Total number of changes made so far
144 ULONG si_CreationDate ; Date of OM_NEW
145 ULONG si_LastChanged ; Date of last saving
151 ENDC ; !LIBRARIES_SONGCLASS_I