< Library score example: pt2
< pitch data from the LPC  analysis of joan.gf4 is passed to a home-made
< fm instrument
< the LPC pitch data is ignored for the opening 4 "grace" notes (where the pitch
< comes from p4). The LPC pitch data is transposed for notes 5 - 9.
 COMMENT	The orchestra for this score looks like this:
 COMMENT	define([NEWPAR],8)dnl
 COMMENT	SETUP(22050,2205,1)
 COMMENT	instr 1
 COMMENT kampenv expseg 1,.1*p3,p5,.5*p3,.6*p5,.4*p3,1 ; amplitude envelope
 COMMENT kfmenv expseg 2*p7,.2*p3,p7,.5*p3,.6*p7,.3*p3,.1
 COMMENT	INSERT(lpcpitch)
 COMMENT       	; N.B. the macro lpcPitchFlag can only be used AFTER the line above
 COMMENT	   ; (which defines lpcPitchFlag to be p11 in this orchestra)
 COMMENT	if lpcPitchFlag != -1 goto ready  ; when lpcPitchFlag = -1 pitch is defined
 COMMENT	   kpitch = cpspch(p4)     ; here, and LPC pitch data is ignored
 COMMENT	ready:
 COMMENT	a1 foscili kampenv, kpitch, 1, p6, kfmenv, 1
 COMMENT	out a1
 COMMENT	endin

define([NEWPAR],8)dnl
*f1 0 1024 10 1.;

i1 0 0 9;
p3 rh 64*4/ 2/ 32// 16,4./ 8;
du nu 300.2*3/ 301.2/ 308/ 300.2/ 300.25/ 302./ 307.;
p4 no d7/ cs6/ c4/ ef1;      < p4 = internal pitch generation, used here
                     < only for the 1st 4 "grace" notes (when lpcPitchFlag = -1)
p5 nu 2000*3/ 3500/ 4000/ 9000/ 13000/ 7000/ 6000;     < amplitude
p6 nu 1.7*3/ 5.4/ 2.003/ 5.4/ 7.2/ 2.7/ .998;           < c:m ratio
p7 nu .5/ 1./ 2./ 2.5/ .3/ 2./ 3./ 1.2/ .3;             < fm index

< lpcpitch : Insert to read in pitch data from LPC analysis file:
include(CSLIBDIR/Include/lpcpitch_defs)
  < functions 96 & 97 are  used only if PTENDREAD 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 
lpcLink 9;  < link file lp.9 points to /sflib/anal/lpc/22joan.gf4.lpc
lpcBegRead  nu 0*4/ 5.8/ 1./2./5.8/0;     < time in lp.m file to begin pitch read
lpcEndRead nu 0*4/ .01/ 1.3/ 2.1/ .01/5.79; < time in lp.m file to end pitch read
 < lpcPitchFlag = flag field; if 0, lpcPitchTransp = multiplier for LPC 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*4/1*5;     < ptrack data not used for 1st 4 notes,IS used for
lpcPitchTransp  nu 0*4/ 1/ 15/ -12/ 25/ 4;  < the last five notes, with transpositions
< User-added parameters:
end;   <<<<end of score>>>>>>>>>>>>>

