.OH "xSample scores for \f2samplerp, samplert \f1 and \f2chorus\f1"
.EH "xSample scores for \f2samplerp, samplert \f1 and \f2chorus\f1"
.OF "x\f2samplerp, samplert\f1 and \f2chorus\f1 examples : Page %"
.EF "x\f2samplerp, samplert\f1 and \f2chorus\f1 examples : Page %"
.LP
.ps +2
.vs +1
.ce  3
\f3Example scores for \f2samplerp\f3 and  \f2samplert,\f1
.br
and
.br
\f2chorus\f3 commands used to create chorused versions of these source scores
.IP
.ps -4
.vs -2
In most of these example scores, we have eliminated several lines from the
\f2samplerp\f1 or \f2samplert\f1
score template that are not used in the example (e.g. comment lines,
unused function definitions and unused p-fields).
.ps +2
.vs +1
.LP
.LG
.B
Example score samplerp1 :
.R
.NL
.LD
   <   5 output "notes": source soundfile: "joan.gf4.snd" is read in at the
   < original pitch level, then tranposed up & down a major third, then up
   < & down a perfect fifth
include(OLIBDIR/Include/gen1tablesizes)
*f1 0 SIZE5 1 "/snd/pub/joan.gf4.snd"  0 0;

    < (Several unused score template lines omitted here.)
ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

SAMPLERP  START 0 5;
rd 
p3 3.;
du 307;
< p4 new output pitch: cps or pch
p4   no gf4/ bf4/ d4/ cs5/ b3;
 < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
 < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
 < default 0 = max amp { 32767 }
p5  18000;    

 < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100, or negative, = % p3}
p6 
 < p7 = decay time { > 100, or negative, = % p3}
p7  .5;
  <  ( unused p-fields 8 and 9 are omitted here )

 < -----  p10,11 & 12: leave blank if using tables 99, 98, 97 & 96 to determine
 < GEN1 function number (source soundfile), its pitch and duration:
       < p10 = gen1 func. # of samples {0 default = func. 1}
   p10 1;      
       <  p11 = input pitch of p10 func {cps or pch}
   p11  no gf4;      
       < p12 = duration of p10 function
   p12  5.793;
  <  ( unused p-fields 13-35 are omitted here )
end;   <>>>>>>>>>>>>>>>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.LG
.B
Example score samplert1 :
.R
.NL
.LD
 <   7 output "notes": the first 5.94 seconds (p12) of soundfile "voicetest.snd"
 < is read in at the original pitch level, then transposed down & up by 4, 8
 < and 12 semitones
include(OLIBDIR/Include/gen1tablesizes)
 *f1 0 SIZE5 1 "/snd/pub/voicetest.snd"  0 0;

ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

SAMPLERT  START 0 7;
rd
p3  4;
du 306;
 < p4 = TRANSPOSITION: integer = 1/2 steps up or down {if negative}
 < fraction = microtonal  { Example: -2.5 = whole step + quarter tone down }
p4 nu 0/-4/4/-8/8/-12/12;
 < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
 < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
 < default 0 = max amp { 32767 }
p5 20000;

 < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100, or negative, = % p3}
p6 
 < p7 = decay time { > 100, or negative, = % p3}
p7  .5;
  <  ( unused p-fields 8 and 9 are omitted here )

< p10 = gen1 audio function number
p10   1;
    < OPTIONAL p11 = duration of source soundfile, if default from f98 not used
  p11 5.944;
  <  ( unused p-fields 12-35 are omitted here )
end;  <<< End of ### samplert ### score >>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.LG
.B
Example score samplerp2 :
.R
.NL
.LD
< Library score example: samplerp2
   <   source soundfiles:
< **** 44.1k PIANO functions  ********
*f1 0 262144 1  "/snd/sflib/pn.bf0.snd"  0 0; 
*f2 0 262144 1  "/snd/sflib/pn.d1.snd"  0 0; 
*f3 0 262144 1  "/snd/sflib/pn.g1.snd"  0 0; 
*f4 0 262144 1  "/snd/sflib/pn.c2.snd"  0 0; 
*f5 0 262144 1  "/snd/sflib/pn.f2.snd"  0 0; 
*f6 0 262144 1  "/snd/sflib/pn.bf2.snd"  0 0; 
*f7 0 262144 1  "/snd/sflib/pn.ef3.snd"  0 0; 
*f8 0 262144 1  "/snd/sflib/pn.af3.snd"  0 0; 
*f9 0 262144 1  "/snd/sflib/pn.cs4.snd"  0 0; 
*f10 0 262144 1  "/snd/sflib/pn.fs4.snd"  0 0; 
*f11 0 262144 1  "/snd/sflib/pn.b4.snd"  0 0; 
*f12 0 262144 1  "/snd/sflib/pn.e5.snd"  0 0; 
*f13 0 131072 1  "/snd/sflib/pn.a5.snd"  0 0; 
*f14 0 131072 1  "/snd/sflib/pn.d6.snd"  0 0; 
*f15 0 131072 1  "/snd/sflib/pn.g6.snd"  0 0; 
*f16 0 65536 1  "/snd/sflib/pn.c7.snd"  0 0; 
*f17 0 65536 1  "/snd/sflib/pn.ef7.snd"  0 0; 
*f18 0 65536 1  "/snd/sflib/pn.fs7.snd"  0 0; 
*f19 0 65536 1  "/snd/sflib/pn.a7.snd"  0 0; 
*f20 0 65536 1  "/snd/sflib/pn.c8.snd"  0 0; 
 < f99 : start times of piano samples
*f99 0 8 -2 0 ;
 <f98 durs of bf0/d1/g1/ c2/f2/bf2/ef3/af3/cs4/fs4/b4/e5 /a5/d6/g6/c7/ef/fs/a/c8
*f98 0 32 -2 3.97 3.94 3.48 4.06 3.46 3.72 3.4 3.16 2.54 3.56 3.91 3.29
 2.2 1.84 1.8 1.33 1.07 1.31 1.03 1.04;
 < f97 : PCH pitches of bf0 through c8
*f97 0 32 -2 4.10 5.02 5.07 6.00 6.05 6.10 7.03 7.08 8.01 8.06 8.11 9.04
 9.09 10.02 10.07 11.00 11.03 11.06 11.09 12.00;
 < f96 PCH split points for reading tables 99,98,97
*f96 0 32 -2 4.119 5.049 5.099 6.029 6.079 7.009 7.059 7.109 8.039 8.089 9.019
 9.069 9.119 10.049 10.099 11.019 11.049 11.079 11.109;
  < f95: (1) # of values in f96 | (2) func # 1 | (3) func # 2 |
     <   (4) 1st split point | (5) func 3 | (6) 2nd split pt
*f95 0 4 -2 19 0 ; < 2nd arg (0) is a flag, indicating 1 sample tone per sf
<  **** End of PIANO  functions  *****
<   Score file for Library algorithm  ### samplerp ###
include(OLIBDIR/Include/gen1tablesizes)

ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

te 72;
SAMPLERP  START 7.5;
rd .018;
p3 rh 16*8/ -4/ 400/16*8/ -4/ 16*6;
du nu 12./ .95*3/100.06*3/300.6// 302.*2/301.5/ 100.06*3/ 301.*4/302*6;
  < p4 = new pitch, cps or pch
p4  no d1/a/e2/b/fs3/cs4/gs/ds5// fs6/b5/g0/c5/a/ef6/af/cs7/bf//
   ef7/c8/d/ef/b7/bf6;
   < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
   < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
   < default 0 = max amp { 32767 }
p5 mx 2. 6000 15000/1. 0/3. 16000 10000 7000/1.5 8000 18000;
  < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100 , or negative, = % p3}
p6 nu 0*4/ .02*3/ 0*4/ .02/ 0/ .02*2/ 0*10;
   < p7 = decay time { > 100 , or negative, = % p3}
p7 nu .06*5/.08*3/.3// .05*2/1./ .1/.07*2/ .1*4/ .08*6;
  < p8 = optional amplitude multiplier for end of note
  < normal range = ca. .1 - .9 {dim.} or 1.1 - 2. {cresc.}
p8  1. .95 .6;

  <  ( unused p-fields 9-35 have been omitted here )
end;  <<< End of ### samplerp ### score >>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.LG
.B
Example score samplert2 :
.R
.NL
.LD
< Library score example: samplert2
   <   source soundfiles:
< *** timbales  {4 sflib timbale soundfiles}  ****
*f1 0 32768 1  "/snd/sflib/timb1.snd"  0 0; < original pitch = c. d3
*f2 0 32768 1  "/snd/sflib/timb2.snd"  0 0; < original pitch = c. f3
   < normal usable pitch range : ca. c1 through ca. b4
 < default functions used are 1 & 2 ; for rim shots, place a "3" (f3, timb1.rim)
 < or a "4" (f4, timb2.rim) in samplerp p10 or samplert p4 
*f3 0 32768 1  "/snd/sflib/timb1.rim.snd"  0 0; < original pitch = c. d3
*f4 0 32768 1  "/snd/sflib/timb2.rim.snd"  0 0; < original pitch = c. f3
 < f99 : start times
*f99 0 4 -2 0 0 ;
   <f98 durs of the 4 timbale samples:
*f98 0 4 -2 .574  .531  .735 .695;
 < f97 : approximate freqs of the timbale samples
*f97 0 4 -2 7.02  7.05  7.02  7.05;
 < f96 PCH split points for reading tables 99,98,97
*f96 0 2 -2 7.035;
  < f95: (1) # of values in f96 | (2) func # 1 | (3) func # 2 |
*f95 0 4 -2 1 0 ; < 2nd arg (0) is a flag, indicating 1 sample tone per sf
<  **** End of TIMBALE  functions  *****
<   Score file for Library algorithm  ### samplert ###
include(OLIBDIR/Include/gen1tablesizes)
    < (Several unused score template lines omitted here.)

ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[
tempo x 14. 60 90/7. 72 120/3. 120 60;

SAMPLERT  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. 302.;
   < p4 = TRANSPOSITION: integer = 1/2 steps up or down {if negative}
   < fraction = microtonal  { Example: -2.5 = whole step + quarter tone down }
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;  < & finally use a larger set
   < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
   < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
   < default 0 = max amp { 32767 }
p5 mx .1 15000/24 1000 4000 22000;

  <  ( unused p-fields 6-9 are omitted here )

     < p10 = gen1 audio function number
p10  se .1 3/3.4 1/3.5 2/3.5 1/3.5 2/  < rim shot, then alternate between 1 & 2
       10. 1 1 2 3 4;  < and then use all 4 soundfiles

    < (unused p-fields 11-28 of the score template are omitted here)

< ---- Optional BRIGHTNESS {p29-p32} if p30 = 0 brightness filtering is skipped
 < p29 = approx. fundamental pitch {cps or pch} {needed by hi & lo pass filters}
p29 200;
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30  mx .1 1.6/21 .1 .5 1.2 1.9;

     < (unused p-fields 31-35 of the score template are omitted here)
end;  <<< End of ### samplert ### score >>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.LP
.LG
.B
Example score samplerp3 :
.R
.NL
.LD
include(OLIBDIR/Include/gen1tablesizes)
 < source soundfile (one of the sflib piano tones): 
 *f1 0 SIZE5 1 "/snd/sflib/pn.g1.snd"  0 0;

 < 3 output notes: the first imposes a glissando, the second adds vibrato,
 < and the adds 3rd random frequency deviation and attack noise
 < output brightness also is varied within the output tones
 < the 1st output tone also splices off the attack {p9} & fades in {p6}

 < Control functions: Required for glissando and/or vibrato
 * f100 0 1024 10 1.;	      < SINE WAVE  required for vibrato
 * f60 0 65 5 .01 64 1.;     < exponential slope, default gliss function for p16

ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

SAMPLERP  START 0 3;
rd 
p3 3.5;
du 305;
  < p4 = new pitch, cps or pch
p4  no g1/a/ef; 
   < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
   < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
   < default 0 = max amp { 32767 }
p5  .8; 
  < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100 , or negative, = % p3}
p6  nu .3/ 0/ / ;
   < p7 = decay time { > 100 , or negative, = % p3}
p7  .05;
  < p8 = optional amplitude multiplier for end of note
  < normal range = ca. .1 - .9 {dim.} or 1.1 - 2. {cresc.}
p8 nu 3.0/ 0 / .05;
 

  <p9: skip: positive = skip time (seconds) into func, negative = starting phase
p9  nu .3/ 0//;
 < -----  p10,11 & 12: leave blank if using tables 99, 98, 97 & 96 to determine
 < GEN1 function number (source soundfile), its pitch and duration:
       < p10 = gen1 func. # of samples {0 default = func. 1}
   p10  1;     
       <  p11 = pitch of p10 func {cps or pch}
   p11    no g1;    
       < p12 = duration of p10 function to be used
   p12   3.48;
 <  ----- optional GLISSANDO { p13-p16} : if p14 + p15 = 0, no glissando -----
   < p13 = 2nd pitch {pch or cps} 0 = no gliss
p13  no e2;
   < p14 = duration for p4 pitch ( > 100 = % total dur)
p14  nu .6/  0//;
   < p15 = duration of glissando{ > 100 = % total dur}
p15  nu 1.6/ 0//;
   < p16 = glissando  function { default = 60 }
p16  nu 60;
  < ----- Optional VIBRATO {p17-p24} : if p17+p19+p20 = 0, no vib. ------
   < p17 = initial vibrato rate
p17 nu 0/ 2. / 0 ;  
   < p18 = time between p17 & p19 { >100 = % idur}
p18   nu 0/ 1. / 0 ;
   < p19 = 2nd vibrato rate
p19 nu 0 / 8. / 0 ;  
   < p20 = final {3rd}  vibrato rate
p20  nu 0 / 1. / 0 ; 
   < p21 = initial vibrato depth { .01-.04 ord}
p21  nu 0 / .01 / 0;  
   < p22 = vibrato depth 2
p22  nu 0 / .05 / 0 ; 
    < p23 = closing {3rd}  vibrato depth
p23  nu 0 / .01 / 0 ;
    < p24 vibrato random deviation  : .2 - .4 ord
p24  nu .3;
   < ----- Optional PITCH RANDOM DEVIATION & ATTACK NOISE {p25-p28}  -------
   < p25 = attack time : c. .06 ord;  > 100 = % idur
p25   nu 0 / / .2;
   < p26 = added attack noise % : 0 - 1.5 ord; works best with percussive sounds
p26   nu 0 / / 3.0;
   < p27 = steady state rd % : 0 ok .01 - .03 ord
p27   nu 0 // .09; 
   < p28 = rd rate : c. 5. - 20.
p28    6.;
< -----  Optional BRIGHTNESS {p30-p32}  --------
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30  nu .05 / 1.9 / 1.;
   < Optional p31 = closing brightness { if 0, = p30 }
p31  nu 1.9 / .02 / 1.; 
   < p32 = optional time between p30 & p31; 0 = full dur., > 100 = % full dur.
p32  nu 0 / .3 / 0 ;
   < p33 = detuning {mostly for chorusing} { 1. = 1/2 step, .1 - .13 ord }
p33 DETUNE ;
   < p34 = sampling rate of INPUT soundfile, if different from output
p34
end;  <<< End of ### samplerp ### score >>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.LP
.LG
.B
Example score samplert3 :
.R
.NL
.LD
include(OLIBDIR/Include/gen1tablesizes)
 < source soundfile:
 *f1 0 SIZE5 1 "/snd/pub/voicetest.snd"  0 0;

 < similar to example samplerp3, applying first a glissando & splicing off the
 < beginning, then applying vibrato, then random frequency deviation
 < brightness is also varied within the 3 output "notes"

 < Control functions: Required for glissando and/or vibrato
 * f100 0 1024 10 1.;	      < SINE WAVE  required for vibrato
 * f60 0 65 5 .01 64 1.;     < exponential slope, default gliss function for p16

ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

SAMPLERT  START 0 3;
rd
p3  5.1;
du 305;
 < p4 = TRANSPOSITION: integer = 1/2 steps up or down {if negative}
 < fraction = microtonal  { Example: -2.5 = whole step + quarter tone down }
p4 nu 0/ 2 / -4;
 < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
 < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
 < default 0 = max amp { 32767 }
p5 nu .4/ .7 / .7;
 < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100, or negative, = % p3}
p6  nu .4 / 0 // ;
 < p7 = decay time { > 100, or negative, = % p3}
p7  .15;
  < p8 = optional amplitude multiplier for end of note
  < normal range = ca. .1 - .9 {dim.} or 1.1 - 2. {cresc.}
p8 nu 2.2 / .03 / .5;

<p9: skip: positive = skip time (seconds) into func, negative = starting phase
p9 nu .25 / 0 //;
< p10 = gen1 audio function number
p10   1;
    < OPTIONAL p11 = duration of source soundfile, if default from f98 not used
  p11 5.944;
     < if p11 = -1, p12 gives index to tables 99 & 98
   < OPTIONAL p12 = index to tables f99 {start times} & f98 {durations}
    p12     
 <  ----- optional GLISSANDO { p13-p16} : if p14 + p15 = 0, no glissando -----
  < p13 = 2nd tranposition 
p13   nu 6 / 0 // ;
 < p14 = duration for p10 {1st} transposition ( > 100 = % total dur)
p14  nu .6 / 0 //;  
 < p15 = duration of glissando{ > 100 = % total dur}
p15  nu 1.6/ 0//;
   < p16 = glissando  function { default = 60 }
p16  60;
  < ----- Optional VIBRATO {p17-p24} : if p17+p19+p20 = 0, no vib. ------
   < p17 = initial vibrato rate
p17 nu 0/ 3. / 0 ;  
   < p18 = time between p17 & p19 { >100 = % idur}
p18   nu 0/ 3. / 0 ;
   < p19 = 2nd vibrato rate
p19 nu 0 / 8. / 0 ;  
   < p20 = final {3rd}  vibrato rate
p20  nu 0 / 2. / 0 ; 
   < p21 = initial vibrato depth { .01-.04 ord}
p21  nu 0 / .07 / 0;  
   < p22 = vibrato depth 2
p22  nu 0 / .12 / 0 ; 
    < p23 = closing {3rd}  vibrato depth
p23  nu 0 / .08 / 0 ;
    < p24 vibrato random deviation  : .2 - .4 ord
p24  nu .3;
   < ----- Optional PITCH RANDOM DEVIATION & ATTACK NOISE {p25-p28}  -------
   < p25 = attack time : c. .06 ord;  > 100 = % idur
p25   nu 0 / / .3;
   < p26 = added attack noise % : 0 - 1.5 ord; works best with percussive sounds
p26   nu 0 / / 3.0;
   < p27 = steady state rd % : 0 ok .01 - .03 ord
p27   nu 0 // .15; 
   < p28 = rd rate : c. 5. - 20.
p28    8.;
< ---- Optional BRIGHTNESS {p29-p32} if p30 = 0 brightness filtering is skipped
 < p29 = approx. fundamental pitch {cps or pch} {needed by hi & lo pass filters}
p29 150;
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30  nu .01 / 2.0 / 1.9;
   < Optional p31 = closing brightness { if 0, = p30 }
p31  nu 2.0 / .001 / .01; 
   < p32 = optional time between p30 & p31; 0 = full dur., > 100 = % full dur.
p32  nu 0 / .5 / 0 ;
 < p33 = detuning {mostly for chorusing} { 1. = 1/2 step, .1 - .13 ord }
p33 DETUNE ;
 < p34 = sampling rate of INPUT soundfile, if different from output
p34
end;  <<< End of ### samplert ### score >>>
])dnl
CHORUSLOOP
.DE
.sp .5
\l"7i"
.sp .5
.sp .5
\l"7i"
.sp .5
.LP
.LG
.B
Example score samplerp4 :
.R
.NL
.LD
include(OLIBDIR/Include/gen1tablesizes)
*f20 0 SIZE8 1 "/snd/sflib/gong.bf2.snd" 0 0 ; < use gong at end
< **** VLN default function tables 99,98,97,96,95 ***
*f1 0 262144 1  "/snd/sflib/vln.g3.snd"  0 0; 
*f2 0 262144 1  "/snd/sflib/vln.b3.snd"  0 0;
*f3 0 262144 1  "/snd/sflib/vln.ds4.snd"  0 0;
*f4 0 262144 1  "/snd/sflib/vln.g4.snd"  0 0;
*f5 0 262144 1  "/snd/sflib/vln.b4.snd"  0 0;
*f6 0 131072 1  "/snd/sflib/vln.ds5.snd"  0 0;
*f7 0 262144 1  "/snd/sflib/vln.g5.snd"  0 0;
*f8 0 131072 1  "/snd/sflib/vln.b5.snd"  0 0;
*f9 0 131072 1  "/snd/sflib/vln.ds6.snd"  0 0;
*f10 0 131072 1 "/snd/sflib/vln.g6.snd"  0 0;
*f11 0 262144 1 "/snd/sflib/vln.c7.snd"  0 0;
 < f99 : start times of vln samples
*f99 0 16 -2 0 ;
 < f98 : durations of samples g3/b3/d#4/g4/b4/ds5/g5/b5/ds6/g6/c7
*f98 0 16 -2 3.8 3.58 3.61 3.8 3.31 2.85 3.65 2.85 2.9 2.91 3.34;
 < f97 : frequencies of g3 through c7
*f97 0 16 -2 196. 246.94 311.127 392. 493.883 622.25 784. 987.77 1244.5
 1568. 2093.;
 < f96 PCH split points for reading tables 99,98,97
*f96 0 16 -2 7.085 8.005 8.045 8.085 9.005 9.045 9.085 10.005 10.045 10.085;
 < f95: # of values in f96 | func # 1 | func # 2 | PCH split point btw f1 & f2
*f95 0 4 -2 10 0 ; < 2nd arg (0) is a flag, indicating 1 sample tone per sf
<  -------------End of VLN functions ---------
<   Score file for Library algorithm  ### samplerp ###
 < Control functions: Required for glissando and/or vibrato
 * f100 0 1024 10 1.;	      < SINE WAVE  required for vibrato
 * f60 0 65 5 .01 64 1.;     < exponential slope, default gliss function for p16
 < (Alternate gliss. functions from the samplerp template omitted here )
ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

te x 2. 66 80/.7 80 60;
ampfac 1;
define(CHORUSLOOP,[

SAMPLERP  START 5.;
rd mo .2 0 .015/5. .015;
p3 rh 16//-16/16/ (4=8*5)/ 12 // -24/ 24,4/4;
du mo 2.7 1.2 1.1 1.15/ 1.3 303.6/305.5;
  < p4 = new pitch, cps or pch
p4 no ef3/a4// af3/ d4/g/fs5/c/b/ f5/e6// b6/ e2;
   < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
   < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
   < default 0 = max amp { 32767 }
p5  mx 2.5 12000 19000 29000/1.5 12000/1. 7000;
  < p6 - p8  OPTIONAL new envelope : if p6 + p7 = 0, no new envelope created
  < p6 = rise time { > 100 , or negative, = % p3}
p6 nu 0*13/.4;
   < p7 = decay time { > 100 , or negative, = % p3}
p7  mo 2.7 100.3 100.2 100.25/ 1.4 -.33;
  < p8 = optional amplitude multiplier for end of note
  < normal range = ca. .1 - .9 {dim.} or 1.1 - 2. {cresc.}
p8 mx 2.7 .6 .9 1.1 1.3/1.2 .06/1. .5;

  <p9: skip: positive = skip time (seconds) into func, negative = starting phase
p9  nu 0*13/2.;   < skip first 2 seconds of the gong
 < -----  p10,11 & 12: leave blank if using tables 99, 98, 97 & 96 to determine
 < GEN1 function number (source soundfile), its pitch and duration:
       < p10 = gen1 func. # of samples {0 default = func. 1}
   p10  nu 0*13/ 20;  < use gong for last "note"
       <  p11 = pitch of p10 func {cps or pch}
   p11  no bf2;  < used only for the concluding gong
       < p12 = duration of p10 function to be used
   p12   nu 0*13/ 11.54;
 <  ----- optional GLISSANDO { p13-p16} : if p14 + p15 = 0, no glissando -----

 < (unused p-fields 13-28 of the samplerp template omitted here )

< -----  Optional BRIGHTNESS {p30-p32}  --------
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30  mx 2.7 1. 1.4 1.9/1.2 .8/ 1. 0;
   < Optional p31 = closing brightness { if 0, = p30 }
p31 nu 0*12/.05/ 0; 
   < p32 = optional time between p30 & p31; 0 = full dur., > 100 = % full dur.
p32  nu 0*12/100.1/ 0;
   < p33 = detuning {mostly for chorusing} { 1. = 1/2 step, .1 - .13 ord }
p33 DETUNE ;
 < ( unused p-fields 34 & 35 of the samplerp template omitted here )
end;  <<< End of ### samplerp ### score >>>
])dnl
CHORUSLOOP
.DE
.br
\l"7i"
.LP
\f3chorus\f1 command used to create a chorused version of this score for
\f2/snd/pub\f1 soundfile \f2chorus1.snd:\f1
.ce
\f2chorus -r samplerp4 10 0 .007 .016 .021 .029 .033 .039 .044 .049 .055 .01 .12 \f1
.SM
.ce
The \f2ampfac\f1 argument within this chorused score was reduced to .5 
.NL
.LP
\f3chorus\f1 command used to create a chorused version of this score for
\f2/snd/pub\f1 soundfile \f2chorus2.snd:\f1
.ce
\f2chorus -i samplerp4 3   0 1.5 3.   0 2. -2 \f1
.br
.sp .5
\l"7i"
.sp .5
.LP
.LG
.B
Example score samplert4 :
.R
.NL
.LD
< *** bongos : hits (f1 & f2) and rolls (f3 & f4) for sflib bongos 1 & 2 ***
  < single hits:
*f1 0 16384 1  "/snd/sflib/bongo1.snd"  0 0; < original pitch = c. d4
*f2 0 8192 1  "/snd/sflib/bongo2.snd"  0 0; < original pitch = c. f4
   < normal usable pitch range ca. c2 - c5 ; above c5 the timbre becomes
   < metallic, no longer sounding like a bongo, & durations become very short
  < rolls : to use, place a 3 or 4 in samplerp p10 or samplert p4 :
*f3 0 131072 1  "/snd/sflib/bongo1.roll.snd"  0 0; < original pitch = c. d4
*f4 0 65536 1  "/snd/sflib/bongo2.roll.snd"  0 0; < original pitch = c. f4
  < note: pitch transpositions will affect the speed of the rolls
 < f99 : start times
*f99 0 4 -2 0 0 ;
   <f98 durs of the 4 bongo samples:
*f98 0 4 -2 .259 .151 1.175 1.255;
 < f97 : approximate freqs of the bongo samples
*f97 0 4 -2 8.02 8.05 8.02 8.05;
 < f96 PCH split points for reading tables 99,98,97
*f96 0 2 -2 8.035;
  < f95: (1) # of values in f96 | (2) func # 1 | (3) func # 2 |
*f95 0 4 -2 1 0 ; < 2nd arg (0) is a flag, indicating 1 sample tone per sf
<  **** End of BONGO  functions  *****

<   Score file for Library algorithm  ### samplert ###
include(OLIBDIR/Include/gen1tablesizes)

 < Control functions: Required for glissando and/or vibrato
 * f100 0 1024 10 1.;	      < SINE WAVE  required for vibrato
 * f60 0 65 5 .01 64 1.;     < exponential slope, default gliss function for p16
 < Alternate gliss. functions for p16 {remove comment to use } :
  < * f50 0 65 7 0 64 1.;       < linear up
  < * f52 0 65 7 0 32 1. 32 0;  < linear pyramid: up-down
  < * f54 0 65 9 .25 1 0;      < rise (1st quarter of sine wave)
  < * f56 0 65 9 .5 1 0;        < rise & fall (1st half of sine wave)
   * f62 0 65 5 .01 32 1. 32 .01; <exponential pyramid
ifdef([DETUNE],,define(DETUNE,0))dnl
ifdef([START],,define(START,0.000))dnl

ampfac 1;
define(CHORUSLOOP,[

SAMPLERT  START 5;
rd mo .1 0 .02/5. .03;
rs 666;
p3 se 5. .25 .5 .75 1. .33 .67;
du 302.5;
rr .2;  < random rests : throw away 20 % of the notes to vary rhythms
   < p4 = TRANSPOSITION: integer = 1/2 steps up or down {if negative}
   < fraction = microtonal  { Example: -2.5 = whole step + quarter tone down }
p4  se 5.  -6 -3 -2.5 -2  0 3 3.5 4;   
   < p5 = AMPLITUDE: {1} .01 - 1.= multiplier for source soundfile amplitude
   < {2} 100-32767 = new absolute amplitude ; {3} 60 - 90 = new amplitude in dB
   < default 0 = max amp { 32767 }
p5 1. 3000 18000;

  < (unused p-fields 6 - 9 omitted here)

   < p10 = gen1 audio function number
p10  1. 1 2 ;   < use mostly 1 & 2, with an occasional  roll
     se 5. 1 2 3 4;
     1. 1 2;
     1. 1 2;
     1. 1 2;

  < (unused p-fields 11 & 12 omitted here)

 <  ----- optional GLISSANDO { p13-p16} : if p14 + p15 = 0, no glissando -----
   < p13 = 2nd tranposition 
p13   se 5. -4 -1 1 2;
   < p14 = duration for p10 {1st} transposition ( > 100 = % total dur)
p14  0;
     0;
    1. 100.2 100.5;  
   < p15 = duration of glissando{ > 100 = % total dur}
p15    0;
      0;
    1. 100.3 100.5;
   < p16 = glissando  function { default = 60 }
p16  .6 60 60 .4 62 62;

  < (unused p-fields 17 - 26 omitted here)

   < ----- Optional PITCH RANDOM DEVIATION & ATTACK NOISE {p25-p28}  -------
   < p27 = steady state rd % : 0 ok .01 - .03 ord
p27  .7 0 .03 .3 .03 .06;  
   < p28 = rd rate : c. 5. - 20.
p28  1. 4. 8.;  
< ---- Optional BRIGHTNESS {p29-p32} if p30 = 0 brightness filtering is skipped
 < p29 = approx. fundamental pitch {cps or pch} {needed by hi & lo pass filters}
p29  500;
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30 .5 1.9 1.1 .5 .9 .3;
   < Optional p31 = closing brightness { if 0, = p30 }
p31 .5 0 0 .25 1.9 1.5 .25 .8 .1; 
   < p32 = optional time between p30 & p31; 0 = full dur., > 100 = % full dur.
p32 1. 100.3 100.9;
   < p33 = detuning {mostly for chorusing} { 1. = 1/2 step, .1 - .13 ord }
p33 DETUNE ;
  < (unused p-fields 34 & 35 omitted here)
end;  <<< End of ### samplert ### score >>>
])dnl
CHORUSLOOP
.DE
.br
\l"7i"
.LP
\f3chorus\f1 command used to create a chorused version of this score for
\f2/snd/pub\f1 soundfile \f2chorus3.snd:\f1
.ce
\f2chorus -i samplert4 6   0 .75 1.5 2.25 3. 4.   0 -8 4 -12 8 -4 \f1
.PP
Example soundfile \f2chorus4.snd\f1 was created in exactly the same way
as \f2chorus3.snd\f1, except that the \f2rs (reseed)\f1 line within the
chorused score was commented out.
