I am using an opcode to return the array index of the input that contains a 1. I am using this with arrays of different sizes, so the first thing I do is get the ‘lenarray’ for the input.
My issue is that when I run this code within the actual program, it does not function properly and always returns -1 for lenarray, but as soon as I copy that same opcode into a stripped down program, it runs perfectly.
I know. It’s crazy. But I think if you are calling opcodes in a functional way you should always, always, specify the rate. It will save you a lot of time.
I will say that I do like the functional syntax for Csound more than the original form… So, yeah, I should get in the habit of including the rate extension for the functional name.