Cabbage Logo
Back to Cabbage Site

FMOD Plugin: jitter opcode not working

Hi,

I’m building a procedural wind synthesizer with Csound by filtering noise and using the jitter opcode to animate those filters. After running the code as an FMOD plugin I noticed the filters are not being animated at all, but remain static.

The code works fine both when I export as a standalone or as a .vst plugin but, it’s just the FMOD plugin that’s not working as expected. Any ideas why this could be happening or possible solutions?

Thanks!

It’s so long since I wrote that FMOD plugins that I can’ remember if the Csound output show up in the FMOD console? If so, check and see if Csound reports any issues with jitter. As far as I know that is a core opcode, so Csound should be able to find it :thinking:

Just checked and FMOD doesn’t seem to output Csound in the console, but I just noticed the following warnings I’ve been getting on Cabbage. Could it be related to that problem?

Those warnings are harmless. They shouldn’t affect your use of jitter. If you bypass your jitter code, but leave it in place does the .csd work? If so then the problem is not that Csound cannot find the jitter opcode, but that it just doesn’t work correctly in this context.

Ok, so I commented out one of the jitter lines. The .csd stopped working on Cabbage and the FMOD plugin also stopped working, with the FMOD console outputting this:

Just did a simpler barebones version of my plugin to just test the jitter (this one is just a pink noise and a bandpass filter. The center frequency is attached to a knob in cabbage through a chnget channel and it’s being modulated by a jitter). FMOD straight up can’t handle it, outputting the following error:

Can you share your .csd? You can pm me if you don’t wish to make it public…

Just PM’d you, thanks!

Thanks, just got them. On thing I notice straight off is that you have a -odac in two of the files. That’s not a good idea. Remove that and use -n to prevent Csound from trying to output sound directly. Csound should only feed audio to the FMOD plugin.

Now we need to find out if jitter is really the issue. Can you replace the lines with jitter, with a simple assignment, so

kWooing jitter ...

becomes

kWooing = 1

and

kJitter jitter ...

becomes

kJitter = 1 ...

Try that and let me know. Sorry, I don’t even have FMOD installed here at the moment, so I can’t check directly…

Ok, thanks for the -n advice!

I substituted all jitter opcodes with an =1 (so yeah, kJitter = 1, etc.). The .csd file runs without errors on CsoundQT/Cabbage and the FMOD plugin works the same way it had been working before

No problem at all :slight_smile:

So it certainly looks like an issue with jitter. How bizarre. Do you absolutely need straight line segments? Could jspline work just as well? Not a solution, but a workaround perhaps. I can’t see from the code what might be causing the issues.

Btw, if you really need straight line segments, you could probably roll your own jitter type opcode as a UDO. I don’t think it would be tricky. Certainly an interesting Csound exercise!

Voila, jspline works on FMOD and works well in general for my purposes.
I was completely unaware of this opcode, thanks a lot! I’m pretty new to Csound so I’m still learning my way through the opcodes.

I still haven’t really studied anything about UDO but definitely wanna go back to this and try it once I know how to make an user defined opcode