A Button that shows/hides knobs?
-
Select everything (including the HiseSnippet part), copy it into the clipboard and choose File -> Replace with clipboard content.
This is the recommended way to share little example patches in HISE as it contains scripts, control properties, modules etc (but no external resources like images or samples).
-
@christoph-hart :love-you_gesture_medium-light_skin_tone: :love-you_gesture_medium-light_skin_tone: :love-you_gesture_medium-light_skin_tone:
-
My modulators' name is PHASERLFO. I've first used "Synth.getEffect" to predefine the modulator. After that, used "setAttribute" in "onButton1Control".but it says PHASERLFO was not found. What am I forgeting?
Content.makeFrontInterface(600, 400); const var button = Content.getComponent("Button1"); const var knob1 = Content.getComponent("Knob1"); const var knob2 = Content.getComponent("Knob2"); const var PhLfo = Synth.getEffect("PHASERLFO"); inline function onButton1Control(number, value) { PHASERLFO.setAttribute(PHASERLFO.TempoSync, value); knob1.showControl(value); knob2.showControl(1-value); } button.setControlCallback(onButton1Control);
-
@remarkablex It needs the name of the variable not the ID of the effect. You've put
PHASERLFO.setAttribute()
instead ofPhLfo.setAttribute()
Generally once you store a reference to something in a variable you only ever need to use the variable name from then on (not always true but mostly).
-
@d-healey
Oh, I've pasted wrong line. But even we put "PHASERLFO" it doesn't work.HiseSnippet 1169.3ocyW0saaaCElxNZswctXcqWtKDBv.bvZMjcyx9IXnNwItyH+YTmkUfcQGsDcLgkH0jnRpWQAF1d.106oXuC6gYWu2fsCEokjSTbr6V6FuHw7b32gemCO7bn5ExcHQQ7PjwcNYR.AY7tl8mvDiZOBSYnt6hLtq4g3HAIzRIZmIA3nHhKxvn7SjBLVcETx3Oe7NXOLygjIBgNkScHGP8ohLoAs1m540A6RNg5ma0azpqCm0l6wiA9T1zFEfcFiOibDVtrRlnyojKhPF1lOpY8vwMF7CaWWNFJ+yypOcz6II+aOoljEfbhCCILwo.bjgoweACCy8boBdXeAVP.atxNb2I8Gwufo15SoQzAdD4jFn9.mTh6v8bkNuTJp8HpmauogvHDXkdYAzxp.58MOj5RSkmEXeuDEVYHxGZMJMO503lomcQzyHG8VQQu6Y12IjFHxzH41cL6x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3SWZDe1bPH+J1sig5VpVCHzeCf01RwA
-
@remarkablex Well the error message says
PHASERLFO not found
this should be a hint. The thing you have called PHASERLFO is a modulator not an effect, the effect is calledPhase FX
. If you want PHASERLFO you need to useSynth.getModulator()
. After you've done this you'll get another error, but I'm sure you'll be able to solve it ;) -
@d-healey @christoph-hart
Thank you, it gives unknown functionshowControl
. It's strangeshowControl
was working before but now, when we addSynth.getModulator()
it didn't work. I didn't managed to solve this....HiseSnippet 1188.3ocyW80aaaCDmxNZoQctXcqOtGDBv.bPaMrcyx9SvPchc7lQbRLpyxF1dniVh1lvRjZRTI0qn.C8KvddeJ12g8gYOuuAaGknkjcUbr6V6Fevv2c7G4u63w6n54ysHAAbej1sOepGAo8t58mxDiaNFSYnNsPZ2Q+Dbff3aFq5vod3f.hMRSq3WJUns0Fnnwe93CwNXlEIUEBcAmZQ5RcohTsdMNl53zFaSNm5lY161niEm0j6vCA9TTuJxCaMAOhbJVNsB5nKojqBPZU0eT8J9SpM3mNnhbzrxrQ2Ve2nccvSt5htQx92GFmgrB88ILwE.bjlt1eACM8iroBteeAVPf0biC41S6OleEKdqufFPG3PjB0P8ANEqtM2wV57RsnlioN18lEBCPvpzKMfVLNfdO8Sn1zD8oA12KxfYJhrgVsBKid0tY5UMO5okgdaDSu6p22xm5IRsH41s06vfy7gX3zLKshmKpvKKn2jCyfIp3hmPZ6CBIHJuW0pOvb2pU2Y+RFkLfyz.g4kXeyAgBAmY9ElyvNhHZxc83LPn71GFYt11RXoflv3CpcsXNVZMGD0WJh5Kfn2WcP+idR21mAnhR+kXNgaG5fgyfxamXe6XWpjAk4PYDyggLKAE7INSwd4l5ycJyBcGP7e.r7NgjcJY77RFlpQxpUIfHNPH7oPfgTNU84Dfs.OrlAe+TvQNbk.HSX1Nk6TpO2Tp8P0jjlKY7BoGDeXHofZVMwNNCfKbkWzW1Y+Lt4obA4LV4cLdtwVFuvXQKCGlmI0B4P7yyprJf+RfsPrTMOHCd9qHuypcEwJNqHyD4rNLp3LOhRd42wQpzJ35TQEAg+IhtLcG0ko33GhBKxV5pfIJh8YqMhtN38cn1D+H3apGcf+OAb8b.+0cZgEXYEAk2.dnGwWPkARsVjKgp1w0G1RuEIXhf6E4tpaQPvdEb3mIq09RX2lJ+y9vethZKFKE9YPXLgNZrPJ8gw9Sxhu4MFNhV5Oe1R+aW+RCkAgtFpDAshnq2ExItEsKGqo1kee46B5UqsBU3mUCIaYeYaSkAHOet5qxZnr.pXZ11pqQufpqbqpUkt2UuGUXMNe9VHG9BIUuo4qpyZI8iFNjXIRI6F5s+12xsQ2b10jdiwADX6k7vHVxbA1z1m7igDl0zZogqoMRzVOU6u1nMgXKqFqz8CCG9GO9D5ylKun37NWwUy4Vs2Ejaxv6q7q2PYuulGAkhYrtNz6T85kjdo2L+RB+oJuUC4iS6j911F+RiuAeIYH22Ucbm.uKYDDixpIo6c16D8c4bwXJaz7O48dM5x4dGwvPDvN6hzLLPvcmsoHsORu9tUleb4YvOCuu7ueVyHYTeAwKpvt12qu2hy+eqwqb+90OuqvJl28AxiVyjiOY92+yKaFy3jbq+KY7S3gBHw6DL7PSYGsSCc6CegkEAXKiQbBjcvJH6.GKWUJGkyRX1Um88RJi0jxZJi0lY7sxd3hs74O0J9YOxrmaEoA7aVz2GtE7gpfrYxikjwFW3Srdpkkr0vCgnS9Hpu1HdzZiX20FwGu1H1asQ7IqMhOcIHjeO6AgPcq3VCHzei2rckk
-
@remarkablex It's an easy one but I'll give you the answer, check your spelling, don't mix uppercase and lowercase variations. If you call your variable
knob1
don't try and useKnob1.showControl()
. -
@d-healey Thank you brother, as I say, I'm a beginner to coding. It's so hard to be a beginner sometimes :)
Thank you for your help... -
@d-healey that's how I got up to this point :)
Your teaching skills are much appreciated!