How to make a button to lock a value even as a new preset is loaded?
-
@d-healey this isnt working for me
im not using a simple reverb module im using a routing matrix split to simple gain for a send effect to an IR module
simple gain module controlling send level is called Wet
i altered all the code and added the elements and copied all the settings but it isnt sending the value to the hidden knob or recalling it when a new preset is loaded. it works in the snippet but not in my setup :/
heres my modified code
const var Wet = Synth.getEffect("Wet"); // btnLock const btnLock = Content.getComponent("btnLock"); // knbWet const knbWet = Content.getComponent("knbWet"); knbWet.setControlCallback(onknbWetControl); inline function onknbWetControl(component, value) { Wet.setAttribute(Wet.GainLevel, value); knbWetHidden.setValue(value); } // knbWetHidden const knbWetHidden = Content.getComponent("knbWetHidden"); knbWetHidden.setControlCallback(onknbWetHiddenControl); inline function onknbWetHiddenControl(component, value) { if (!btnLock.getValue()) { knbWet.setValue(value); knbWet.changed(); } }
-
im not using a simple reverb module im using a routing matrix split to simple gain for a send effect to an IR module
Why don't you use a send container + send effect?
-
@d-healey i never heard of that. ive been doing it the old way of splitting the signal then routing it so a simple gain and then to a effect and then bring the audio back
-
i never heard of that.
It was added a few months ago I think. Much easier than doing it the old way :)
-
@d-healey ok i see it. but how do you actually use it lol. is there a thread anywhere?
-
-
@d-healey alright i restructured everything and adjusted the code and all elements have the same identifiers as the code. but it is still recalling send level when preset is changed and lock is engaged.
const var SendEffect = Synth.getEffect("SendEffect"); // btnLock const btnLock = Content.getComponent("btnLock"); // knbWet const knbWet = Content.getComponent("knbWet"); knbWet.setControlCallback(onknbWetControl); inline function onknbWetControl(component, value) { SendEffect.setAttribute(SendEffect.Gain, value); knbWetHidden.setValue(value); } // knbWetHidden const knbWetHidden = Content.getComponent("knbWetHidden"); knbWetHidden.setControlCallback(onknbWetHiddenControl); inline function onknbWetHiddenControl(component, value) { if (!btnLock.getValue()) { knbWet.setValue(value); knbWet.changed(); } }
and i doing something wrong here? are there special settings adjustments that need to be made to each element in order for this tom function?
as of now the lock is doing nothing and the "hidden knobs values arent being affected or drawing from the main send knob at all it stays the same regardless
-
@mwplugs Post a snippet.
-
This post is deleted! -
@mwplugs a bit unrelated but can you embed all of the audio file within the plugin so it doesnt have to be in applications folder with convolution. i know before for whatever reason it didnt work
-
@mwplugs Yes if it's less than 50MB.
-
@d-healey i just tested just the function of it and put a sine and it made a terrible infinite feedback loop? what the...it workd perfect the old way lol
-
@mwplugs nvrmnd it was something dumb smh lol
-
@mwplugs still didnt figure out the lock button but got everything else situated
-
Your snippet contains external files. You need to post a minimal snippet that only contains what is needed to demonstrate the problem.