| 1 |
<CsoundSynthesizer> |
| 2 |
<CsOptions> |
| 3 |
; Select audio/midi flags here according to platform |
| 4 |
; Audio out Audio in |
| 5 |
-odac -iadc ;;;RT audio I/O |
| 6 |
</CsOptions> |
| 7 |
<CsInstruments> |
| 8 |
|
| 9 |
sr=48000 |
| 10 |
ksmps=128 |
| 11 |
nchnls=2 |
| 12 |
|
| 13 |
; Example by Hector Centeno and Andres Cabrera 2007 |
| 14 |
|
| 15 |
; giSWMtab4 ftgen 0, 0, 513, 21, 10, 1, .3 |
| 16 |
; giSWMtab4M ftgen 0, 0, 64, 7, 1, 50, 1 |
| 17 |
|
| 18 |
FLpanel "Snapshots", 530, 190, 40, 410, 3 |
| 19 |
FLcolor 100, 118 ,140 |
| 20 |
ivalSM1 FLvalue "", 70, 20, 270, 20 |
| 21 |
gksliderA, gislidSM1 FLslider "Slider", -4, 4, 0, 3, ivalSM1, 250, 20, 20, 20 |
| 22 |
itext1 FLbox "store", 1, 1, 14, 50, 25, 355, 15 |
| 23 |
itext2 FLbox "load", 1, 1, 14, 50, 25, 415, 15 |
| 24 |
gksnap, ibuttn1 FLbutton "1", 1, 0, 11, 25, 25, 364, 45, 0, 3, 0, 3, 1 |
| 25 |
gksnap, ibuttn2 FLbutton "2", 1, 0, 11, 25, 25, 364, 75, 0, 3, 0, 3, 2 |
| 26 |
gksnap, ibuttn3 FLbutton "3", 1, 0, 11, 25, 25, 364, 105, 0, 3, 0, 3, 3 |
| 27 |
gksnap, ibuttn4 FLbutton "4", 1, 0, 11, 25, 25, 364, 135, 0, 3, 0, 3, 4 |
| 28 |
|
| 29 |
gkload, ibuttn1 FLbutton "1", 1, 0, 11, 25, 25, 424, 45, 0, 4, 0, 3, 1 |
| 30 |
gkload, ibuttn2 FLbutton "2", 1, 0, 11, 25, 25, 424, 75, 0, 4, 0, 3, 2 |
| 31 |
gkload, ibuttn3 FLbutton "3", 1, 0, 11, 25, 25, 424, 105, 0, 4, 0, 3, 3 |
| 32 |
gkload, ibuttn4 FLbutton "4", 1, 0, 11, 25, 25, 424, 135, 0, 4, 0, 3, 4 |
| 33 |
|
| 34 |
ivalSM2 FLvalue "", 70, 20, 270, 80 |
| 35 |
gkknobA, gislidSM2 FLknob "Knob", -4, 4, 0, 3, ivalSM2, 60, 120, 60 |
| 36 |
FLpanelEnd |
| 37 |
FLsetVal_i 1, gislidSM1 |
| 38 |
FLsetVal_i 1, gislidSM2 |
| 39 |
FLrun |
| 40 |
|
| 41 |
instr 1 |
| 42 |
|
| 43 |
endin |
| 44 |
|
| 45 |
instr 3 ; Save snapshot |
| 46 |
index init 0 |
| 47 |
ipstno = p4 |
| 48 |
Sfile sprintf "snapshot_simple.%d.snap", ipstno |
| 49 |
|
| 50 |
|
| 51 |
inumsnap, inumval FLsetsnap index ;, -1, igroup |
| 52 |
FLsavesnap Sfile |
| 53 |
|
| 54 |
endin |
| 55 |
|
| 56 |
|
| 57 |
instr 4 ;Load snapshot |
| 58 |
index init 0 |
| 59 |
ipstno = p4 |
| 60 |
Sfile sprintf "snapshot_simple.%d.snap", ipstno |
| 61 |
|
| 62 |
FLloadsnap Sfile |
| 63 |
inumload FLgetsnap index ;, igroup |
| 64 |
|
| 65 |
endin |
| 66 |
|
| 67 |
|
| 68 |
</CsInstruments> |
| 69 |
|
| 70 |
<CsScore> |
| 71 |
f 0 3600 |
| 72 |
|
| 73 |
e |
| 74 |
|
| 75 |
</CsScore> |
| 76 |
|
| 77 |
</CsoundSynthesizer> |