Cabbage Logo
Back to Cabbage Site

Memory consuption with Chorus op code

I don’t know if this is Cabbage or CSound related, but I have kind of memory leak when I use Iain’s Chorus code :


chorus-prob.csd (2.2 KB)

ToneZ use the same code (as many others I guess :slight_smile: ) but it seems unaffected. What am I missing ?

I’m not sure, but Ill take a look once I get a chance. Things are crazy at the minute with the holidays, but I’ll try to look into as soon as I can :wink:

chorus-solved.csd (2.8 KB)

Learning from ToneZ solved my problem …

The trick is basically to put effects into a separate instrument, instantiated once and mix the sound to this instance.
I don’t know how CSound instrument instanciation works but i guess it keeps alive (due to the effect opcode) all instrument instances long after the note is released.

Well, another problem solved :wink:

2 Likes

Ah yes, I’ve seen this issue before, but it escaped me this time. Thanks for reporting the solution. I don’t think it’s a game breaker. Your solution, and the one used by @Retornz seems like a workable solution :wink:

1 Like