Debian Codegraph @

examples/faustplay.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 -d -odac
4 </CsOptions>
5 <CsInstruments>
6 nchnls= 1
7
8 giph faustcompile {{
9 SR = 44100;
10 decimal(a) = a - floor(a);
11 freq = hslider("freq", 0, -20000, 20000, 1);
12 incr(fr) = fr / float(SR);
13 phasor(fr,ph) = incr(fr) : (+ : decimal) ~ _ :
14 +(ph) : decimal;
15 process = phasor(freq,0);
16 }}, "-vec -lv 1"
17
18 instr 1
19 kb1 = p5
20 ib faustdsp giph
21 faustctl ib,"freq",kb1
22 asig faustplay ib
23 out sin(2*$M_PI*asig)*p4*0dbfs
24 endin
25
26
27 </CsInstruments>
28 <CsScore>
29 i1 0 1 0.5 150
30 </CsScore>
31 </CsoundSynthesizer>
32
33