I have a weird issue with the Polyphony menu not working on my module Neutrinode but it works fine on another of my modules, Cosmosis. When I was first building this, the polyphony menu worked fine with Neutrinode but now it doesn’t. I can hard code the number of channels in it, but the right-click menu just doesn’t do anything.
Here’s the relevant code:
I’ve compared it to my Cosmosis code (which works), and can’t really find the issue. Any help would be greatly appreciated. Thanks
appears earlier than the code setting the voltage for those outputs; I’m not sure if that matters either but in other vcv source that I’ve looked at the setChannels method is called later.
I think polyphony isn’t really part of the VCV module API, is it? The only place I ever run into it is setting the number of channels in my output ports.
outputs[foo].setChannels(n);
I think if you just set the “right” number of channels in each of your output ports it will be fine.
I’ve tried that as well. And updated it in this recent commit but still doesn’t work. Have you tried compiling it? The polyphony itself works, it’s just when you use the right-click menu it doesn’t change the number of channels.
The issue isn’t whether the outputs[i].setChannels(n); works (it works fine), but the right-click menu doesn’t change the number of channels to whatever the user wants. I’ve hard-coded the number of channels to 16 but if the user wanted to use only 8, for example, it doesn’t work.
If you clone the repo and git checkout dev then build it from that branch, it still works for some reason. I’m at a loss on this one
Ok, sorry about that, you’re right.
You’re problem seems to be namespace related. After renaming struct ChannelItem to struct ChannelItem1 and struct ChannelValueItem to struct ChannelValueItem1 everything works as expected.