Debian Codegraph @

src/Examples/FLOSS Manual Examples/05 Sound Modification/05A09_sine_env.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -odac
4 </CsOptions>
5 <CsInstruments>
6 sr = 44100
7 ksmps = 32
8 nchnls = 2
9 0dbfs = 1
10
11 giEnv ftgen 0, 0, 2^12, 9, 0.5, 1, 0 ; envelope shape: a half sine
12
13 instr 1
14 ; read the envelope once during the note's duration:
15 aEnv poscil .5, 1/p3, giEnv
16 aSig poscil aEnv, 500 ; audio oscillator
17 out aSig, aSig ; audio sent to output
18 endin
19
20 </CsInstruments>
21 <CsScore>
22 ; 7 notes, increasingly short
23 i 1 0 2
24 i 1 2 1
25 i 1 3 0.5
26 i 1 4 0.25
27 i 1 5 0.125
28 i 1 6 0.0625
29 i 1 7 0.03125
30 e 7.1
31 </CsScore>
32 </CsoundSynthesizer>
33 ;example by Iain McCurdy