COMMENT Two clusters: (1) a quarter tone cluster centered on g3, with diminuendo, and
COMMENT (2) a 1/6 tone cluster centered on cs5, with crescendo {& increasing brightness}

* f1 0 524288 -1 "/sflib/voice/alto1.g3.wav" 0 0 0 ; < 7.004082 sec
* f2 0 524288 -1 "/sflib/voice/sop1.cs5.wav" 0 0 0 ; < 6.145306 sec

<   Score file for Library algorithm  ### samp ###
* 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,[

SAMP  START 0 22; 
     < 2 clusters, the 1st with 9 tones, the 2nd with 13 tones
rd    .007;
p3  nu .008 * 9/ 5./ .007 * 12;
du  nu 306. * 9/ 305. * 13;  < 1st cluster = 6 seconds, 2nd cluster 5 seconds
   < p4 = output PITCH : (1) 1. - 13. = pch {notes} ;
   <  (2)  14 - 127 =  MIDI note  number ;  (3) negative = cps {herz}
p4  no g3 * 9 / cs5 * 13 ; < 1st cluster centered on g3, 2nd cluster on cs5    
   < p5 = AMPLITUDE : (1) .001 - 10 = multplier for input soundfile amplitude
   <   (2) 11 - 32767  new integer amplitude value : Default = 1.
p5 nu .15 * 9/  .05 * 13;        
   < p6 = detuning : 1. = 1/2 step up, -1. = 1/2 step down : Default = 0
p6  nu 0/.5/ -.5/ 1./ -1/ 1.5/-1.5/ 2./ -2/  < 1st cluster : 1/4 tones
  0/-.33/ .33/ -.67/.67/ -1./ 1./ -1.33/1.33/-1.67/1.67/-2./2; <1/6 tone cluster
  < ----- INPUT SOUNDFILE function number {p7}, pitch {p8} & dur {p9}----
  < If p7 & p8 left blank, these values derived from function tables 99 & 98
p7  nu 1 * 9/ 2 * 13;                             < input soundfile func num 
   < p8 = base PITCH of soundfile : (1) 1. - 13. = pch {notes} ;
   <  (2)  14 - 127 =  MIDI note  number ;  (3) negative = cps {herz}
p8 no g3 * 9  / cs5 * 13;  < center tones of the 2 cluster
 < 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 - p12} : ---------------------------------
  < 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      

  < ------- NEW AMPLITUDE ENVELOPE {p14 - p16} {optional} ------------
  <  if p14 + p15 = 0, no new envelope created
  < p14 = rise time { > 100 , or negative, = % p3} : Default = 0
p14  mo 5 0 .01 .01/2. 1.9 2.1 2.; < ca. 2 second fade-in for 2nd cluster    
   < p15 = decay time { > 100 , or negative, = % p3} : Default = .04
p15 mo 5. 1.9 2.1 2./ 2. .06 .09 .06; < ca. 2" fade-out for 1st cluster
                                      < .06 - .09 fade-out for 2nd cluster     
  < p16 = optional "atss" amplitude multiplier for end of note : Default = 1.
  < normal range = ca. .1 - .9 {diminuendo} or 1.1 - 2. {crescendo}
p16  mo 5. .05 .07 .05/ 2. 3.9 4.1 4.; < diminuendo on 1st cluster
                                       < crescendo on 2nd cluster    

   < ----- BRIGHTNESS {p17-p20}  {optional} --------------------
 < p17 = opening brightness: Range = .001 {mellowest} - 2.{brightest} : Def. = 1.
p17 mo 5. 1.95 1.8 1.8/ 2. .02 .05 .05; < 
   < p18 = closing brightness { same range as p17; Default  = p17 }
p18 mo 5. .05 .03 .03/ 2.  1.99 1.8 1.8;
   < p19 = time between p17 & p18: 0 = p3, > 100 or negative = % p3 : Def. = p3
p19 mo 5. 100.9 100.8 100.8/2.  100.95 100.9 100.9;    
 < p20 = optional center freq. for filters : pch or cps : Default = p4 pitch
p20     

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