Debian Codegraph @

examples/round.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 round.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
17
18 idiv init 1
19
20 loop:
21 inumber = 9
22 i1 = inumber / idiv
23 iro = round(i1)
24 print inumber, idiv, iro ;print number / idiv = result using round
25 idiv = idiv + 1
26 if (idiv <= 10) igoto loop
27
28 endin
29 </CsInstruments>
30 <CsScore>
31
32 i 1 0 0
33 e
34
35 </CsScore>
36 </CsoundSynthesizer>