Lord of the Knobs :)
-
@orange Yeah the value will jump because the range has changed and as soon as you interact with the knob it will recalculate and apply the new values. If you want it to move from the existing value of the previous range then you will need to add the previous value into the calculation of the new value (and you'd need to know what the previous range was too). It shouldn't be too difficult but it might cause a headache :p
-
@d-healey Yes this is a trouble :) Can we make only this?
When we change the range (press the buttons); could the parameters and knob returns to their minimum values?
I tried that with .setAttribute but it doesn't accept. -
@orange This is probably how I'd do it.
HiseSnippet 1441.3oc0X80aaaCDWJIZKwadncXOtG37S1MNIR1sqC0qXtwIoHnKIF0coEnnnfVh1lHxjBTTN0qH.8g8Aqej12fsiTxVxIJI1IqCsBv+g2c+N96NRc5nZK3tjvPtvvbsWLNfXX9sVcFyjCZM.SYF6uigYAqiNb2mc3Qa6Xr83.bXHwyvzb4mpzat1JF5q+921F6iYtjTQFFGyotjemNjJSk1t4yn996g8HufNLi02u49tbVKtOOB3xxV1FAX2Sv8IGhUlsjkg4WsqGUxEcjXIIzvbks4di6LfeJK19iogzt9D0.GiNfihEuG22SwXkTiVCn9dsmDygFfWZmlAVNNC7CVGP8nSkmlItiVAJEQ17g4RWE8btgzyLC8VIld20piqfFHS0n312XsOSRD8vvRPVZEaqwRqrpUKNXASt4P7Ij8DvfoHJ+Pa6pHmZ1UZTrPwBvBQnDMBKPcnCC7IpkZziQ58Ea1mH2sWOhqrboTskNOvQf8u9MMPas0HmpnQ0fO0KVXzlBRHQLhTtdL.AoOh1H92gbORir9PfY8IaGIkfjX2ofziKPkovX6FHJ5WQ0geVe8JEK79hEPvUVTul9FvvIwMv7V7gAbFLnbomqrqz5koq6TQQlbvtYnBASJ39sv99cgMjk6JYZjs1tRiBmoHDk4SYDTuHlqjxYHFWLD6Sg7+K3ZSKmJ4XreDoJZHkAegeWFVSjQBlRAZcz4rGcOTYvXzFJ0Jpl6zFE3Aa7RVZNgw6pwlNCzdfWfTL5mdLJh4Q5An8p.KPsEjQPFAcJVvnr9HvWTFUFiJAr5J7TpzcPrSpjJNiEpKWbHAY+nY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0a8M9W.x2t6GA
-
@d-healey Thank you so much David. After selecting a couple of buttons and return to select Range 1 button, the values aren't controlled by knob 1, why is that?
-
And also is this possible return the knob value to 0 when a button selected?
-
Seems like
mode != undefined
andmode != 0
are equivalent, so I had to usemode !== undefined
instead. Added a couple of other things to, including setting the knob to 0.HiseSnippet 1491.3oc0X01aaaCDVJIpKwaYncXebefKeRtwIwxtccndAyMuUDzkWPcaZGJJJnknsIhLoGEkS8JBP+v9g0eR6ev1QJY8RrRhc55Pq.xK7t643ycj7zQcrf6RBB3BCykd1nADCyuwp0Hlr218vTlw96XXVx5nC28IGdzVNFaMZ.NHf3YXZN+iU5MWZAC8ye+qag8wLWRpHCiS3TWxuQ6SkoROt4Sn996g8HOi1Oi02q49tb11bedHvk4spZL.6dJtK4Prxr4rLLu0tdTIWzRhkj.CyE1h6MpUO9YrH6OgFPa6STCbLZANJR7dbeOEiURM1tG0263wwbfA3kiSy.yGkA9dqCndzD4oYhaqUfRQjMeXN2UQOmaH8LyPuEhn2crZ4JnCjoZTb6qs1mIIhNXXIHKshr0Xt+XQqs4fEL458wmR1S.CRPX+fpUqfbpUsbikKsbIXgHPhFhEnVz9C7IpkZzlH89h06Rj61oCwUZuRp1UtHvgf8u50MParwPmJng0fepubogqKHADwPhc8H.BRWDsQze6y8HMx5CAl0krUnTBRhbmBRGt.YSgwUafnneAUG9ypqVd4Rua4RH3IKpWQeMX333FX9179C3LXf8JOUY2JqZSW0orhLEfc8.EBlTv82F662F1PZ2VxzH2dqxMJcd9f9fGs+guQcR4RmzDKzIrjQEMQbVh5XUQoLJymxHnNgLWIkyPLtnO1mBK2OiqYlcpjSv9gjJn9TF7K7ayjjHxPASo.sJ5B1itKxFLFslRsZNOunoMbfGrOOdmvoLdaM1zYf1A7Brhh9wM2DEx7Hc.3dkgMDGKHCgjA5LrfQYcQfynLpLBVLZ0SvYToauHuTNUbFKTOt3.Bp5CyKT8L7UUUK9SldRHaEDro+9UGu3mGry0BdMG8glKAesqEuSQfaK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MhQ
-
@d.healey Would it be ok to show how to do the three knob version below, but scaling from their current position instead of snapping? Been trying to figure it out but getting absolutely nowhere :/
HiseSnippet 1242.3oc6X0saZbDEdVvqSgVhhi5CvHeEnj5rfSRqjqUHfsiPw+fJ1tsJJJcX2YgQL6Lq1c1TnQVpuFsW2Whdmej5aP67yBrXiIPUZTsTlKr7YNmyLemyb9aocD2EGGyi.VENcTHFX8E1cFwD8a1GQXfV6ArV2tKE0GzXTHJNF6Arrx+BEOqBqAzq+5YMPTDyEOcK.3bNwEeHIfHlta65ujPoGf7vmRBxH8iq2xkyZxo7DINxa6.BQtCP8vGiThkyVBh88HBdTGARfikxzf6MpSe9OyLxeNIlzkhUDUAcjGjYaPy9DpW6w1XL.XsV6oVbdiE+k1GQ7HS1epkeOMC3TMx5CrxMKjVaFHU8lfzAbpm5.tA3YkAdqYf2F1cbiHghobTX6ysawD3HejzsmEVFYA49i71M4RIXhsBPCvGDIIlnQ4m537P3SbbprSohkJFg6AI5+S9LDKfuEEA8GB2E9pWK20e3qbdsjPGVrUOrXeeerqn7lcHAgTLTELrYEifUeeBVayJW4h5JXGRXCj5MFuRMaxCB4LIQ4MajHDbV0qo2.Fua7XLpILvb9mxKkBXNCinUWrnig43ycqXkHLQDm1DQockgmkU7Z1H6QtXoJUjvnDFF5mvbEDNCZ3U10nxCklEMAWoTw2UpHTtnbWDER7TuD5qXKByCO7D+wZnNUkfl+R7gkSclJK5b0gUtBb2cgNUfO5Qo.KFx3BnDGCvdF8RuM0R9BJuNsc7bgHhzMQfK6LFX6nk6Bi3XZLFd8CfGAKSj30YGHA9sovlhY8D8k67fGTYprYTa7cei27rhZ72FoMlYV.pAYVnpVEuXhWmyNlKvmvJWo36JVn3EEuJGe+4wJ0+QwQyiqpfVzBTqLKInKNZrAkJmLGe1hHqubEQbMAtYDjyZwHhSBwozSKyTcNkY.oQ9xBN4SAn7+D5xM2MsbSGJwCGAHxC4N15zGfF6oksqu81abIXoUt1JnrIiWqbA6zz+YTW2y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n.+Hwqw71DWiyqENwLKiVorprtTwA.TCxQi6JcFF4GaCh05RyeDVDAcELdJnbVa4Jl.45fqViBk8gD3YinlD4YDBWqABy8Qd8BANRivI6ZpXfHD4RAiTZcDE8ywI.Fg2V1AnrzRESj8BTpqDxCxDTzi2XCUdTE+O.B6xND89A2fknyvQn.woCxCC2zQWpthCV5DiITsOFNfGlNUjNNtxoPRXYTYHOLxdc40iWUpeFR72bZOqTepDeFocMBSW.j+xrN+bULkPQugKiBnb3Gbe0oJyVERj8B4JFnkPiIO56QtfvPEDvVAlKGZKAGRajC4tEyeQ9ExeY9w4zpUVrhOqwHgYwU0FNbBp4x6EzjDN3ICwxAciFscmyz0tyy7.zTBJ36xoxC6R3WWSPq3m5BsCmKFTvcRcyvGD2LrAi5SBsnPOu66nezskFuoGGwZpUdsQTtxe49GadsJa5GoUdAm3lSia6Oso0a1sFVhUczi8FvC6RBkTUvytF4TXTIS+8EbpQhNQJ5pc23lLP.9Fc39IFbuJmObQk2TIf56yH0EQTUtMQr+T4VSsEVKkEJ0MkE93moExLzkXieqcJaX0thjzWpFEU0NAFj7JCFAimI76wvxQmYSMlQLCEzRObjZ.HN.4ySmplgA4JM0CxMsv8QN0oRuNYi2bYfWnh5+Z7FOVbAGy7aIfcdmc9k+cmAtTVy.mKEVt+vWPQOC4KG.kBNoFpbBumxu960HL7Hwu2R8kcRIQkLdSF64F0wla5bra38MlbgfB3naMEteqiNvdaBv5D+sG.+Pm53uDJHdsnmjxaCy7ERgGV6bPufFvKs6Q.nx4vXx.M6bp1sl0kTqU.pAg6qW72vULyxp01wLKOfo0Tbh+AoOwu10cj+iPuv6Nxe2Q96Nx+k9Q9+OrQ.1KT7g3Oag5n4Woo.9MW+UFWvYe0ZzvA3UwFXzV5G77Ti6rBDcxVi0lYM9gYVimNyZ7rYVimOyZ7iyrF+zDzP8AVeQOoHvTuCDpus9Emrs2ligJWcou0+zC7snG
Thank you David! Much appreciated. They seem to be jittering a little when moving them, an idea why that is?
-
@duno Nope, I noticed it too but couldn't figure it out. If I spent more time with it I'd probably solve it but I'm too busy at the moment.
-
@d-healey No worries! Thanks for that snippet, will see if I can figure it out. Cheers David.
-
You simply need to make sure that the actual value update is fired from both callbacks - the knob and the ranges. Move the logic to a separate function and call it from both callbacks.
I've implemented this along with a few comments. Also note how I tried to use arrays wherever possible which heavily simplify the logic.
Content.makeFrontInterface(700, 120); // Set to true to print the values to the console. const var DBG = false; const var simpleGain = Synth.getEffect("SimpleGain"); const var mainKnob = Content.getComponent("MAIN_KNOB"); // Store the button references in an array. This will make it // more easy to set the currently used range const var rangeButtons = [Content.getComponent("Range1"), Content.getComponent("Range2"), Content.getComponent("Range3")]; // Store the ranges in a globally accessable array // It is multidimensional which makes the logic pretty easy const var rangeOptions = [ [[0, 50], [-100, 10], [1, 10]], [[0, 200], [-10, 30], [100, 300]], [[0, 100], [-3, 30], [1, 30]] ]; // This will store the currently selected range reg currentRange = 0; // Changed the function to take a [min, max] array so // it's compatible with the new functions below inline function normalisedToRange(normalisedValue, range) { return range[0] + normalisedValue * (range[1] - range[0]); } // This function will be called from both the knob callback // as well the button callbacks to make the module parameters // stay in sync when you change the range inline function updateValuesFromCurrentRange() { // get the range we're currently using local rangesToUse = rangeOptions[currentRange]; // grab the current main knob value local value = mainKnob.getValue(); // get the values for each parameter // (note how we access the array within the array) local v1 = normalisedToRange(value, rangesToUse[0]); local v2 = normalisedToRange(value, rangesToUse[1]); local v3 = normalisedToRange(value, rangesToUse[2]); if(DBG) { Console.print("v1: " + v1); Console.print("v2: " + v2); Console.print("v3: " + v3); Console.print("----"); } simpleGain.setAttribute(simpleGain.Width, v1); simpleGain.setAttribute(simpleGain.Gain, v2); simpleGain.setAttribute(simpleGain.Delay, v3); } inline function setCurrentRange(component, index) { // Update the current range variable // Note how we can use the same callback for every button // and just set the value by checking the index in the // component array currentRange = rangeButtons.indexOf(component); // Update the actual values when the range changes updateValuesFromCurrentRange(); } // set the callback for every button for(r in rangeButtons) r.setControlCallback(setCurrentRange); inline function mainKnobCallback(component, value) { // We just call the update method here, since the logic // has been shifted there. updateValuesFromCurrentRange(); } mainKnob.setControlCallback(mainKnobCallback);
Here's the snippet:
HiseSnippet 1980.3oc0Y08aajaDeW6rswpmKxc3d7dfPOzacqhOsR2WnGJhh+HAFo9CD4jb.FFoT6RIwy6RJPx0NpAA3dnu2+g5CG5eI8g9GPe3tmuaH49AkkrpbJthKxFIhCmY3uY3LC4PehfGSjRtvyeiSmNg34+dA8mxTi2cLlx7NXOO+FAGez9O4ni2IxamoSvRIIwy2e8Gqm2ei63Y97edvN3TLKlTSxy64bZL4OSynpZpmz6IzzzGgSHmRyb39S6cPLmsKOkmCXY8f1dSvwWfGQNBqYas.O+e09ITEWzWgUDom+c1gmLs+X9ULK+OmJoCRI5AQd8AEYI+HdZhFwZpd6NlllbRoMK8.sbRsGXcqG3CCNjlPqnW6ItmYBTsDt9C+0VF7hbgW6EBu1KBd9Nv6NV389A8iEzIp5YzX62Db.SQDCwvVfKrr75s1VuWvtbfClZ6L7EjGIfAURD9Esa2BE0o8Ve0lM1rwm7In9DERwQJQNQ++SDTFPXLAcINMmHMyAifsLIOkr8lMzeSAyJP6syiQ+IzPbpjXzV8LRZ1jThNvAXvDks8HhZ+gCIwpvl8qlsoFF0hkAjdBiO.DpzD.w1kmMgyfAgMO7gGbzK0QnMqwOrSPLPbPtRwYHAYHQPf.TIBVdL7qPfmtM5zwTI5JHjDocKHpxHdlVZBVNUanRh0ziyEfFToSQ4fyEIvrQDWbZHriY4j.VOawf8oZthZtUqMaftwOKQzNu8h1s4VmOuCx.aqWAMJkO.mBVHNVGagg.VqixHyAJD3rxxSUPZPFgIobFNEc0XZ7Xi6SZTXJeDMFBYHJ0TiSbNmzwSTzBmD5ryfPuOq84sPnytejINTO3rHyWNeo1pU3NsMB.B2B00pHid51d0jOpP9tkhaVb3qmipbW0gIxJGWc7fjjBgv0wDBxnxYMNdvPaazzRfhYYfZM.6IF0OLmEqcSlbMcrIFcVFk0B7z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W0eOxkP641dJ2HXOh7BEeBzocUWCfSakbUupZQ+tI8lVM3aOtmmittqUWaV18JlQRKL.y2ibziWSG83E16J8oTUDP+sdiIzQiqeUgu8w8FvE.15S+qy7BDVpOEmPyktz8Wedjsr8SGngbg1GcMn4874fVudvklf0wcAKsXA.L9iE77I0Z3tKxqsrHFG2+W+KKr00Eai94Gay+VI2K3P88+wpYeFG8ESJl.JHNy6kneSDnwV0T2Lo+meamE8zSqJbe+fSnp3wKFuqs.7Bg2+bi2hWJay.6i2TC16D7nu9s8Ywhd6dVrec06VVcoSCTlgvM7xk+quO7e+.yMTKH7W96+y606EyFa965sf21ze8Ysq0WM65+xKPt73.yKm8NSb6GDXbruKAXyF+6N.9d55g+B.tOkmqf1dNDCs+AU7CNJOqOOWDSzOmETvVpuOyZ5qyXG2t79M8IrDyfeD9TLYjdrewjQkS9+k0HCGK3uL1dmKcp4cMT.6lY9iPrQvg5wnp62o8MYzD5Kii0k9tO3cVrDct0Rz8VKwmdqk3yt0R742ZI9hasDe4RjP+2e4g4JdlMdGHbx9l6356uOS2juIz26mPV4e3T
-
@christoph-hart That's what I am exatcly looking for, thank you so much bro :)
-
@orange @d-healey Hi guys, I'm attempting a 'One Knob' plugin too - tried the link sliders method first (https://docs.hise.audio/tutorials/recipes/ui/general.html#link-sliders) but the ranges were totally out of whack with each other and so moved onto the script that @Christoph-Hart first posted above. Now I have the ranges spot on, but the individual knobs are no longer linked to the fx parameters I wanted, even though they have been set correctly in the Prop Editor. Snippet below:
HiseSnippet 1551.3oc4Y0sSabDEdVvCAaJQIUUp2zKVwUl1DjM+DpTZjMXrCVAHtXBoQUQoCqGfQY2Yb2crabRiTdD5s4lpp1mfdYuKR8UnuA8pdUyaP6YlcWuiWLfqiHUQYEBwd9YNemelyblkF9BGZPfvGYkcudsoHqO.2rGWdbkiILNp9FHqKi2lDHo91gjVuWaRP.sExxZxaqHXkMCR+75RqSbIbGZBIDZeAygtEyiISn1n7cXtt0Hsn6w7Ljd4x0cD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F.6YiVhTnOmJlsEsK0MtpwXqQejk471bnKUeXbo5OZolN9DS6AybJZ0wkHGbPTUgRDCnK9.S7olpiGvj8L22cgLc5nB2qhavjNGOb7NwPvKzd3hFuQy5OKNbttDvlAW6qF2A6G98NF14OV3Fm31WYwU532kV8a03HrSkIP1oiWMlKTCFnpWTkKqS3sJXF1TDJFQ3Ue+O+0kUDVbvqowasTZBKmP3Jksl7BveQ6J5HY7i1lH8YpBevYZBW0ygBQdNm5p8oITGLG9dA06J.0jp8Qr0+.OQLKFG.TLKFyDMJgzEeSBon+3W902aCoWJLjNCtIAtxhZGdTPUclx.W4LjuZedXL3E2J2eWJ4XFifaCe5feGAfjHPll1ab7aTua8Pae8w3DOx9++ltukS6S2+SCw7Z6FltTQk3y0O8uIDBsA0kLPa8vS8MNJeHe0n57tv7fMDtD+zGJbgTFjYjOES4d1uybp6Gh0g+2k.rt73cG.eEbCx6gcDhNa8xQcD1EFD1+.c.IYdYyHwtBgWS1Si2j+Su7k+UoMHdsAHGQp7RK8mk5OSsYCD+don85Rl8PzqUMeJ8oTHMXXgeqzERyh2Jg52F1vi33KdjS3E4UcAmVSA7at96smEus5c6hwWgGiKrPAjGqE6QNNpojuNDeFtNKNF5rzXnyxigNqLF5biwPmUGCc97yTG0+5g05HEdgsZ.BMpp+TJVVU4DnRVuWC8uPnuns0
-
You need to call the
.changed()
function for each knob after you've set its value.LF.changed(); HF.changed(); SATURATION.changed(); WIDTH.changed(); REVERB.changed();
-
@d-healey :folded_hands: