* f100 0 1024 10 1.;      < SINE WAVE for vibrato
* f50 0 65 7 0 64 1.;           < linear change from value 1 to value 2
* f52 0 65 7 0 32 1. 32 0;      < linear change from value 1 to val 2 to val 1
* f60 0 65 5 .01 64 1.;         < exponential change from value 1 to value 2
* f62 0 65 5 .01 32 1. 32 .01;  < expo. change from value 1 to value 2 to val 1
*f57 0 64 7 0 31 0 1 1. 31 1. 1 0 ; < square wave for trill
         < f58 creates 3 note trill {above & below center pitch}
*f58 0 64 7 0 21 0 1 1. 20 1. 1 -1 20 -1 1 0 ; 

  ifdef([DETUNE],,define([DETUNE],0))dnl  COMMENT 3 macros for chorusing:
  ifdef([START],,define([START],0.000))dnl
  define(CHORUSLOOP,[
ampfac 1;

BIGSAMPST  START             < stereo input soundfiles
rd    
p3   
du    
   < p4 = output PITCH : (1) 1. - 13. = pch {notes} ;
   <  (2)  14 - 127 =  MIDI note  number ;  (3) negative = cps {herz}
p4    
   < p5  = AMPLITUDE : (1) .001 - 10 = multplier for input soundfile amplitude
   <   (2) 11 - 32767  new integer amplitude value : Default = 1.
p5     
   < p6 = detuning : 1. = 1/2 step up, -1. = 1/2 step down : Default = 0
p6  DETUNE;
  < ------ INPUT SOUNDFILE function number {p7} & pitch {p8}  ------------
  < If p7 & p8 left blank, these values derived from function tables 99 & 98
p7   
   < p8 = base PITCH of soundfile : (1) 1. - 13. = pch {notes} ;
   <  (2)  14 - 127 =  MIDI note  number ;  (3) negative = cps {herz}
p8    
 < p9 { optional} =  duration of input soundfile to be used 
 < Default  = entire soundfile  ; has no effect if looping used {if p10 != 0}
p9 


< ------Sustain LOOPING  {p10 - 11} : ---------------------------------
  < p10 = loop mode: 0 = no looping, 1 = forward, 2 = forward & backward
p10    
  < p11 = loop begin point, in samples
p11    
  < p12 = loop end point, in samples
p12    
  < p13  not used
  < ------- NEW AMPLITUDE ENVELOPE {p14 - p16} {optional} ------------
  <  if p14 + p15 = 0, no new envelope created
  < p14 = rise time { > 100 , or negative, = % p3} : Default = 0
p14      
   < p15 = decay time { > 100 , or negative, = % p3} : Default = .04
p15      
  < p16 = optional "atss" amplitude multiplier for end of note : Default = 1.
  < normal range = ca. .1 - .9 {diminuendo} or 1.1 - 2. {crescendo}
p16      

   < ----- BRIGHTNESS {p17-p20}  {optional} --------------------
 < p17 = opening brightness: Range = .001 {mellowest} - 2.{brightest} : Def. = 1.
p17       
   < p18 = closing brightness { same range as p17; Default  = p17 }
p18      
   < p19 = time between p17 & p18: 0 = p3, > 100 or negative = % p3 : Def. = p3
p19     
 < p20 = optional center freq. for filters : pch or cps : Default = p4 pitch
p20     

   < -----  GLISSANDO {p21-p24}  ----------------------------------
 < if p21 == 0 or 4.0, or if p22 == 0 , no glissando
   < p21 = 2nd pitch : if 0 {default} or 4.0 {notes = c0}, no gliss
   <  (1) 4. - 13. = pch {notes} ; <  (2)  14 - 127 =  MIDI note  number ; 
   <  (3) negative = cps {herz} ; (4) .001 - 3. = mltiplier for p4 pitch
   < 
p21    
  < p22 = duration of p4 pitch : > 100 or negative = % p3; Default 0 = No gliss
p22   
  < p23 = duration of gliss :  > 100 or negative = % p3 : Default = p3 - p22
p23    
  < p24 = function for glissando shape : Def. = 60 {exponential change}
p24    
 < -- FREQUENCY MODULATION  [VIBRATO, TRILL, AUDIO FM]  {p25-p31} ------------
   < if p28 + p29 = 0 , no pitch variation
   < p25 = fade-in time for pitch changes : Def. = 0 : > 100 or neg. = % p3
p25   
 < p26 & p27 : freq. of moduation : vibrato norm ca. 3. - 6.
  < for audio rate freq. mod., negative values = * p4 frequency
p26                                          < initial rate, or freq
p27                                          < end rate, or freq
 < p28 & p29 : width of pitch change : 1. = 1/2 step ; vib norm .04 - .08
p28                                          < initial width 
p29                                          < end width 
< p30 = function for freq. mod.: Def. 100 {vibrato}; use 57 or 58 for trill
p30                       
  < -----  RANDOM PITCH FLUCTUATIONS {p31-p33}  -----------------------
 < p31 & p32 : width of pitch change : 1. = 1/2 step ;  normal range .1 - .2
p31                                          < initial width
p32                                          < end width
p33                              < rate {normal range 4. - 20. , Def. = 0}
  < ---- AMPLITUDE MODULATION : Tremolo or audio rate side bands  {p34-p39} ---
   < if p37 + p38 = 0 , no pitch variation
   < p34 = fade-in time for pitch changes : Def. = 0 : > 100 or neg. = % p3
p34    
 < p35 & p36 : freq. of moduation : vibrato norm ca. 3. - 6.
  < for audio rate freq. mod., negative values = * p4 frequency
p35                                            < initial rate, or freq
p36                                            < end rate, or freq
 < p37 & p38 : width of amplitude modulation : Range : 0 -1.
p37                                                          < initial width 
p38                                                < end width 
 < p39 = function for freq. mod.: Def. 100 
p39    
  < -----  RANDOM AMPLITUDE FLUCTUATIONS {p40-p42}  -----------------------
 < p40 & p41 : width of amplitude deviation :  range [0-1.] typical range .1-.3
p40                                               < initial width
p41                                           < end width
p42                               < rate {typical range 4. - 20. , Def. = 0}
