Debian Codegraph @

examples/veloc.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac -m0d --midi-key-cps=4 -F midiChords.mid
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 </CsOptions>
7 <CsInstruments>
8
9 ; by Menno Knevel - 2021
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 ; midiChords.mid can be found in examples folder
17
18 instr 1
19
20 ivel veloc 0, 1 ;re-scale velocity to 0 - 1
21 print ivel ;print velocity
22 asig vco2 .1*ivel, p4 ;
23 outs asig, asig
24
25 endin
26 </CsInstruments>
27 <CsScore>
28
29 i1 0 35 ;midi file = 35 seconds
30
31 e
32 </CsScore>
33 </CsoundSynthesizer>