COMMENT  LPCPITCH used as a  "harmonizer" :
COMMENT  The orchestra file for this score looks like this:
COMMENT    SETUP(44100,2205,1)
COMMENT    LPCPITCH
COMMENT    SAMP
COMMENT    SF
COMMENT   6 output notes, played in major thirds  by "sf" and "samp" :
<  Instrument "sf" reads in the following sflib soundfiles without alteration:
<      notes 1 & 4:     notes 2 & 5 :      notes3 & 6:
<      string/ vc.p.c3 wind/oboe.d4.lpc  wind/fl.e4.lpc
<  Instrument "samp" plays piano soundfiles. In notes 1 -3, pitch data from lpc
<   analysis files of the soundfile being played by "sf" are passed from LPCPITCH
<   to samp, which transposes this pitch data up a major third and "imposes it" on
<   the piano timbre, resulting in "harmonization" (the piano tones match the
<   pitch inflections of the pizzicato, oboe and flute tones.
<  In notes 4-6, for comparison, no pitch data is passed from LPCPITCH to "samp,"
<  which plays piano soundfiles without altering their pitch.
<  Note the amplitude modifications {p14-16} "samp" adds to the 1st 3 piano tones
< **** 44.1k PIANO functions  ********
*f1 0 0 -1  "/sflib/kb/pn1.bf0.wav" 0 0 0;  < dur = 3.97
*f2 0 0 -1  "/sflib/kb/pn1.d1.wav" 0 0 0;  < dur = 3.94
*f3 0 0 -1  "/sflib/kb/pn1.g1.wav" 0 0 0;  < dur = 3.48
*f4 0 0 -1  "/sflib/kb/pn1.c2.wav" 0 0 0;  < dur = 4.06
*f5 0 0 -1  "/sflib/kb/pn1.f2.wav" 0 0 0;  < dur = 3.46
*f6 0 0 -1  "/sflib/kb/pn1.bf2.wav" 0 0 0;  < dur = 3.72
*f7 0 0 -1  "/sflib/kb/pn1.ef3.wav" 0 0 0;  < dur = 3.4
*f8 0 0 -1  "/sflib/kb/pn1.af3.wav" 0 0 0;  < dur = 3.16
*f9 0 0 -1  "/sflib/kb/pn1.cs4.wav" 0 0 0;  < dur = 2.54
*f10 0 0 -1  "/sflib/kb/pn1.fs4.wav" 0 0 0;  < dur = 3.56
*f11 0 0 -1  "/sflib/kb/pn1.b4.wav" 0 0 0;  < dur =  3.91
*f12 0 0 -1  "/sflib/kb/pn1.e5.wav" 0 0 0;  < dur = 3.29
*f13 0 0 -1  "/sflib/kb/pn1.a5.wav" 0 0 0;  < dur = 2.2
*f14 0 0 -1  "/sflib/kb/pn1.d6.wav" 0 0 0;  < dur = 1.84
*f15 0 0 -1  "/sflib/kb/pn1.g6.wav" 0 0 0;  < dur = 1.8
*f16 0 0 -1  "/sflib/kb/pn1.c7.wav" 0 0 0;  < dur = 1.33
*f17 0 0 -1  "/sflib/kb/pn1.ef7.wav" 0 0 0;  < dur = 1.07
*f18 0 0 -1  "/sflib/kb/pn1.fs7.wav" 0 0 0;  < dur = 1.31
*f19 0 0 -1  "/sflib/kb/pn1.a7.wav" 0 0 0;  < dur = 1.03
*f20 0 0 -1  "/sflib/kb/pn1.c8.wav" 0 0 0;  < dur = 1.04
 
   <; f99 = gen1 funcs & midi note split pts
*f99 0 128 -17 0 1 24 2 29 3 34 4 39 5 43 6 49 7 54 8 59 9 64 10 69 11
 74 12 79 13 84 14 89 15 94 16 98 17 100 18 104 19 107 20;
   <; f98 = midi note nums of samples
*f98 0  32  -2 0 22 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96
 99 102 105 108;
  < ----   End of PN {piano}  functions   -----

< Instrument samp with lpcpitch insert:
* 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 6;              < mono input soundfiles
rd    
p3  nu 2.5//3.5;
du  nu 302.29 / 302.62 / 303.48;
   < p4 = output PITCH : (1) 1. - 13. = pch {notes} ;
   <  (2)  14 - 127 =  MIDI note  number ;  (3) negative = cps {herz}
p4  no e3/fs4/gs4;
   < p5  = AMPLITUDE : (1) .001 - 10 = multplier for input soundfile amplitude
   <   (2) 11 - 32767  new integer amplitude value : Default = 1.
p5  nu .15/.4/ .6/;     
   < p6 = detuning : 1. = 1/2 step up, -1. = 1/2 step down : Default = 0
p6  DETUNE;
  < ----- INPUT SOUNDFILE function number {p7}, pitch {p8} & dur {p9}----
  < If p7 & p8 left blank, these values derived from function tables 99 & 98
p7                                             < 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       
 < 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  nu 0/.01/ .2/ 0 * 3;
   < p15 = decay time { > 100 , or negative, = % p3} : Default = .04
p15 nu .2 ;
  < p16 = optional "atss" amplitude multiplier for end of note : Default = 1.
  < normal range = ca. .1 - .9 {diminuendo} or 1.1 - 2. {crescendo}
p16  nu .3/ 4.0/// 0 * 3;

   < ----- 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     

define([NEWPAR],21)dnl COMMENT PAR1 (first unused p-field) for samp
< lpcpitch : Insert to read in pitch data from an LPC analysis file
include(/usr/local/lib/olib/Include/lpcpitch_defs)
  < functions 96 & 97 are  used only if lpcEndRead is negative (index to tables).
    < 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 ?
 < lp.4 = vc.p.c3 , lp.3 = oboe.d4 , lp.2 = fl.e4
lpcLink  nu 4 / 3 / 2 ;               < number of lp.# link file
lpcBegRead                            < time in lp.# file to begin pitch read
lpcEndRead                            < time in lp.# file to end pitch read
 < lpcPitchFlag = flag field; if 0, lpcPitchTransp = multiplier for LPC file pitch data
 < if lpcPitchFlag = 1,lpcPitchTransp = semitone (int.) & microtone (frac.) transposition
 < if lpcPitchFlag = -1, LPC pitch data is not used; internal p4 pitch used instead
lpcPitchFlag    nu 1 * 3 / -1 * 3;           < 0, 1, or -1
lpcPitchTransp  nu 4 * 6;
< User-added parameters:
end;   <<<<end of score>>>>>>>>>>>>>
])dnl
CHORUSLOOP

<   Score file for Library algorithm  ### sf ###
 <  optional functions if tables used: f98 = table of soundin. numbers,
 < f99 = table of durations ; to use, remove comments, edit & complete
< *f98 0 size -2 soundin.numbers
< *f99 0 size -2 durations
SF 0 0 6;    < mono input, default mono output
p3  nu 2.5//3.5;
du  nu 302.29 / 302.62 / 303.48;
     < p4 = soundin.#, or, if negative, index to function tables 98 & 99
p4  nu 4/3/2; < vc.p.c3 , oboe.d4 , fl.e4
  < OPTIONAL p-fields (p5 - p8): p5 = amplitude multiplier
p5  nu .6/.25//;     
  < p6 = duration skipped from front of soundfile
p6  
  <  p7 = fade-in time : if negative or between 100.0 & 101. = % p3
p7   
  <  p8 = fade-out time : if negative or between 100.0 & 101. = % p3
p8   
  <  Added user p-fields: 
end;  <<< End of ### sf ### score >>>
