<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>

sr 		= 44100
kr		= 4410
ksmps		= 10
nchnls	= 2

	instr 1
iamp			=	p4			; droning sample playback instrument, builds a bed
ifrq			=	cpspch(p5)
iatt			=	p6
idec			=	p7
isus			=	p8
irel			=	p9
kadsr		adsr		iatt, idec, isus, irel
asamp		loscil	kadsr*iamp, ifrq, 2
		outs		asamp, asamp
	endin

	instr	2
idur			=	p3			; distorted oscillator ratio instrument w/ "harmonic" panning
iamp			=	ampdb(p4)
ifrq			=	cpspch(p5)
ifun			=	p6
iatk			=	p7
irel			=	p8
iatkfun		=	p9
iampfctr		=	p10
idenom		=	p11
imodfun		=	p12
ipanfrq		=	p13
kdistswp	line		2, 5, 0.00000001
kenv		envlpx	iamp, iatk, idur, irel, iatkfun, .7, .01
klfpan	oscil		.5, ipanfrq, 1
kpanlfo		=	klfpan+.5
klfo		oscil		iampfctr, idenom, imodfun
asrc		oscil		klfo, ifrq, ifun
adist		distort	asrc, kdistswp, 1
     		outs  	(adist*kenv)*kpanlfo, (adist*kenv)*(1-kpanlfo)
	endin

	instr	3
idur			=	p3			; mimicking pluck/fm combo instrument, quiet
iamp			=	ampdb(p4)
ifrq			=	cpspch(p5)
ifun			=	p6
iatk			=	p7
irel			=	p8
iatkfun		=	p9
index1		=	p10
index2		=	p11
icar			=	p12
imod			=	p13
kmodswp	expon		index1, idur, index2
kadsr		adsr		.001,	0, 1, 3
kenv		envlpx	ampdb(30), iatk, idur, irel, iatkfun, .7, .01
afm		foscil	kenv, ifrq, icar, imod, kmodswp, ifun
aplk		pluck		kadsr*500, ifrq*2, ifrq, 1, 1
amix			=	afm+aplk
		outs	amix, amix
	endin

</CsInstruments>
<CsScore>
; sine-wave f-table of 8192 samples (as recommended by buzz opcode help)
f1 0 8192 10 1
; load in sample "vss_drone.aif" for use in grain
f2 0 0 1 "vss_drone.aif" 0 4 0
; f3 (copied from Etude 4) uses the GEN05 subroutine to compute an exponential Attack for use with envlpx
f3 0 513 5 .001 128 .8 128 .6 256 1
; f4 (copied from Etude 4) is another exponential attack shape used within an internal lfo
f4 0 513 7 0 10 1 502 0

;ins	str	dur	amp	ptch	att	dec	sus	rel
;=================================================
i1	0	65	5000	6.04	.001	.5	.9	5
i1	10	55	3000	7.04	10	.5	.9	5
i1	30	35	3000	8.04	20	.5	.9	5

;ins	strt	dur  amp	frq  fn	atk	rel	atkfun	ampfctr	denom		modfun	panfrq
;==================================================================================================
i2	0	70	70	7.00	1	.01	3	3		1		2		4		.25
i2	15.8	24.2	.	8.04	.	.	.	.		1.3		3		.		.5
i2	20	20	.	8.02	.	.	.	.		1		5		.		.3
i2	24	26	.	7.11	.	.	.	.		.8		4		.		.6
i2	30	30	.	7.07	.	.	.	.		.		.		.		.5
i2	30	30	.	8.00	.	.	.	.		.6		.		.		.
i2	30	30	.	8.04	.	.	.	.		.		.		.		.
i2	42	6	.	8.06	.	.	.	.		.4		3		.		.
i2	48	6	.	8.09	.	.	.	.		.6		6		.		.
i2	54	16	.	6.00	.	.	.	.		2		.5		.		.125	

;ins	strt	dur	amp	frq	fn	atk	rel	atkfun	indx1		indx2		car	mod
;=========================================================================================
i3	0	10	40	7.00	1	.01	3	3		1		20		6	2
i3	15.8	.	.	8.04	.	.	.	.		20		1		4	3
i3	20	.	.	8.02	.	.	.	.		1		20		7	3
i3	24	.	.	7.11	.	.	.	.		20		1		4	1
i3	30	.	.	7.07	.	.	.	.		1		5		8	7
i3	30	.	.	8.00	.	.	.	.		5		1		1	6
i3	30	.	.	8.04	.	.	.	.		1		5		6	1
i3	42	.	.	8.06	.	.	.	.		5		3		1	4
i3	48	.	.	8.09	.	.	.	.		1		2		1	2
i3	54	.	.	6.00	.	.	.	.		.		.		.	.

e
</CsScore>
</CsoundSynthesizer>
<MacOptions>
Version: 3
Render: Real
Ask: Yes
Functions: ioObject
Listing: Window
WindowBounds: 773 381 667 184
CurrentView: io
IOViewEdit: On
Options: -b128 -A -s -m167 -R
</MacOptions>
<MacGUI>
ioView background {32125, 41634, 41120}
ioGraph {8, 4} {350, 150} scope 2.000000 -1.000000 
</MacGUI>

