| 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 |
sr = 44100 |
| 12 |
kr = 441 |
| 13 |
ksmps = 100 |
| 14 |
nchnls = 1 |
| 15 |
|
| 16 |
;By Andres Cabrera 2007 |
| 17 |
FLpanel "Knob Types", 330, 230, 50, 50 |
| 18 |
; Distance of the left edge of the knob |
| 19 |
; from the left edge of the panel |
| 20 |
ix = 20 |
| 21 |
; Distance of the top edge of the knob |
| 22 |
; from the top of the panel |
| 23 |
iy = 20 |
| 24 |
|
| 25 |
;Create boxes that display a widget's value |
| 26 |
ihandleA FLvalue "A", 60, 20, ix + 130, iy + 110 |
| 27 |
ihandleB FLvalue "B", 60, 20, ix + 220, iy + 110 |
| 28 |
ihandleC FLvalue "C", 60, 20, ix + 130, iy + 160 |
| 29 |
ihandleD FLvalue "D", 60, 20, ix + 220, iy + 160 |
| 30 |
|
| 31 |
; The foru types of FLknobs |
| 32 |
gkdummy1, ihandle1 FLknob "Type 1", 200, 5000, -1, 1, ihandleA, 70, ix, iy, 90 |
| 33 |
gkdummy2, ihandle2 FLknob "Type 2", 200, 5000, -1, 2, ihandleB, 70, ix + 100, iy |
| 34 |
gkdummy3, ihandle3 FLknob "Type 3", 200, 5000, -1, 3, ihandleC, 70, ix + 200, iy |
| 35 |
gkdummy4, ihandle4 FLknob "Type 4", 200, 5000, -1, 4, ihandleD, 70, ix , iy + 100 |
| 36 |
; End of panel contents |
| 37 |
FLpanelEnd |
| 38 |
; Run the widget thread! |
| 39 |
FLrun |
| 40 |
|
| 41 |
; Set the color of widgets |
| 42 |
FLsetColor 20, 23, 100, ihandle1 |
| 43 |
FLsetColor 0, 123, 100, ihandle2 |
| 44 |
FLsetColor 180, 23, 12, ihandle3 |
| 45 |
FLsetColor 10, 230, 0, ihandle4 |
| 46 |
|
| 47 |
FLsetColor2 200, 230, 0, ihandle1 |
| 48 |
FLsetColor2 200,0 ,123 , ihandle2 |
| 49 |
FLsetColor2 180, 180, 100, ihandle3 |
| 50 |
FLsetColor2 180, 23, 12, ihandle4 |
| 51 |
|
| 52 |
|
| 53 |
; Set the initial value of the widget |
| 54 |
FLsetVal_i 300, ihandle1 |
| 55 |
FLsetVal_i 1000, ihandle2 |
| 56 |
|
| 57 |
|
| 58 |
instr 1 |
| 59 |
; Nothing here for now |
| 60 |
endin |
| 61 |
|
| 62 |
|
| 63 |
</CsInstruments> |
| 64 |
<CsScore> |
| 65 |
|
| 66 |
f 0 3600 ;Dumy table to make csound wait for realtime events |
| 67 |
|
| 68 |
e |
| 69 |
|
| 70 |
|
| 71 |
</CsScore> |
| 72 |
</CsoundSynthesizer> |