Debian Codegraph @

examples/FLtabs.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 FLtabs.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; A single oscillator with frequency, amplitude and
12 ; panning controls on separate file tab cards
13 sr = 44100
14 kr = 441
15 ksmps = 100
16 nchnls = 2
17
18 FLpanel "Tabs", 300, 350, 100, 100
19 itabswidth = 280
20 itabsheight = 330
21 ix = 5
22 iy = 5
23 FLtabs itabswidth,itabsheight, ix,iy
24
25 itab1width = 280
26 itab1height = 300
27 itab1x = 10
28 itab1y = 40
29 FLgroup "Tab 1", itab1width, itab1height, itab1x, itab1y
30 gkfreq, i1 FLknob "Frequency", 200, 5000, -1, 1, -1, 70, 70, 130
31 FLsetVal_i 400, i1
32 FLgroupEnd
33
34 itab2width = 280
35 itab2height = 300
36 itab2x = 10
37 itab2y = 40
38 FLgroup "Tab 2", itab2width, itab2height, itab2x, itab2y
39 gkamp, i2 FLknob "Amplitude", 0, 15000, 0, 1, -1, 70, 70, 130
40 FLsetVal_i 15000, i2
41 FLgroupEnd
42
43 itab3width = 280
44 itab3height = 300
45 itab3x = 10
46 itab3y = 40
47 FLgroup "Tab 3", itab3width, itab3height, itab3x, itab3y
48 gkpan, i3 FLknob "Pan position", 0, 1, 0, 1, -1, 70, 70, 130
49 FLsetVal_i 0.5, i3
50 FLgroupEnd
51 FLtabsEnd
52 FLpanelEnd
53 ; Run the widget thread!
54 FLrun
55
56 instr 1
57 ifn = 1
58 asig oscili gkamp, gkfreq, ifn
59 outs asig*(1-gkpan), asig*gkpan
60 endin
61
62
63 </CsInstruments>
64 <CsScore>
65
66 ; Function table that defines a single cycle
67 ; of a sine wave.
68 f 1 0 1024 10 1
69
70 ; Instrument 1 will play a note for 1 hour.
71 i 1 0 3600
72 e
73
74
75 </CsScore>
76 </CsoundSynthesizer>