;------------------------------;
; Pinkston Delay Instruments 4 ;
;------------------------------;

sr	=	22050
kr	=	2205
ksmps	=	10
nchnls	=	2

	instr	4		;vdelay vibrato
icps	=	cpspch(p5)	;basic pitch
ilfohz	=	p6		;LFO rate in cps
idelfac	=	p7		;between 0 & .999
imaxdel	=	p8		;max delay in secs
ilfoamp	=	idelfac*imaxdel/2	;lfo fn is +/- 1
kgate	linen	p4,.1,p3,.2	;basic note envlp
avardel	oscili	ilfoamp,ilfohz,1	;fn1 is LFO wave
asig	oscili	kgate,icps,2	;fn2 is Osc wave
adelay	=	imaxdel/2+avardel	;offset to .5 max
aout	vdelay	asig,adelay,imaxdel	;varying delay
	outs	aout,aout	
	endin					
	


;Sample Score for Pinkston Delay Chapter Instrument 4
;LFO wave is a sine								
f01	0	512	10	1				
;Oscil wave								
f02	0	512	10	1	.5	.3	.2	.1
;LFO depth factor is .9, gradually increase max delay time
;	st	dur	amp	pch	lfohz	depth	maxdlt	
i4	0	3	10000	8.00	5	.9	1	
i4	+	.	.	.	.	.	2	
i4	+	.	.	.	.	.	3	
i4	+	.	.	.	.	.	4	
e		


Download delins4.orc

Download delins4.sco