Debian Codegraph @

examples/FLcount.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o FLcount.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Demonstration of the flcount opcode
12 ; clicking on the single arrow buttons
13 ; increments the oscillator in semitone steps
14 ; clicking on the double arrow buttons
15 ; increments the oscillator in octave steps
16 sr = 44100
17 kr = 441
18 ksmps = 100
19 nchnls = 1
20
21 FLpanel "Counter", 900, 400, 50, 50
22 ; Minimum value output by counter
23 imin = 6
24 ; Maximum value output by counter
25 imax = 12
26 ; Single arrow step size (semitones)
27 istep1 = 1/12
28 ; Double arrow step size (octave)
29 istep2 = 1
30 ; Counter type (1=double arrow counter)
31 itype = 1
32 ; Width of the counter in pixels
33 iwidth = 200
34 ; Height of the counter in pixels
35 iheight = 30
36 ; Distance of the left edge of the counter
37 ; from the left edge of the panel
38 ix = 50
39 ; Distance of the top edge of the counter
40 ; from the top edge of the panel
41 iy = 50
42 ; Score event type (-1=ignored)
43 iopcode = -1
44
45 gkoct, ihandle FLcount "pitch in oct format", imin, imax, istep1, istep2, itype, iwidth, iheight, ix, iy, iopcode, 1, 0, 1
46 ; End of panel contents
47 FLpanelEnd
48 ; Run the widget thread!
49 FLrun
50
51 instr 1
52 iamp = 15000
53 ifn = 1
54 asig oscili iamp, cpsoct(gkoct), ifn
55 out asig
56 endin
57
58
59 </CsInstruments>
60 <CsScore>
61
62 ; Function table that defines a single cycle
63 ; of a sine wave.
64 f 1 0 1024 10 1
65
66 ; Instrument 1 will play a note for 1 hour.
67 i 1 0 3600
68 e
69
70
71 </CsScore>
72 </CsoundSynthesizer>