New to cabbage, used csound ages ago – Csound Noobs
In the version that sounds like the sample rate is reduced “ksmps” is set to 32. When I reduce it to 1, then it sounds normal.
Bryan
form caption("Untitled") size(400, 300), guiMode("queue") pluginId("def1")
rslider bounds(296, 162, 100, 100), channel("gain"), range(0, 1, 0, 1, .01), text("Gain"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
rslider bounds(80, 80, 100, 100), channel("input"), range(0, 1, 0, 1, .01), text("Input"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
rslider bounds(162, 80, 100, 100), channel("feedback"), range(0, 1, 0, 1, .01), text("Feedback"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black")
-n -d
; Initialize the global variables.
ksmps = 1
nchnls = 2
0dbfs = 1
instr 1
kInput cabbageGetValue "input"
kGain cabbageGetValue "gain"
kFeedback cabbageGetValue "feedback"
a1 inch 1
a2 inch 2
;; 4 second delay
idel_size = (4) * sr
kdelay_line[] init idel_size
kread_ptr init 1
kwrite_ptr init 0
kindx = 0
while (kindx < ksmps) do
kdelay_line[kwrite_ptr] = kInput*a1 + kFeedback*kdelay_line[kread_ptr]
adel[kindx] = kdelay_line[kread_ptr]
kwrite_ptr = (kwrite_ptr + 1) % idel_size
kread_ptr = (kread_ptr + 1) % idel_size
kindx += 1
od
outs a1*kGain + adel*kGain, a1*kGain + adel*kGain
endin
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
Read more here: Source link
