Cabbage Logo
Back to Cabbage Site

Foscil doesn't have k-rate kndex?

I’m using foscil, and trying to hook up my midi sliders to the modulation index.
Foscil says it has a k-rate modulation index… But when I don’t feed it a i-rate kndex, it gets mad. I get an error that there’s no opcode for those arguement types.
What am I doing wrong?
I’m on windows 10, here’s my code:

-odac   -+rtmidi=null -M0  ;using cabbage

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1	; expects MIDI controller input on channel 1

imax = 1
imin = 0
ichan = 1 

ictlno = 7*6 -1  ;this is slider number 1
ictlno2 = 7*6   ;this is slider number 2
ictlno3 = 7*6 +1  ;this is slider number 3
ictlno4 = 7*6 +2  ;this is slider number 4

kamp    ctrl7	ichan, ictlno, imin, imax	
kamp2    ctrl7	ichan, ictlno2, imin, imax
iamp3    ctrl7	ichan, ictlno3, imin, imax
kamp4    ctrl7	ichan, ictlno4, imin, imax

initc7 1, ictlno4, 0.5

printk2 iamp3, 10

kdex = 1

imidd cpsmidi

asig foscil kamp4/4, imidd, 1, 2*kamp2, 3*kamp, kdex

outs	asig, asig

f0 3600
f 1 0 4096 10 1



Nevermind!! Used too many arguments in foscil. Delete this post, lol. Can’t believe how long I spent on this… Kept checking six arguments, forgot that ifn wasn’t being used… Only needed 5 arguements.

:rofl: We’ve all been there before! You can delete the post if you like, but it’s a nice reminder to everyone that mistakes like this are part and parcel of programming with Csound.

Welcome to the forum btw :slight_smile:

1 Like