Debian Codegraph @

examples/pchbend.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -Q1 -Ma ;;;realtime audio out and midi in (on all inputs) and out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o pchbend.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 instr 1 ;use external midi keyboard
17
18 icps cpsmidi
19 kbnd pchbend 0, 100 ;one octave lower and higher
20 kenv linsegr 0,.001, 1, .1, 0 ;amplitude envelope
21 asig pluck .8 * kenv, icps+kbnd, 440, 0, 1
22 outs asig, asig
23
24 endin
25 </CsInstruments>
26 <CsScore>
27
28 f 0 30 ;runs 30 seconds
29
30 </CsScore>
31 </CsoundSynthesizer>