Debian Codegraph @

examples/FLknob.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 FLknob.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; A sine with oscillator with flknob controlled frequency
12 sr = 44100
13 kr = 441
14 ksmps = 100
15 nchnls = 1
16
17 FLpanel "Frequency Knob", 900, 400, 50, 50
18 ; Minimum value output by the knob
19 imin = 200
20 ; Maximum value output by the knob
21 imax = 5000
22 ; Logarithmic type knob selected
23 iexp = -1
24 ; Knob graphic type (1=3D knob)
25 itype = 1
26 ; Display handle (-1=not used)
27 idisp = -1
28 ; Width of the knob in pixels
29 iwidth = 70
30 ; Distance of the left edge of the knob
31 ; from the left edge of the panel
32 ix = 70
33 ; Distance of the top edge of the knob
34 ; from the top of the panel
35 iy = 125
36
37 gkfreq, ihandle FLknob "Frequency", imin, imax, iexp, itype, idisp, iwidth, ix, iy
38 ; End of panel contents
39 FLpanelEnd
40 ; Run the widget thread!
41 FLrun
42
43 ; Set the widget's initial value
44 FLsetVal_i 300, ihandle
45
46 instr 1
47 iamp = 15000
48 ifn = 1
49 asig oscili iamp, gkfreq, ifn
50 out asig
51 endin
52
53
54 </CsInstruments>
55 <CsScore>
56
57 ; Function table that defines a single cycle
58 ; of a sine wave.
59 f 1 0 1024 10 1
60
61 ; Instrument 1 will play a note for 1 hour.
62 i 1 0 3600
63 e
64
65
66 </CsScore>
67 </CsoundSynthesizer>