COMMENT "sets" used to select input soundfiles and transpositions; isorhythmic
COMMENT rhythmic ostinato; tempo accelerates; timbale sounds become louder {p4}
COMMENT and brighter {p17}

< *** timbales  {4 sflib timbale soundfiles}  ****
*f1 0 0 -1  "/sflib/perc/timb1.wav" 0 0 0; < dur = .574 , pitch = c. d3
*f2 0 0 -1  "/sflib/perc/timb2.wav" 0 0 0; < dur = .531 , pitch = c. f3
   < normal usable pitch range : ca. c1 through ca. b4
 < default functions used are 1 & 2 ; alternate rim shot functions below
 < are not included in the f99 & f98 keymap functions
*f3 0 0 -1  "/sflib/perc/timb1.rim.wav" 0 0 0; < dur = .735 , pitch = c. d3
*f4 0 0 -1  "/sflib/perc/timb2.rim.wav" 0 0 0; < dur = .695 , pitch = c. f3
  
 <; f99 = input soundfile function numbers & split points {in MIDI note numbers}
*f99 0 128 -17 0 1 51 2 ; < no rim shots  included
 <; f98 = base pitches of input soundfiles {expressed in MIDI note numbers}
*f98 0  8  -2 0 50 53; < no rm shots included
<  **** End of TIMBALE  functions  *****

<   Score file for Library algorithm  ### tsamp ###
* 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
ifdef([START],,define([START],0.000))dnl
ampfac 1;
define(CHORUSLOOP,[

temp x 14 60 90/ 7. 72 120/ 3. 120 60;
TSAMP START  24.1 ; 
rd  .015;  
p3 rh 8/16/8./ (8=16 * 3)/ -8/ (8 = 32*5)/ 8;  < rhythmic ostinato
du  mo .1 302/ 7. 300.3 300.5 300.9 /10. 301. 301.4;  < notes get longer   
  < p4 = TRANSPOSITION : integer = number of 1/2 steps up or (ig negative) down
 < fraction = mictronal divisions: Ex: -2.5 = down a whole step + a quarter tone
p4  se .1 -13/ 13.9 -6 -4 -1 0 4 5/ < first a low note, then use a 6 member set
    10. -14 -12 -10 -9 -7 -6 -4 -3 -1 1 3 4 6 7; < & then use a larger set     
   < p5 = AMPLITUDE : (1) .001 - 10 = multplier for input soundfile amplitude
   <   (2) 11 - 32767  new integer amplitude value : Default = 1.
p5 mx .1 15000/ 24 800 3000 22000;  < crescendo       
   < p6 = additional detuning {used mostly when chorusing scores} :
   <  1. = 1/2 step up, -1. = 1/2 step down : Default = 0
p6   DETUNE;
  < ----- INPUT SOUNDFILE function number {p7} & dur {p9}----
p7 se .1 3/ 3.4 2 1/ 3.5 2/ 3.5 1/ 3.5 2/< rim shot, then alternate between 1 & 2
   10.1  1 2 3 4 ; < then use all 4 soundfiles
 
   < p8 not used
 < 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 - 12} : ---------------------------------
  < 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 = spatial placement for mono in, stereo out {nchnls = 2}
  < 0 = hard left, 1. = hard right
  < flag : options : 
  <  -1 : the lower the pitch, the further the placement to the left
  <  -2 : the lower the pitch, the further the placement to the right
  <  -3 : random initial placement followed by random moving pan
  <  -4 : random initial placement followed by quasi-periodic  moving pan
  < -5  : no action taken : user supplies own stereo processing of mono signal a1
p13  1. .01 .99;  < random spatial placement    

  < ------- 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  mx .1 1.6/24.  .1 .5 1.4 1.95; < get brighter {louder}      
   < p18 = closing brightness { same range as p17; Default  = p17 }
p18      
   < p19 = time between p17 & p18: 0 = p3, > 100 or negative = % p3 : Def. = p3
p19 180;     
 < p20 = Center frequency for filters : pch or cps : Default = 261 herz
p20     

  <  Added user p-fields: 
end;  <<< End of ### tsamp ### score >>>
])dnl
CHORUSLOOP
