home *** CD-ROM | disk | FTP | other *** search
/ Sound Sensations! / sound_sensations.iso / miscprog / ad-prog / sndtype.h < prev    next >
C/C++ Source or Header  |  1989-01-19  |  2KB  |  83 lines

  1. /*-------------------------------------------------------------------------
  2. The following group of typedefs taken from Marc Savary's routines */
  3.  
  4. #pragma pack(1)
  5.  
  6. typedef int Time;
  7.  
  8. typedef
  9.     struct {
  10.         Time    time;
  11.         float   tempo;
  12.     } TempoEvent;
  13.  
  14. typedef
  15.     struct {
  16.         int     note;
  17.         int     duree;
  18.     } NoteEvent;
  19.  
  20.  
  21. typedef
  22.     struct {
  23.         Time time;
  24.         char instrumName[ 9];
  25.         char filler;
  26.         int timbreIndex;
  27.     } InstrumEvent;
  28.  
  29. typedef
  30.     struct {
  31.         Time time;
  32.         float volume;
  33.     } VolumeEvent;
  34.  
  35.  
  36. typedef
  37.     struct {
  38.         Time time;
  39.         float pitch;
  40.     } PitchEvent;
  41.  
  42. typedef
  43.     struct {
  44.         char instrumName[ 9];
  45.         Timbre trec;            /* 19-Jan-89, DJG */
  46.     } TimbreDef;
  47.  
  48. /*-------------------------------------------------------------------------*/
  49.  
  50. typedef struct {
  51.    BYTE2   major, minor;
  52.    char    filler1 [40];
  53.    BYTE2   ticks_in_beat;
  54.    BYTE2   beats_in_measure;
  55.    BYTE2   axis_y, axis_x;
  56.    char    filler2;
  57.    char    music_mode;
  58.    UBYTE1  filler3 [90+38+15];
  59.    float   basic_tempo;
  60. } Rol_Header;
  61.  
  62. typedef struct {
  63.    char f_name [40];
  64.    char out_name [40];
  65.    int  ID;
  66.    int  out_file_ID;
  67.    Rol_Header  rol_header;
  68. } Rol_File;
  69.  
  70. typedef struct {
  71.    NoteEvent    *note_data;
  72.    VolumeEvent  *vol_data;
  73.    TempoEvent   *tempo_data;
  74.    InstrumEvent *instr_data;
  75.    PitchEvent   *pitch_data;
  76.    long note_seek, vol_seek, tempo_seek, instr_seek, pitch_seek;
  77.    int  now_time, end_time;
  78.    int  vol_count, tempo_count, instr_count, pitch_count;
  79.    int  note_ptr, vol_ptr, tempo_ptr, instr_ptr, pitch_ptr;
  80. } Event;
  81.  
  82. #pragma pack()
  83.