home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / MM1 / SOUNDUTILS / mm1_tracker.lzh / TRACKER4.6 / channel.h < prev    next >
Text File  |  1994-11-24  |  3KB  |  109 lines

  1. /* channel.h 
  2.     vi:ts=3 sw=3:
  3.  */
  4.  
  5. /* $Id: channel.h,v 4.2 1994/11/15 16:11:01 espie Exp espie $
  6.  * $Log: channel.h,v $
  7.  * Revision 4.2  1994/11/15  16:11:01  espie
  8.  * *** empty log message ***
  9.  *
  10.  *
  11.  * Revision 3.9  1993/11/17  15:31:16  espie
  12.  * audio_channel private.
  13.  * Amiga support.
  14.  * Added finetune.
  15.  *
  16.  * Revision 2.7  1992/11/13  13:24:24  espie
  17.  * Added parameters for extended Retriger command.
  18.  * Added transpose feature.
  19.  * Structured part of the code, especially replay ``automaton''
  20.  * and setting up of effects.
  21.  *
  22.  * Revision 1.5  1991/11/16  16:54:19  espie
  23.  * Bug correction: when doing arpeggio, there might not
  24.  * be a new note, so we have to save the old note value
  25.  * and do the arppeggio on that note.
  26.  * Added fields for arpeggio.
  27.  */
  28.  
  29.      
  30. #ifndef NUMBER_PATTERNS
  31. #define NUMBER_PATTERNS 128
  32. #endif
  33.  
  34. #define MAX_ARP 3
  35.      
  36. /* there is no note in each channel initially.
  37.  * This is defensive programming, because some
  38.  * commands rely on the previous note. Checking
  39.  * that there was no previous note is a way to
  40.  * detect faulty modules.
  41.  */
  42. #define NO_NOTE 255
  43.  
  44. struct channel
  45.    {
  46.    struct sample_info *samp;
  47.    struct audio_channel *audio;
  48.    int finetune;
  49.    int volume;             /* current volume of the sample (0-64) */
  50.    int pitch;              /* current pitch of the sample */
  51.    int note;               /* we have to save the note cause */
  52.                            /* we can do an arpeggio without a new note */
  53.     
  54.    int arp[MAX_ARP];       /* the three pitch values for an arpeggio */
  55.    int arpindex;           /* an index to know which note the arpeggio is doing */
  56.  
  57.    int viboffset;          /* current offset for vibrato (if any) */
  58.    int vibdepth;           /* depth of vibrato (if any) */
  59.  
  60.    int slide;              /* step size of pitch slide */
  61.  
  62.    int pitchgoal;          /* pitch to slide to */
  63.    int pitchrate;          /* step rate for portamento */
  64.  
  65.    int volumerate;         /* step rate for volume slide */
  66.  
  67.    int vibrate;            /* step rate for vibrato */
  68.  
  69.    int retrig;             /* delay for extended retrig command */
  70.    int current;
  71.                            /* current command to adjust parameters */
  72.    void (*adjust) P((struct channel *ch));
  73.    };
  74.  
  75. #define DO_NOTHING 0 
  76. #define SET_SPEED 1
  77. #define SET_SKIP 2
  78. #define SET_FASTSKIP 4
  79. #define SET_FINESPEED 32
  80.  
  81. #define JUMP_PATTERN 8
  82. #define DELAY_PATTERN 16
  83.  
  84. #define NORMAL_SPEED 6
  85. #define NORMAL_FINESPEED 125
  86.  
  87. struct automaton
  88.    {
  89.    int pattern_num;           /* the pattern in the song */
  90.    int note_num;              /* the note in the pattern */
  91.    struct block *pattern;     /* the physical pattern */
  92.    struct song_info *info;    /* we need the song_info */
  93.  
  94.    char gonethrough[NUMBER_PATTERNS + 1];  /* to check for repeats */
  95.  
  96.    int counter;               /* the fine position inside the effect */
  97.    int speed;                 /* the `speed', number of effect repeats */
  98.    int finespeed;             /* the finespeed, base is 100 */
  99.  
  100.    int do_stuff;              /* keeping some stuff to do */
  101.                               /* ... and parameters for it: */
  102.    int new_speed, new_note, new_pattern, new_finespeed;
  103.  
  104.    int pitch, note, para;     /* some extra parameters effects need */
  105.  
  106.    int loop_note_num, loop_counter;
  107.                               /* for command E6 */
  108.    };
  109.