A way to make preset up and down buttons? (SOLVED)
-
-
@ulrik honestly mate no one can be quite as stupid as me at times....keeep.contibuting please.
-
@Lindon I will :)
-
Sorry guys. One more tiny question on this...
It's working now, but I'm trying to have the buttons set to 'isMomentary' so that the animation only happens for a second when the button is clicked.
When it's set like that though, it skips 2 presets at a time. Any idea why this happens?
Snippet here:
HiseSnippet 1220.3ocsW0saZbDEdVaOsFRnoQJO.i3JP00A7+oNVACF2hhMF4Emz6hF1c.F4kYPyNqsQQQJ8MoOA8YnOB4t9Zz2f1yr6B6hMFagjWeimyey24m4bNzRIcX99RExJS6QCYHqmisGIz8q0mxEnFGgr9IbKE6JRS1MZB7e9LM4hgDpvkbj7ZAoZfVKE9j10saipNZH02m4hrrV9WMFvJyJnvu+8cUodTgCKgDB8AI2gcBe.WmPsUk2y87Nl5xZyGjR5spzvQJpI8jA.XWFWBMj5bIsGqI0H1RXj02U2kqkJaMUy7QVqTU5NxtO.xH4+.2m2wiYNTFYCFJh7wROWChMTQ05y8baMNn3i.qzJIDsbTH5U3S4t7IzSBU+XHCRhFoiGVKMO3UNM7J83gmUJ3sRD7dI11QwGpS3Xv1yvMDZlpKERAogUjrnkVdEbMIHgPu9.5kriUvgIZTXmRkVircoRE2OWVyeu90SUPDUDjK6XKzioqIGLTJfCExajrpVju359F5BsR5Ui540ARfEjhX1wLhtAtviKXjtABGMWJH2VpBNiM+ZjqndArh4x94bYIlu5hdftq6IotFktvmohfYgtTOel4B9x9wNgozlKC7ebNhQ543Hwre.GYZodjNxXbNWmw92N6ijZWb940a1lz57510aSZd3o0IMZRNjbxgUqeRtrviHeMbUJxIzNLuxjCHy1YiXm+9bi2KjcJ+vNAuKoPreXLefRARk3ElGuEJRN3.R97Eica3a9HxD8KjWC417qQx2Pv0gnznHChIKjYdPLlDomsUCiG2WkQ5fUw8SWUK0ryDEJl8yYyj8KYI2lU2tyjWro7XpYx1z4TMOEKHBFzgoFmsFKHzBY5dT36uGU5VnNQQjTBJElzxYCYh6qyEJNLZ5gEiJPTcXGreHtClsG2koPbnQ02iCignP.GOU3qu5u9m2gtnwQTMcrY.KB2xPlRyMNf0Qv6FGVTiwL3iX9WpkCAGaRlC74G7RuIYLzgUFkbX6JnT14Y53oCQ14X3cqlK50lCALi0dAdXX8TUk7Zn3JsU2JkU+Z6JWyc08mP3u+iJ8Y7d8SFR9sapD6qQN1Kvslxxc5MdN4ywaUdmR6t0a1dm8PbMaPJFar2t6r6tk2ayTL1Hhya.EJWt71nvPq0ehCeMm2jfsoWwh5Rl+WHZU.asIrBGUotGllxY+6P0TtEuAwcMG8JoBflYt+TLaFXPavfPc1DdVhRmFVc5zYj0CS.Yvw8dSE5qvmNgNcnGxE2JzidaEeHBzPDEwip+49mJG.WNUA1xZoGKZhGokFMpmVzfiPStXzD1ILDLqhi5JlBKeaTZr71JlFkvNVXN7vFVS6Nqc.K+HcC7n5o2HxrFXLCnEzTqdXVuP3y0iRul3SxZROV39RbKt1o+rw6Ry.uPammZ7FuzYNb8tcYN5DvtB93e+oeCSz4x.SarSoZEGpNvvqOanSgCCPhP.CbAZPUlQ0vykLmMQFalvM7v+AewLKaNaEyr7XlnATGk7SNQiALq0tZHE.Shvs6yfO0blLo+OFWZ8RnAv11exwwDJ9Y.6yVmMV.c1bAzYqEPmsW.c1YAzY2EPm8lqNlenygAZ4fnmI.gV0iFVXUWPgprvJRz+CLMt6mI
-
...damn, ok... it looks like 2 questions...
I just added it into an actual project and it also opens the preset browser as well when you click the prev or next buttons. Is there a way to stop this?
I use this code to show/hide the preset browser...
// Pop Up Preset Browser MAIN const var PresetsButton2 = Content.getComponent("PresetsButton"); inline function onPresetsButton2Control(component, value) { if (value) { PresetBrowser.showControl(true); } else { PresetBrowser.showControl(false); } }; Content.getComponent("PresetsButton2").setControlCallback(onPresetsButton2Control); const var PresetBrowser = Content.getComponent("PresetBrowser");
-
@SteveRiggs if the button is set to momentary, it will send value 1 when mouse is down and then value 0 when released so you will get 2 values after each other.
if you useif(value == 1)
it will only trigger on mouse down.
like this:inline function onNextBtnControl(component, value) { if(value == 1) Engine.loadNextUserPreset(false); };
it will only trigger when mouse is down (1) and skip mouse up value (0)
-
@ulrik Genius sir! That makes sense now. Works perfectly. Thank you
-
@ulrik It's still baffling me a bit why the preset browser opens though when the prev or next buttons are pressed. Very weird!!
-
@SteveRiggs Post a snippet including your code that hides/shows the preset browser.
-
@d-healey Cheers dude...
Heres the code for the show hide preset browser part:
// Pop Up Preset Browser MAIN const var PresetsButton2 = Content.getComponent("PresetsButton2"); inline function onPresetsButton2Control(component, value) { if (value) { PresetBrowser.showControl(true); } else { PresetBrowser.showControl(false); } }; Content.getComponent("PresetsButton2").setControlCallback(onPresetsButton2Control); const var PresetBrowser = Content.getComponent("PresetBrowser");
.. and here's the snippet (no idea if the images will show up though)
HiseSnippet 5175.3oc6c07aajjcuokaaKYKaYOdlclMXAJnLIPNwRjMIkD07ATSIQIw0he.9gj0taV5VjEE6QM6la2M0G6.m0IXPPBP.1qYyIij+A1q4THxobHAH.A4t2CI.4lykbMoptqt6p+hroj0L1ikNH6tqudueuW8du5UU0prpRSnllhJSrIqcVOHSr6vV8LY8Nq2QPTlI+FLw9iXyJKn1ryYf0U51qQQ3IPMcvdJpGIJeH9QvVpB85H1TiYsy5InoAawDK1DagaerIuNiwOud00DjDjaBcdECytJhMg6H1UT24sk4ehnjzlBsf0D6RU6z74apHuthjReDsNAaBldBMOR3PXQAb0tFKSrajqknthZUcAcnFSrqulRqyp1Q4DYy5uqnl3ARP7CbLUQcj4q2TQpElhwukY8NhRsJagIZLLwXK6fPSXhPOjsfXKQ626fTyXT.voEz3QrqMLxiil7RDcxKFE4ccSx69rUapJ1S2oDLsca17x5P01BHQ.MYYVWlq828.10UP0PVegtBGA2TE8fcKlKShDOFjZokezmO8TSOU73f0UgH1vPiP0XP.X4MnBrU+l5hJxfBPTaA6JJqijQ.bqPhOjdywBpfMNSVnKReA7k.CcsENDpmqcaXS84l0prYMGJmF4z0eIvhRQsCSAJxnGlaV6ZPZq61q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qqPIw8qqPU3ETWYBqKIElhgnI9llqHzOvjAbqt71zLpqMrYTS7FaF0CrrOYmxPLLQ8n6uWf5PyczsE8bB7qctuGdJfbV9ozKwu05LbRch9cxMoug30qFzEKg5Fy58blScSV8cqBntlr9OIpTGgTiO5gP0.3WRIdoDzBQdz.RY94ZRAtGnWt0u62m2WRY8OT9K36XUUKcp.mPaUXfSnuFQONPU0IHEFnp5sr+3WZ+4SwPY0ywKOjOvkCvWM4Mf3DXPAi64dEm6yGvm.y7FalPYEIAUuQx7FyYv0ib3VFeIedmI7vGvZ.4uKQvFpDu6PvyvVV3c13BdaxLhywTI7OQt6O3JKHWYA4JKHueuxhvsfXcplB2BBCyUVPtxBxUVPd+NFjQkUvjuylUvuKPyHkomju0lomyuWKprt52qkQoQZ4yEDzzgpjCO6Utttx00UtttJ32vL1dW6sfQTFZ7Me1.G+HimMt3Ofsfxv.1LF2VS92h5esY5E4+ZyTpoNZ3qoJHq0SQyUGWE1UrlhLTi9k00fapB+EzoLl74aSPMvhd8pahXx.aiydz3cqk7am65QyN2H1kwq+V8e0a91a6tmHZj6H1AtIsnQSui4PNsjTPuwxJbag9R5Vu0sdcAEYkdcTjEaRKzq.QyjO7PnJMsGHC4cuBdHuucG4S42Ao3InVv7lsbdvh2P6F4GS9nNAvSFAe+3XJLw6kGSAutbXCzky0tPtbdK2slwk6rQSyqxIdVvsLdCBwjIeqYLtqm.6OSmrrIVHA95gI1nYSrfZdDxFbaRdNZSpyQaReNZyhmi1rz4nMKeNZSlg1FraL7IFsq4jXzKJmy7DEFydiZQKV7+G.CpAMG
It's meant to look like this :)
-
PresetsButton2 is set to
saveInPreset
;) -
@d-healey Christ! Yet again the dreaded saveInPreset rears its head to mock me lol
Thanks mate. Fixed, and noted!! :)
-
@SteveRiggs Thanks for this !
Will the selected preset be saved in the daw ...the project ?
I guess so , just want to make sure. -
@lalalandsynth No probs. Yeah, the presets have all saved in the projects in Ableton so far that I've tested :)