<CsoundSynthesizer>
<CsOptions>
-+rtaudio=alsa	; On Linux use ALSA kernel sound driver 
;-o dac
;-o PytEAE.wav --format=wav ; for file output in WAV format
-o PytEAE.ogg --ogg	; for file output in OGG format
</CsOptions>

<CsInstruments>
; Orchestra:
; + defaults:
kr = 4410
ksmps = 10
sr = 44100
nchnls = 2	; stereo
0dbfs = 1 	; normalized

instr 1, sine
; play a single note as pure sine wave
iDur=p3-p2	; duration of note
iFreq=p4	; base frequency
iNote=p5	; ratio for note in ladder
iAmp=0.25
; ADSR envelope parameters:
iAtt=0.1
iDec=0.2
iSus=0.7
iRel=0.2
kEnv adsr iAtt, iDec, iSus, iRel
aSig oscils iAmp, iFreq*iNote, 0, 0
aSig*=kEnv
outs aSig, aSig
endin

</CsInstruments>

<CsScore>
; Pythagorean scale, descending, centered on A
i 1   0    1 440 [3/2]
i 1 ^+1.0 .  .   [4/3]
i 1 ^+1.0 .  .   [32/27]
i 1 ^+1.0 .  .   [9/8]
i 1 ^+1.0 .  .   [1/1]
i 1 ^+1.0 .  .   [8/9]
i 1 ^+1.0 .  .   [64/81]
i 1 ^+1.0 .  .   [3/4]

</CsScore>
</CsoundSynthesizer>