   < the driver soundfile is a piano tone {pn.ef3.wav  from /sflib/string}
   < the lpc analysis files for the 5 output notes, all located in
   <  /sflib/anal/lpc are :
    < note 1: sop1.e4.lpc  { a soprano tone}
    < note 2: fl.e4.lpc {a flute tone}
    < note 3: oboe.d4.lpc  {an oboe tone}
    < note 4: sdrum1.broll.lpc  { snare drum roll with wire brushes}
    < note 5: vc.p.c3  { a cello pizzicato tone}
 < the cross-synthesis for all of these notes is straightforward, with
 < almost no modifications to either the driver signal {other than pitch 
 < transpositions on the last 4 notes} or to the analysis data

<   Score file for Library algorithm  ### samplerpxsyn ###
include(CSLIBDIR/Include/gen1tablesizes)
define(NEWPAR,36)dnl

*f1 0 262144 1 "/sflib/string/pn.ef3.wav"  0 0; < the driver

 < 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


SAMPLERP  START 0 5;
rd 
p3 nu  3.5 * 3/ 2.2/ 1.;
du nu 302.8* 3/  301.4/ 301;
  < p4 = new output pitch, cps or pch
p4  no ef3 / d3 / f3 / e3/ a2; 
   < 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  .5;    
  < 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  
  < p8 = optional amplitude multiplier for end of note
  < normal range = ca. .1 - .9 {dim.} or 1.1 - 2. {cresc.}
p8

  <p9: skip: positive = skip time (seconds) into func, negative = starting phase
p9 .2 ;  < skip off attack of piano tone
 < -----  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 function {cps or pch}
   p11   no ef3;     
       < p12 = duration of p10 function to be used
   p12   3.402;
 <  ----- optional GLISSANDO { p13-p16} : if p14 + p15 = 0, no glissando -----
   < p13 = 2nd pitch {pch or cps} 0 = no gliss
p13  
   < p14 = duration for p4 pitch ( > 100 = % total dur)
p14    
   < p15 = duration of glissando{ > 100 = % total dur}
p15    
   < p16 = glissando  function { default = 60 }
p16  
  < ----- Optional VIBRATO {p17-p24} : if p17+p19+p20 = 0, no vib. ------
   < p17 = initial vibrato rate
p17   
   < p18 = time between p17 & p19 { >100 = % idur}
p18   
   < p19 = 2nd vibrato rate
p19   
   < p20 = final {3rd}  vibrato rate
p20   
   < p21 = initial vibrato depth { .01-.04 ord}
p21    
   < p22 = vibrato depth 2
p22   
    < p23 = closing {3rd}  vibrato depth
p23  
    < p24 vibrato random deviation  : .2 - .4 ord
p24  
   < ----- Note: samplerp PITCH RANDOM DEVIATION & ATTACK NOISE {p25-p28} currently
   < cannot be used with samplerpxsyn

< -----  Optional BRIGHTNESS {p30-p32}  --------
 < p30 = brightness : 0 = bypass brightness filtering; 1. = ord, range = .001-2.
p30  
   < Optional p31 = closing brightness { if 0, = p30 }
p31  
   < p32 = optional time between p30 & p31; 0 = full dur., > 100 = % full dur.
p32 
   < 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
    < if p4 of your GEN1 function is >> -1 << rather than << 1 >> {normalization
    < of the soundfile is skipped}, place a >> -1 << flag in p35 below:
  p35
< XSYN POST-PROCESSING:
include(CSLIBDIR/Include/pfields.h)
    < functions 96 & 97 are optional, if tables are used for begin & end times
    < f96 specifies times to begin reading lp.m; start with 2nd location
    < f97 specifies times to end reading lp.m ; start with 2nd location
< *f96 0 size -2 0 
< *f97 0 size -2 0 

< anal files are: sop1.fs4 / fl.e4 / oboe.d4 / sdrum1.broll / vc.p.c3
PAR1  nu 1 / 5 / 6 /  7 / 8;          < lp.m number
  < PAR2 = time in orig. soundfile to BEGIN reading
PAR2
 < PAR3 = time in orig. soundfile to END reading;if neg. = index to f96 & f97
< only 3" of soprano analysis is used {note 1} to avoid overly rapid vibrato
 < full analysis duration is used for last 4 notes
PAR3 nu 3.0/  3.47/  2.62/ 1.63 / 2.28; 
<OPTIONAL PARAMETERS :PAR4 through PAR13 (any of these fields can be left blank)
    < PAR4 & PAR5 : TRANSPOSITION of FORMANTS; if PAR4 = 0 no change
    < if PAR4 = 1, PAR5 = multiplier ; if PAR4 = 2, PAR5 = semitone 
    < (integer portion) and/or microtonal (fractrional portion) transposition
PAR4                     < Flag : 0,1 or 2
PAR5                     < formant multiplier or transposition
    < BRIGHTNESS : PAR6 & PAR7  ; if PAR6 = 0 no change
    < if PAR6 = 1, ptrack pitch used for filter center freq.;
    <  any other PAR6 value = new filter center freq. in cps or pch
PAR6
  < PAR7 :  brightness modifier: range -1. (least bright) to +1. (brightest)
PAR7                    
    < PAR8 : Add White noise : if PAR8 = 0, no noise added; if positive
    < between .001 & 1., specifies constant noise % added; if negative
    < (e.g. -.01), specifies MINIMUM % noise added
PAR8 
< Amplitude : PAR9 through PAR12
    < Envelope: if PAR9 = 0, lp.m file envelope used ;if PAR9 = -1,
    < internal mix of lp.m file & driver envelopes ; if PAR9 is between .001
    < and +1., a mix of the driver & lp.mfile envelopes is done, with PAR9
    < specifying the % of driver envelope
PAR9 
PAR10 nu .5/ .6 // .8/ .95;  < amplitude multiplier
PAR11                     < fade-in time
 < fade out 11st note, when only a portion of the soprano analysis file used
PAR12 nu .2/ 0*5;          < fade-out time
    < PAR13 : Attack hardness : if PAR13 = 0, no change . Range is -1.
    < (greatest smoothing of attack) to +1. (hardest attack)
PAR13 
  <  Added user p-fields: 
end;  <<< End of ### samplerpxsyn ### score >>>
