Linking knobs together via a button
-
I am building a delay plugin, and want to have a button called "LinkButton", which will link together knobs
LDelay - RDelay
and
LFeedback - RFeedbackI found a topic in the forum and used the code that the poster said worked.
but it doesn't work for me.inline function onLDelayControl(component, value) { Delay1.setAttribute(Delay1.DelayTimeRight, value); if (LinkButton.getValue()) { LDelay.setValue(value); LDelay.changed(); } };
-
@pcs800 said in Linking knobs together via a button:
but it doesn't work for me.
In what way doesn't it work?
This might also help:
-
@d-healey
When I click the LinkButton, it does not sync the LDelay and RDelay knobs.
I will look at the video, but if you see anything in that code that is obvioius to you , please do tell. -
@pcs800 said in Linking knobs together via a button:
but if you see anything in that code that is obvioius to you
This indicates that it is the control callback for the LDelay knob.
onLDelayControl
So shouldn't it be the RDelay knob you are changing here?
if (LinkButton.getValue()) { LDelay.setValue(value); LDelay.changed(); }
-
@d-healey
Ok I made that change, but it still doesn;t link th two.inline function onLDelayControl(component, value) { Delay1.setAttribute(Delay1.DelayTimeRight, value); if (LinkButton.getValue()) { RDelay.setValue(value); RDelay.changed(); } };
-
@pcs800 said in Linking knobs together via a button:
but it still doesn;t link th two.
It's very difficult for me to know why this isn't doing what you want it to without more context.
Make a minimal snippet that demonstrates the problem and post it here and I can see what the issue is. - Often in the process of creating a minimal snippet you'll find the solution yourself.
-
HiseSnippet 764.3ocsU0taZCCE0lhqVx9PqR6AH+LLUUEJEVq5OVKPYCsRKpzUs+UYbbHVjXGk3zMzT0dk2avlcRJDVQ8CjVPhj6GG6St9buYXrfPSRDw.n4kyhn.3qPilwk9c7wLNneW.7MnA3DIM1J2U6YQ3jDpK.B23SZGPipfrqe+w13.LmPW3B.tRvHzSYgL4BuCO5KrffdXW5krvRYu2Q8IBdGQfHUwmMPNfHLYJdB8LrNsJHvmwI9.36Q6tqGYeGm8aznoCF2vEi2qNswATuVdjlNG33Ntoi5WK.bySbYRQ7HIVRSTKZag6rQ9huyy2fqXIrwATsQcvH0Nm6FzwmE3N7thSB..qNbQoZi7R06PCXtr49WTxdaV.qEHJWzfUdHJU+YPIXIJUMmRagFQhYQxEQz74kn9b0InGVc1TlJ44Bp7KHpiPkAWtSHdJsWrxXNB6VNNaao9q1gllLd.iSs7R4DISvsD7S6RCvyzviEA1DQXjfqVnsstAGjRqY9SSirLpuSBUdrTFyFmJo1E9xtoUAWvl3OGzglFlFLOK6SY7osSkRAemIT4U5f10pYZnVTiKxvpW0b+ygdWDhOlOg5Zq8cq4sGZVh0mIjzy41Yzy7VSq+Mjm2JiU7ZFPiWYX8KR7CAzlmFNlFWt3nSTc7srlXymllfjenUJQAuOmIOOhVX2SD3pOq0OeeEDn3TW8zW62EKwZQUgOUdQzXISSGXW5Mp13bIlApKMYpTDoZjum9So7EtoAX4xsC5AEEAT0ikzfZcFOgImUdPxynGw4A6QdpTbKzPlj3uZNVYEbTUo9evwhIKuFchmGkHWPvpndeacGi7Ha+EhTIiOY.V0a9C.DcVZ3H0DXBUs6bNMPs3HXEsZI21Qaqq.inb2Li+ntJBVWaCKBV+tffPLIVbMIuKPO65EYdTbhmMa2P8QFksUcPVmQ45bnZT50DxxK08.t65Brw5Bbu0EXy0EXq0E3GVWf6+3.0eo63ToHLusA.FL7jrQIP3IbrRAloVA+EnkIY0M
-
@pcs800 The snippet needs to include everything required to demonstrate the problem - but nothing extra.
-
@d-healey
I don't know what that means. I followed the instructions to create a snippet. That code is the only code in the project. The rest was done via the gui editor. -
@pcs800 said in Linking knobs together via a button:
I don't know what that means.
The snippet should include the script, the effect, the knobs, and the button, and these should be connected up as is in your main project.
Then when I load up the snippet I should be able to see the issue you are having.
-
@d-healey Try this
HiseSnippet 2138.3oc2Yzzaaibkz1byJYmuVrnnnGJHB1B3TjZHIKaK0.TSaYKG2XGqURq2dnsIiHGIMMTyvkbjSTBLZ.ZOza68dp25egdbQ+Er.EEnGSuUfdY+Gz9lgTTC0G1zpItcqxg34Myade+w7XMelMNHf4qoms4.Orl9JFMFP4cqzEQnZGtml9xFGuyQl6gcQCz1cfGJH.6noqu3AhCnmYIM4uuY6c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awTqxxewVr5r9hx1Gif7s.cMf5eMfZm13nD7hA6pufX5kgqyIVKXgFXpibw+B9EsYdwZ8nMyObSUuhaEZUV1nAghke8Fok46HWa94PAXyCvTruvmN+E7Mb95z9Mb7R82vIr9eSnLcfGKHwE2.2izDRNEnBTTPELcxp2pvq.URm5Vey1UAgbp3z.w66KiV2oGqOkeQ15kRms9R9zPK8+beZnuEjCNQBlLC4wFjddt38omgcY.DAO9QFQc9MDZRe4iYTlWWFkjHntNFhA6zA6qx6SUf1gyEE1hg7wV0wtXjpS6mXAsZAMcJZbbN0E4uxeIuoZu9tFgrqoH.z7au0NW7+qqcdsTH35fF8P19rmZG9UiD9oenDBH2T43YyXbrXs4T9Bc8frbO01N4UMAhElWDWedQr37h3FyKhaNuHt07hXoKGQQQnc5CO0NLzTSCdIp708556SQfWtLhP6eKA.PPM
-
There are a couple of problems.
You haven't assigned the control callback to your controls.
Controls can either be connected to module by parameter/processor ID or by using a control callback - you can't use both together. So if you want to use a control callback you need to remove the assignment in the interface designer.
-
@d-healey
If I remove the assignments from the LDelay and RDelay knobs, won't they get disabled when the linkbutton is not engaged? -
@pcs800 said in Linking knobs together via a button:
won't they get disabled when the linkbutton is not engaged?
You need to use the control callback to handle both the linked and unlinked scenarios.
-
@d-healey
I guess I am not building this plugin yet. I need to understand more of the coding language. I do not know how to use a control callback. I'll start with your video above. -
@pcs800 Yeah once you get control callbacks down you'll be able to do a lot of stuff.
-
@pcs800 You have all of your knobs connected via 'Property Editor' so those arent going to react to any script like you have.
You can only do one or the other. If you know you're going to have scripting controlling the button/knob/slider, dont connect it via the 'Property Editor'.
Also, you're not declaring any reference to your knob before you have it trying to execute an action, so that will cause an error as well on its own.
Dave's 101 video is a great place to start. Best wishes!
-
Best advice....