< Instrument carillon with gxsynpitch insert
COMMENT  "joan.gf4" pitch data from gxsyn is passed to carillon and transposed
COMMENT into a 6-note chord, which is cross-synthesized against the original
COMMENT formants of "joan.gf4".  Note how the original soprano note, though 
COMMENT not synthesized at the orignal pitch, predominates, since the resonances
COMMENT  supplied by gxsyn reinforce this pitch
COMMENT the orchestra for this score is:
	COMMENT		SETUP(22050,2205,1)
	COMMENT		USEPTGX
	COMMENT		GLOBALS
	COMMENT		CARILLON
	COMMENT		GXSYN
< Functions needed: 61 100                               
* f61 0 65 5 1. 64 .01;	               <expo. down
* f100 0 1024 10 1.;			< SINE WAVE

CARILLON 0 0 6;
p3 1. .005 .008;
du 305.8;
p4 no fs3/ b/ e4/ a/ ds5/ gs; <these are the chord notes, but pitches are
                         < derived from PTGXFLAG and PTGXTRANSP, not from here
am 1.2;
p5 nu 4000/ 3500/ 3000/ 3400/ 3800/ 4800; < trying to balance the chord here
p6 1. .02 .03;         <Attack time: c. .006-.02 ord
p7 .7;                 < Attack hardness: 1. ord; range:.7-1.5
p8 nu 1.2/ 1.1/ 1./ .9/ 1./ 1.4; < Brightness: 1. ord; range:.4-1.5
p9 .001;                         < % tremolo (.06 ord)
p10  2;                          < Tremolo rate (c. 5.)
p11           < a detuning p-field generally used only in chorused scores
define([NEWPAR],12)dnl COMMENT PAR1 (first unused p-field) for carillon
include(/usr/local/lib/olib/Include/lpcpitch_defs)
< GXSYNPITCH : passes pitch data from gxsyn to this driver instrument
 < gxsynPitchFlag = flag field; if 0, gxsynPitchTransp = multiplier for LPC pitch data
 < if gxsynPitchFlag = 1,gxsynPitchTransp = semitone (int.) & microtone (frac.) transposition
 < if gxsynPitchFlag = -1, LPC pitch data is not used; internal p4 pitch used instead
 < if gxsynPitchFlag = 2,gxsynPitchTransp ignored;pitch transp. = formant transp.(PAR5 & PAR6)
gxsynPitchFlag  1;                                < 0, 1, 2, or -1
gxsynPitchTransp  nu -12/ -7 / -2 / 3 / 9 / 14;     
end;  <<< End of ### carillon ### score with gxsynpitch appendage>>>
< G_Y_X_S_Y_N : global instrument for linear-predictor cross synthesis processing
define([NEWPAR],4)dnl COMMENT PAR1 (first unused p-field) for gxsyn
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 

instr gxsyn  0 0 1;
p3  5.8;
du  1;  < original duration of sopranoGf4 used (no time warping)
PAR1 9;           < link file lp.9 points to /sflib/anal/lpc/22joan.gf4.lpc
  < PAR2 = time in orig. soundfile to BEGIN reading
PAR2
  < PAR3 = time in orig. soundfile to END reading;if neg. = index to f96 & f97
PAR3
<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 < no formant transp. < Flag : 0,1 or 2
PAR5                     < formant multiplier or transposition
    < BRIGHTNESS : PAR6 & PAR7  ; if PAR6 = 0 no change
    < if PAR6 = 1, LPC pitch data is used for filter center freq.;
    <  any other PAR6 value = new filter center freq. in cps or pch
PAR6 1;
  < PAR7 :  brightness modifier: range -1. (least bright) to +1. (brightest)
PAR7 .6;  < brighten
    < 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                     < amplitude multiplier
PAR11                     < fade-in time
PAR12                     < fade-out time
    < PAR13 : Attack hardness : if PAR13 = 0, no change . Range is -1.
    < (greatest smoothing of attack) to +1. (hardest attack)
PAR13  .8;
end;
