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