Debian Codegraph @

examples/signum.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.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by tgrey - 2020
12
13 sr = 44100
14 ksmps = 10
15 nchnls = 2
16 0dbfs = 1
17
18 instr 1
19 iinput = p4
20 isignum = signum(iinput)
21 print iinput
22 print isignum
23 endin
24
25 </CsInstruments>
26 <CsScore>
27 i1 0 .1 100
28 i1 + . 50
29 i1 + . .25
30 i1 + . 0
31 i1 + . -.25
32 i1 + . -50
33 i1 + . -100
34 </CsScore>
35 </CsoundSynthesizer>