sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1
; This table maps menu values to vco2 oscillator modes
giwavemodes ftgen 0, 0, 8, -2, 0, 10, 12
instr 1 ;read widgets
; When values from sliders are to be used on the init pass,
; they must be read outside the instrument, because
; they are not read during the init pass
gkwave invalue "wave"
gkfreq invalue "freq"
endin
instr 10
kenv adsr p3/5, p3/5, 0.6, p3/2
imode tab_i i(gkwave), giwavemodes
aout vco2 0.1, i(gkfreq), imode
outs aout*kenv, aout*kenv
endin
i 1 0 3600
f 0 3600
207
302
373
293
true
170
170
127
wave
25
30
120
23
{209046cb-065c-45d2-a8af-c6cc76c4e15b}
true
0
-3
saw
0
square
1
triangle
2
1
false
150
31
204
25
{fd5594a3-7a80-40e3-be90-7335292cd7b9}
true
0
-3
center
Helvetica
10
3
255
255
255
32
32
32
noborder
1
1
freq
25
70
180
20
{6a07f97c-5c18-46b2-8515-bdd1d252fce1}
true
0
-3
200.00000000
800.00000000
703.03030300
lin
continuous
-1.00000000
false
220
65
130
25
{9795fb33-ed0e-40cd-be54-4e72136ba27b}
true
0
-3
left
Bitstream Vera Sans
10
3
255
255
255
255
255
255
noborder
1
1
button1
26
98
180
40
{9346008b-c023-4171-84ec-419a0542d75e}
true
0
-3
event
1.00000000
Generate note
/
i10 0 5
false
false
208
100
130
36
{d0e5f205-22ef-46a1-9e95-a0dad502c127}
true
0
-3
center
Bitstream Vera Sans
10
3
255
255
255
255
255
255
noborder
1
1
28
148
308
101
{bd0c8e45-f7e6-4d91-948f-b571a61c20ec}
true
0
-3
left
DejaVu Sans
10
3
0
0
0
169
191
120
noborder
1
1
42
180
277
66
{1ea04247-ebf6-41f1-979d-83efd84fc316}
true
0
-3
center
Bitstream Vera Sans
10
3
255
255
255
255
255
255
noborder
1
1
118
153
105
24
{bda3bb14-efd3-4e02-b523-a58928c5437f}
true
0
-3
left
Bitstream Vera Sans
16
3
82
111
63
255
255
255
noborder
1
1
Version: 3
Render: Real
Ask: Yes
Functions: ioObject
Listing: Window
WindowBounds: 207 302 373 293
CurrentView: io
IOViewEdit: On
Options: -b128 -A -s -m167 -R
ioView background {43690, 43690, 32639}
ioMenu {25, 30} {120, 23} 1 303 "saw,square,triangle" wave
ioText {150, 31} {202, 26} label 0.000000 0.00100 "" center "Helvetica" 10 {65280, 65280, 65280} {65280, 65280, 65280} nobackground noborder <-- Select waveform from this menu
ioSlider {25, 70} {180, 20} 200.000000 800.000000 703.030303 freq
ioText {220, 65} {130, 25} label 0.000000 0.00100 "" left "Bitstream Vera Sans" 10 {65280, 65280, 65280} {65280, 65280, 65280} nobackground noborder Frequency
ioButton {26, 98} {180, 40} event 1.000000 "button1" "Generate note" "/" i10 0 5
ioText {208, 100} {130, 36} label 0.000000 0.00100 "" center "Bitstream Vera Sans" 10 {65280, 65280, 65280} {65280, 65280, 65280} nobackground noborder Push this button to generate notes
ioText {28, 148} {308, 101} label 0.000000 0.00100 "" left "DejaVu Sans" 10 {0, 0, 0} {43264, 48896, 30720} nobackground noborder
ioText {42, 180} {277, 66} label 0.000000 0.00100 "" center "Bitstream Vera Sans" 10 {65280, 65280, 65280} {65280, 65280, 65280} nobackground noborder Values for waveform and frequency are only applied during the init pass so they remain constant for every note. Changes only apply for new notes
ioText {118, 153} {105, 24} label 0.000000 0.00100 "" left "Bitstream Vera Sans" 16 {20992, 28416, 16128} {65280, 65280, 65280} nobackground noborder No Reinit