Debian Codegraph @

examples/musical/Signum_Welsh.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o Signum_Welsh.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10 sr = 44100
11 ksmps = 32
12 nchnls = 2
13 0dbfs = 1
14
15 ; by tgrey - 2020
16
17 instr 1
18 iFreq = p4
19 iMode = p5
20
21 ; generate a sine lfo @5hz
22 kMod lfo 1, 5
23
24 ; if p5 is non-zero, take the negative/positive sign of the lfo
25 ; this squares off the lfo!
26 if(iMode!=0) then
27 kMod signum kMod
28 endif
29
30 ; gerate signal with modulation included
31 aSig poscil kMod, iFreq
32
33 outs aSig, aSig
34 endin
35
36 </CsInstruments>
37 <CsScore>
38 i1 0 .5 440 0
39 i1 + . 550 0
40 i1 + . 660 1 ; this event gets "squared" modulation due to non-zero p5
41 </CsScore>
42 </CsoundSynthesizer>