-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multichannel control mapping spill over #1037
Comments
For this to work, the Graph definition would have to know how many channels a control has. I think this isn't explicitly given anywhere. Either one writes it into the SynthDef and makes a new version (read it in GraphDef_ReadVer2 then) or perhaps there is some other way to find the right number of channels. |
Just to know: what should be the right behaviour? \freq not defined? Should it sound? |
I'm just discussing this with Luca. The problem is simply that when setting controls there is no bounds checking, and never has been. A similar problem:
My assumption is that this is for reasons of efficiency, and maybe also to do with the old (probably now unused, and actually maybe unpredictable) ability to set controls by index rather than name. I think a multichannel control is just a series of adjacent controls. So perhaps there's a question of whether this should be fixed. Personally I always thought it should be, as I suspect any performance cost will be minimal in most cases. If it is fixed, should it be fixed server side (robust across different clients) or lang side (allows it perhaps to be optional)? I'd favour the former. I'm not sure off the top of my head if this would require a new version of the SynthDef format. It might be possible to derive the size of multichannel controls, but I'm not 100% sure that there wouldn't be corner cases where there could be mistakes. |
There is bounds checking on the number of controls in a synth though. |
BTW, if we're looking at this we should also fix:
Intuitively I'd think get should get both channels of mul. |
me, too. I'd say when you pass a name, then it should be bounded. You can still pass an index and have it non-bounded. The method would be:
Maybe one could look for the index of the control as registered from the name: After this has been done:
And add a list in the method: |
Actually the main question is: do the paramSpecs come from the SynthDef in some order or could their index be unordered? |
Looking at a few examples it seems that:
In all named cases, the |
Unfortunately, the Here is what I got so far:
|
OK, solved it, I hope that using |
The fix is here: 774ee0f I'm sure it can be improved, also I wasn't sure if the reference to |
The solution in the branch 'bounded-control' sorted the member variable mParamSpecs in order to find the adjacent specs for the number of channels. This worked fine, but had bad side effects, so I reverted the merge. If anyone with more knowledge about c++ would like to continue, I think the fix is easy. You probably just have to sort a copy of that member instead of the member itself. |
For reference, here is a reproducer for the problem that came from directly sorting
-->
|
Maybe this will be the correct solution: 6b20107. |
When mapping a greater number of channels to a synth than number of channels in that control, the mapping spills over to the next controls. This can easily happen accidentally, so it should best be considered a bug.
This is somewhat related to issue #336.
In this example, the noise on bus
a
modulates both\in
and\freq
controls of synthx
.The text was updated successfully, but these errors were encountered: