How do you use synced modules in a project ?
-
@lalalandsynth - I've already told you how to do this in the other thread,
in the syncButton control call back:
- check the value
- if == 0 then hide the SyncKnob and show the UnSyncKnob
change the mode to "frequency"
then call UnSyncKnob.changed(); - if == 1 then show the SyncKnob and hide the UnSyncKnob
change the mode to "TempoSync"
then call SyncKnob.changed();
in SyncKnob callback:
- check the value of syncButton
- if == 1 then do something
- else do nothing
in UnSyncKnob
- check the value of SyncButton
- if == 0 then do something
- else do nothing
put SyncButton, SyncKnob and UnSyncKnob in your preset.
-
@Lindon said in How do you use synced modules in a project ?:
then call UnSyncKnob.changed();
Well,its not for lack of effort , I spent hours on this yesterday :)
I guess I am missing something.
I initially thought it would be enough to put each slider in a panel , and switch between them.
Seems like its more then that .
-
@Lindon This works fine for a modulator but not for a delay.
Actually it works for a delay in a test project but not in a larger project...not the preset recalling.inline function ontremoloFreqControl(component, value) { LFO1.setAttribute(LFO1.Frequency, value); } Content.getComponent("tremoloFreq").setControlCallback(ontremoloFreqControl); inline function onLFO1SyncControl(component, value) { LFO1.setAttribute(LFO1.TempoSync, value); if(value) { // Switch the knob to tempo sync mode tremoloFreq.set("mode", "TempoSync"); tremoloFreq.set("min", 0); tremoloFreq.set("max", 18); tremoloFreq.set("stepSize", 1); tremoloFreq.set("middlePosition", 9); } else { // Switch the knob to frequency mode tremoloFreq.set("mode", "Frequency"); tremoloFreq.set("min", 0.5); tremoloFreq.set("max", 20); tremoloFreq.set("middlePosition", 3); tremoloFreq.set("stepSize", 0.01); } tremoloFreq.setValue(LFO1.getAttribute(LFO1.Frequency)); } Content.getComponent("LFO1Sync").setControlCallback(onLFO1SyncControl);
-
@lalalandsynth - please re-read my solution above - have you tried that approach? The approach you keep posting about isnt anywhere near what works for me.
-
@Lindon Yes, I have this , that I assumed would work . This switches the knobs in a panel , one is set at tempo sync, and one as time in properties.
Your explanation is a bit complicated for me to be honest , such a noob :P
I guess I am not sure how to implement this
"use two UI knobs - one set to Tempo sync and one to Hz, when the user switches issue the mode change and a element.changed() command"This is my basic panel switching .
HiseSnippet 1446.3oc0XstaSbDEd1jLTrAi.JO.qhppLTHXGtzVUgxRbhAWRHtrboWTEZxtiiGwty3t63.FDR7Fzey+30n+opO.7Pvi.uAsmYuNquW2zVvQJRyYNm47c9NyLmyrsCDNzvPQ.xnz8GzihLNI1d.W1sQWBiiZsEx3T3cIgRZfYrnMGziDFRcQFFKeKk.iRqfh989M1j3Q3NzbQHzCELG5NLelLWZaq6v77ZRbo2m4qo8UsZ4H3MDdh9.dVFWC0i37DxAz6RTpsDFYbrscYRQfsjHogHiU1T3Nvtq3o7X8eHKjsuGUMnNxFVnXwMEdtJDqjhZzk441NMtCQvpzNmEVNlENGdWlKKSdNab5nILysPmOLVZZvq9BBOCM3sRL7NC11If0SlOiBam.2hCIpNDHEnCqXcQK86XbCAnAWtlO4IzlAvfLKpd8Z0tn40pU67eSkxUJCIhPo4gj.ycZt2tB29dDHvpadCynsGqc.UlIs5pfNl4JspZIxWf1bOkcotFrrgvumfCCptpZxQ0e8oo+5CoO.HmIpuZxgz+A7PPnsmavDsJWkw3qoZostcEr7oLoS2Mk7IaZpFI1l+Gi6w3TyN84NRlfaJ34.TsVABupNoKzEA240md9JkeQkxkJj8VKjJuoTFv1uujVs3TMCn+ReJ2YvEiMGfvKifwrYH0xl.iFDOu8gCsUGCDKFUiFS1++FQ1yHdrmbzL9X4nJNtOErWsfo1Cdtj5bvZgvUKodot4kJLa8BypY4rYgow.iD8W9BiM9S2KOCRXjvXJw.DgyeXjeVZBwxP.TslW3xpETKJtqPR2iW87keQ4RkeYYygmpSmwNWxR5QCF6zphdASyvp7996SCRYpTEga+KVdAOekWbhYHMEE7VblbudT9jJ5fRnUU0wDTApJiJ9bpjhO1dLWZ.h4pZZH+zNJB04U0OmEZNVgxX6wY+6d6aO4jsey9RofGY+whreXe+9MlGaOANa2vvK.76As1hHIp5vIbBvS8nARlJEXrE8PnAm3pxkvaQCehTzKhzR1KBPK1wURqYS3TuDLq1iidVt61vZP9.h0SYtxtYBrdrUWJ6ft4cR8p6XoPUlmNw7kfzb3mq6viOjC+iebDGdaqdj.vW5gWbT3KboJpL61JjOQyQqaA8P1yl87BYGelqqGssHjoNAjOyppbdlG9joRfqqEOuyUKdLGg.+4QhmVVGldnAZeSmKqLOaUeldvLPevr7L5am.StdFSlU+B4q2l861n.wt0vD6ad8q+sMB62oCCzBiMu8yQShl+rBz7wl0gqbuZYquu4FCwyuZj8MnlyomzOJl6tW8c5oUugb2a1eLoUznMMCstmVTUued0iXRlPQN5MNqZNlCjVgL6eil7qM2M4Ouv8L31J5Y73cowfW3dq+swaxSlpf2tSGpiLGrqfa98GsuOp1rdezwydDKyumG8V4OhMVfoRR8o7HV3.E0iTf.eTgcanevZLOysE+PnjPagGIXX5e4hw7xyWLOimoN88HpPx7exd5EGj5IiSECRLF5mM4vVwGJNafkeGnV+DpubPq7bl0uZ8HxgzNh.+j5vYluC8.vQ5RxKOoIz1WHjcY7CJ98HNm0NBQus4DHzc00ucWRnp6OnyR8Tci9gRgeJVh9fE1vcyQsOX7S3qe00fec9B0++5Fv+txdGMiQGcoukly8XeZTlLKkoxoefeyYLhy1O8Q.hOKN5pHyOZJNcVbzUke7.3SigdI+..t2SzWB29rKQFD0z1c66aK5G3PAnxglcUu0yXI0MLwiqoFq.jMk6FM3OgeISVWM1HYx5oS9ehO7INAhG6D+hK00IGORBD27nufaI7tpwl0SelEFWasZp1SYO1wQ0vvk.9Y71r9BXyUV.at5BXy0V.at9BXyWt.17US0F0Gy9l8gpVw6+AAs2NtdkQVcOikQ+ELr9nT
And this is my non working attempt at implementing what you said ...
HiseSnippet 1645.3oc0YslbaaCDFz1z0RINSRZN.b7O5HO0wVx4QSZmLgwxVoJwOTKyi9X5jAlDxBio.TIgbhZFOStA8JziROJ8+8O4FztfOAEonTUSZSjs0LD6tX+1uEbwB3NdbahuO2CoU4IiFPPZWT2ZDSzqYOLkgZuKR6R5Gf8EDOivg1Yz.ruOwAoos3CkCnUYITvm2d+cvtXlM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O0wwizkGRkY94yrlITZZeK5uOZNPtElUFTtcLsTblnsFwY9xeZrMTaSUKUadx2xs1qefh0L+0Qr1qGyZu7dle.cSWb9R1m.8eq67S+yoGW0uJy+i2TBy+q+Fd19Ukx7vHWWJfWW2vODojQiFuVYnh8rJSUKiW16R5DRCpVurrlXFPjBY2ePpsedo6Uz6RE18JmuUJguvgOen4aZmRqpmTkbNYWVu8OrnsEUdWaMJqsnJJbYkg8tR866QtaduqIBLjRZNkdWQn3ZFTE73BIznezrjta6vNENWuK2CGLp6eoh64klu87L5Nc54Hxsjw+kb5klubjYzi5kRHotNzUX5W1J1e3rIV6.xuEQX1JBWwT9BC5jGyLek4iwmRb4A9oWlND99jS.CoJI+DSEgV9btnGkcRwWCw0L2my6uGCCacGU861CGJqgCJLTMT2JJTv8y3R76ovBNyJtF.seV+12bC3w8Kj+9aZA+ZyCe+LF8uH7MibrJyYN1mEGIGFxjwzOxO4LgwCym9DfwWUO9nHiOYtb5p5wGU9oCgurNTQ8GAz8A7HAb5yAXn8UYwL2Ox2hGEXS.pxfR9kcroUQdBSx3FxwRBYQXNwCjkHkNYS4XszIalMopK4BItjymjeE6IVI4uKdhbgltUaMpXa0pyzlPbjMHqfvbyMey1YxUADOw97m0ELn76kpUAdO5XRQ6Zd.UoH22V9Y4u2tu8+knx+G1vGaGvehcR2rxC4WIVBruYwuN8p5GHGazLqCVc8Faz.AEhSehssrLtuDxZKGyMV.Lat.Xt4Bf4VK.lau.X9pE.yWOULx+yB2IBpkH4TIPP28RphPaX0HPKN+yB+sNK
-
@Lindon wow...I was way off , understandably so , 0.001 % programming skills !
Thanks mate , this was driving me a bit mad!
Seriously ...thanks !btw> did not know about this if (Sync.getValue() == 1) , very nice :P
-
@lalalandsynth no problem.
Clearly this allows the user to decide on two completely arbitrary values (one for each knob) - so (say) turning off sync and setting the delay time to 50 ms, then turning it on and setting the delay time to 1/2 will make the delay flip-flop between these two values - one very short and one very long. But in the end we rationalised it that the user would probably have two very different scenarios for using Sync-ed and Unsync-ed so that was OK...
-
@Lindon Yes , That makes sense , although I have seen where the unsynced value approximates the synced one.
But this way is fine.Thanks again mate ! Onwards ! ;)
-
@lalalandsynth - yeah you could do the maths - but its a pain...