I’m making a very simple convolution plugin to mix an input with an uploaded sound files, but I’d like to insert an “Open File” button to have the possibility to change sounds when the patch is running.
I’ve look at others plugins, but I’m still confused.
Do you have any suggestion?
Another way to do this would be to use reinit. Then you wouldn’t even need to use the event opcode. You could simply reinitialise the instrument each time the filename changes.
p.s. Nice avatar, I wonder should we make it compulsory for users to have avatars of Cabbage heads
If you spend a lots of time on Cabbage you become a Cabbage head…
Maybe I’m not doin’ it right…Can I use an If statement with reinit? Probably, I’m wrong, the Csound manual isn’t clear about how to use it.
That reason why this won’t work is that the pconvolve opcode is expecting a valid filename. The filename is not valid at the start so the instrument produces an init error. I guess in the case where you want to let the user open a file of their choice it might better to use the first approach. You can always turn an instrument off using the turnoff opcode.