IFND LIBRARIES_SONGLCASS_I LIBRARIES_SONGCLASS_I SET 1 ** ** $VER: songclass.i 3.9 (7.1.96) ** Copyright (C) 1995,96 Bernardo Innocenti ** ** Set TAB size to 8 chars to read this header file ** ** Assembler structure definitions for the song class ** IFND EXEC_TYPES_I include exec/types.i ENDC ; EXEC_TYPES_I IFND EXEC_NODES_I include exec/nodes.i ENDC ; EXEC_NODES_I IFND EXEC_SEMAPHORES_I include exec/semaphores.i ENDC ; EXEC_SEMAPHORES_I MAXOCTAVES EQU 6 ; Number of octaves currently supported MAXNOTES EQU (12*MAXOCTAVES+1) ; Entries in note conversion table MAXTRACKS EQU 255 ; Maximum number of tracks in a pattern MAXINSTRUMENTS EQU 255 ; Maximum number of instruments in a song MAXPATTLINES EQU 32767 ; Maximum number of lines in a pattern MAXPOSITIONS EQU 32767 ; Maximum number of song positions MAXPATTERNS EQU 32767 ; Maximum number of patterns ************************************************************************** ** Some definitions transcripted from "XModule.h" ************************************************************************** ENUM 0 EITEM EFF_NULL EITEM EFF_PORTAMENTOUP EITEM EFF_PORTAMENTODOWN EITEM EFF_TONEPORTAMENTO EITEM EFF_VIBRATO EITEM EFF_TONEPVOLSLIDE EITEM EFF_VIBRATOVOLSLIDE EITEM EFF_TREMOLO EITEM EFF_UNUSED EITEM EFF_SAMPLEOFFSET EITEM EFF_VOLSLIDE EITEM EFF_POSJUMP EITEM EFF_SETVOLUME EITEM EFF_PATTERNBREAK EITEM EFF_MISC EITEM EFF_SETSPEED EITEM EFF_SETTEMPO EITEM EFF_ARPEGGIO EITEM EFF_COUNT STRUCTURE Note,0 UBYTE note_Note UBYTE note_Inst UBYTE note_Vol UBYTE note_Pad UBYTE note_EffNum UBYTE note_EffVal LABEL Note_SIZEOF STRUCTURE Instrument,0 UWORD in_InstType ; Instrument type (See defs) UWORD in_Volume ; Volume (max $40) APTR in_Name ; Instrument Name APTR in_SampleData ; Sampled data ULONG in_Length ; Length of instr ULONG in_Repeat ; Loop start (No loop = 0) ULONG in_Replen ; Loop size (No loop = 1) WORD in_FineTune ; Instrument FineTune (-8..+7) UWORD in_Flags ; Unused LABEL in_SIZEOF STRUCTURE Pattern,0 UWORD pa_Tracks ; Support for variable number of tracks UWORD pa_Lines ; Number of lines in pattern APTR pa_Name ; Pattern Name STRUCT pa_Reserved,8 ; Reserved for future enhancements LABEL pa_Notes,0 ; Pointers to all tracks follow LABEL pa_SIZEOF * Song class white box istance * * You can read from this structure directly for speed critical operations. * Modifying the data contained in the SongInfo structure is only allowed * by means of object methods. * * Before using a public song, please protect yourself against other tasks * modifying these fields. Always obtainin a (shared) lock on the * SignalSemaphore contained in the SongInfo structure before doing anything * with it. The methods provided by the song class will not handle access * arbitration for you. * STRUCTURE SongInfo,LN_SIZE STRUCT si_Lock,SS_SIZE UWORD si_Length ; Number of positions in song UWORD si_MaxTracks ; Number of tracks in song UWORD si_NumPatterns ; Number of patterns in song UWORD si_LastInstrument ; Unused UWORD si_CurrentPatt UWORD si_CurrentPos UWORD si_CurrentInst UWORD si_CurrentLine UWORD si_CurrentTrack UWORD si_DefNumTracks ; Default number of tracks in new patterns UWORD si_DefPattLen ; Default number of lines in new patterns UWORD si_GlobalSpeed ; Default song speed UWORD si_GlobalTempo ; Default song tempo UWORD si_RestartPos ; Position to restart from STRUCT si_Reserved,8 ; Reserved for future enhancements * Note: all data beyond this point is longword aligned ULONG si_Flags ; See definitions below APTR si_Pool ; The memory pool where song data ; must be allocated from. APTR si_Sequence ; UWORD *: Pointer to song sequence APTR si_Patt APTR si_Instr APTR si_ActiveTracks ; UWORD *: Active Tracks (-1 = disabled) APTR si_Title ; Song name APTR si_Author ; Author of song APTR si_Path ; Original song path APTR si_Description ; Verbose song description ULONG si_Changes ; Number of changes made to this song ULONG si_TotalChanges ; Total number of changes made so far ULONG si_CreationDate ; Date of OM_NEW ULONG si_LastChanged ; Date of last saving LABEL si_SIZEOF ENDC ; !LIBRARIES_SONGCLASS_I