Debian Codegraph @

examples/FLvalue.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 FLvalue.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Using the opcode flvalue to display the output of a slider
12 sr = 44100
13 kr = 441
14 ksmps = 100
15 nchnls = 1
16
17 FLpanel "Value Display Box", 900, 200, 50, 50
18 ; Width of the value display box in pixels
19 iwidth = 50
20 ; Height of the value display box in pixels
21 iheight = 20
22 ; Distance of the left edge of the value display
23 ; box from the left edge of the panel
24 ix = 65
25 ; Distance of the top edge of the value display
26 ; box from the top edge of the panel
27 iy = 55
28
29 idisp FLvalue "Hertz", iwidth, iheight, ix, iy
30 gkfreq, ihandle FLslider "Frequency", 200, 5000, -1, 5, idisp, 750, 30, 125, 50
31 FLsetVal_i 500, ihandle
32 ; End of panel contents
33 FLpanelEnd
34 ; Run the widget thread!
35 FLrun
36
37 instr 1
38 iamp = 15000
39 ifn = 1
40 asig oscili iamp, gkfreq, ifn
41 out asig
42 endin
43
44
45 </CsInstruments>
46 <CsScore>
47
48 ; Function table that defines a single cycle
49 ; of a sine wave.
50 f 1 0 1024 10 1
51
52 ; Instrument 1 will play a note for 1 hour.
53 i 1 0 3600
54 e
55
56
57 </CsScore>
58 </CsoundSynthesizer>