- Edited
Hey all!
Very new and basic Bela mini user here that has taken on a college project using one - with regard to Csound. I have left this impossibly late - but have my college project due in tomorrow and cannot for the life of me get my potentiometer to control the depth rate of this chorus pedal, have been looking everywhere for some guidance, and seem to have it working using cabbage. I have tested the pot using C++ code and it is working but when brought into CSound on the Bela's IDE i am out of luck... I have attached my code here - please don't judge! any help or leads in the right direction but be greatly appreciated.
<CsOptions>
-b 256 -B 1024 -d -odac
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 16
nchnls = 2
0dbfs = 1
instr 1
kdepth chnget "analog0"
a1 inch 1 ; Read from Audio Input 1 (mono guitar signal)
;kdepth = 0.75 ; have been using this for the general chorus sound - yet no luck when trying to connect it to the "analog0" pot...
idelaytime = 0.02
imodfreq = 0.8
; Generate LFO for modulation
amodL oscil kdepth, imodfreq, 0.8
amodR oscil kdepth, imodfreq * 1.02, 1
; Apply delay with modulation
adelayedL vdelay a1, idelaytime + amodL, 100
adelayedR vdelay a1, idelaytime + amodR, 100
; Mix dry and wet signals
aoutL = a1 * 0.4 + adelayedL * 0.3
aoutR = a1 * 0.4 + adelayedR * 0.3
kdepth chnget "analog1"
outs aoutL, aoutR
endin
</CsInstruments>
<CsScore>
f 1 0 4096 10 1
i 1 0 100
</CsScore>
</CsoundSynthesizer>