home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DeveloperDisk300794.lha / superplay-lib_3_1.LHA / superplay-lib / Programmers / Example_SPObjects / ST / st.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-21  |  1.9 KB  |  65 lines

  1.  
  2.  /* st.h
  3.     - Include File for ST Support Routines -
  4.     (c) 1994 by Andreas R. Kleinert
  5.     Last changes : 06.06.1994
  6.  */
  7.  
  8.  /* This Headerfile bases on a description of the MOD-Fileformat
  9.     in "DOS Extra", issue 4/93, DMV-Verlag.
  10.     The "spoken" description was translated into C-Source (Headerfile).
  11.  */
  12.  
  13. #ifndef ST_H
  14. #define ST_H
  15.  
  16. #ifndef LIBRARIES_IFFPARSE_H
  17. #include <libraries/iffparse.h>     /* for MAKE_ID macro : I'm lazy ... */
  18. #endif /* LIBRARIES_IFFPARSE_H */
  19.  
  20. #define ID_MK     MAKE_ID('M','.','K','.')
  21. #define ID_MKPlus MAKE_ID('M','!','K','!')
  22. #define ID_FLT4   MAKE_ID('F','L','T','4')
  23.  
  24. struct STNote
  25. {
  26.  UBYTE stn_Tone1_HiNum;   /* Bits 0 .. 3 : Tone - 4 .. 7 : Instr-Num (high) */ 
  27.  UBYTE stn_Tone2;         /* also Tone-value                                */
  28.  UBYTE stn_Eff_LowNum;    /* Bits 0 .. 3 : Eff. - 4 .. 7 : Instr-Num (low)  */ 
  29.  UBYTE stn_EffectOperand; /* effect operands (4 Bit = one operand)          */
  30. };
  31.  
  32. struct STPattern
  33. {
  34.  struct STNote st_NoteLines [4][64]; /* 64 lines, each with 4 4-Byte Notes */
  35. };
  36.  
  37. struct STInstrument
  38. {
  39.  UBYTE st_InstrumentName   [22];
  40.  UWORD st_InstrumentLength;      /* length in WORDs */
  41.  UBYTE st_FineTune;              /* -8 .. 8         */
  42.  UBYTE st_Volume;                /*  0 .. 64        */
  43.  UWORD st_LoopStart;
  44.  UWORD st_LoopLength;
  45. };
  46.  
  47. struct STHeader
  48. {
  49.  UBYTE               st_SongName    [20];   /* Name of Song                 */
  50.  
  51.  struct STInstrument st_Instruments [31];   /* Instrument data (usually 31) */
  52.  
  53.  UBYTE               st_PatternNum;         /* Song Length in Patterns      */
  54.  UBYTE               st_CIAA_Speed;
  55.  UBYTE               st_SongPatterns [128]; /* 128 Patterns (0-63)          */
  56.  UBYTE               st_ID           [4];   /* "M.K.", "FLT4", ...          */
  57.  
  58.  /* Patterns : (filelength - headersize - samplesizes) / 1024 */
  59.  /* Samples  : samplesize (add all InstrumentLength entries)  */
  60.  
  61.  /* EOF */
  62. };
  63.  
  64. #endif /* ST_H */
  65.