Debian Codegraph @

examples/miditempo.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -F Anna.mid ;;;realtime audio out and midi file input
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o miditempo.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 massign 0, 1 ; make sure that all channels
17 pgmassign 0, 1 ; and programs are assigned to test instr
18
19 instr 1
20
21 ksig miditempo
22 prints "miditempo = %d\\n", ksig
23
24 icps cpsmidi ; convert midi note to pitch
25 kenv madsr 0.1, 0, 0.8, 0.3
26 asig pluck kenv*.15, icps, icps, 1, 1 ;low volume
27 outs asig, asig
28
29 endin
30 </CsInstruments>
31 <CsScore>
32
33 f 0 200 ;stay active for 120 seconds
34 f 1 0 4096 10 1 ;sine
35
36 e
37 </CsScore>
38 </CsoundSynthesizer>