-
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
ndef uses embedded specs for guis #5686
Conversation
@@ -665,6 +665,14 @@ SynthDef { | |||
^desc | |||
} | |||
|
|||
findSpecFor { |controlName| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we want to avoid a double lookup?
var spec = metadata[\specs];
^spec !? { spec[controlName] }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, better, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -413,6 +413,9 @@ SynthDefControl : SynthControl { | |||
bytes = control.bytes; // copy cached data | |||
} | |||
|
|||
findSpecFor { |controlName| | |||
^synthDef.findSpecFor(controlName) | |||
} | |||
specs { | |||
^synthDef.specs | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could even add one for SynthControl
:
findSpecFor { |controlName|
var synthDesc = this.synthDesc;
var specs;
^synthDesc !? {
specs = synthDesc.specs;
specs !? { specs[controlName] }
}
}
Then you can use the specs of Synth
s played like Ndef(\x, \default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should SynthDesc also have its own findSpecFor method?
SynthDesc is used in many other places, so could be useful, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that seems reasonable.
ah, just saw that this portaudio file slipped into the PR by accident!
|
I would try this: copy the commit SHA of the version before the commit, then do a well, at least what I would try. |
@adcxyz can you please resolve formatting issues? After that I will merge this in. |
ooops! accidentally closed it! reopened for reformatting. |
It seems that the problem is not with the formatting itself, but with the state of this branch (there were no changes to cpp files; also there's a rouge submodule change here). As far as I can tell, this branch needs to be rebased on the develop. @adcxyz would you do that or should I do it and force push? |
Hi all - we'd like to pull this in for 3.13.0 and are planning an RC for that after our meeting on Aug, 27, 2022. Anything else to add? Or can we close this? |
To me, this looks good. It would be better if |
to NodeProxy, SynthDefControl, SynthDef
In the interest of moving this forward, I've rebased this on EDIT: the submodule change is still there. working on it now |
Looks like I was able to fix the submodule change. This should be clean to merge now. |
Purpose and Motivation
Fixes #5515.
Currently, NdefGui does not find controlspecs embedded in synth functions,
thus NdefGui cannot use such specs for its slider ranges.
With this PR, core JITLib NdefGui finds these specs and uses them.
Types of changes
Note: this fix works for plain SC without JITLibExtensions quark;
JITLibExtensions update to use it is simple, and ready to go.