form caption("Beben") size(202, 100), colour(58, 68, 78), pluginID("def1")
button bounds(42, 12, 120, 38), channel("but1"), text("Beben")
-n -d -+rtmidi=NULL -M0
sr = 48000
kr = 4800
ksmps = 10
nchnls = 2
0dbfs = 1
instr 2 ;respond to button presses from user
if changed:k(chnget:k("but1"))==1 then
event "i", 10, 0, 10
endif
endin
instr 10
if metro(40)==1 then ;performs additive synthesis based on 01_MAJO.txt
indx =0 ;start reading at first value
iamp tab_i indx, 1 ;take odd values of list (= amp)
ifreq tab_i indx+1, 1 ;take even values of list (= freq)
event_i "i", "Wave", 0, p3, iamp, ifreq ;use "event_i" to trigger instr. Wave
endif
endin
instr Wave ;generate sound
iamp = p4
ifreq = p5
asig poscil iamp, ifreq, 1
asig linen asig, .01, p3, p2
outs asig, asig
endin
f 1 0 0 -23 "01_MAJO.txt"
;causes Csound to run for about 7000 years...
f0 z
i2 0 [60*60*24*7]