Get Root Note
-
const var AudioLoopPlayer1 = Synth.getChildSynth("Audio Loop Player1"); const var knb_Root = Content.getComponent("knb_Root"); inline function onknb_RootControl(component, value) { AudioLoopPlayer1.getAttribute(7, value); }; Content.getComponent("knb_Root").setControlCallback(onknb_RootControl);
-
Probably need to get it as an audioSampleProcessor
-
@d-healey noop the same - its not work!
-
What error do you get?
-
Works here
HiseSnippet 938.3oc4Ws0aaaCElz1pn16BV2xC6Qgh8fCPWfzVuLfhhllD6AikjZDkUrWFJXjN1lHTjBTTYyXX+G2Ok8OX6PIKK4DAOWsa.a9IwyExOdt7cnmpUgPZpRSn8ubYBPnuuSvRoYwwKXbIYxID5G5bFK0.Z2BQGsLgklBQDJs6WaEP62ij+6We4QLASFBUhHj2n3gvo7XtoR5zC+FtPLlEAWxiqY8iObRnRdrRnxP7z0wijvBulMGNmYMqiCgduQQbiRGXXFHkP6cjJZYvB0OHKr+M7T9UBvtvmDfaTg3wJQjEw1uIGufKhlVduSIDpyzpnP2hnvdNmwi3qkWEM9nbEtUdTOdP6rM342R3QqAudEv6ANAgZdhoRiEaumyDIlnlwvTPcXUXKoy2ScNVgVHMGDytFFqwEq8X3S87dj6S771+4CFfogTi6MLs6qxh3pSUpjoB1RP669B275iClClbcAr3DArFHCeXtTWqKtq74g1sDO4Tk.NHQyklg2day2NiQyuJy.2U6EJk4bkA1e+mOKSFZ3JoqRZk7Z4v8G7SC5O3mG3daUyl0nNaLPqDBP2nZaModaNNTlEeEneDFeDYvZCwjylY+6saY+vhTRMCUxIRt40Ivp0U0G9MTePVkSwu91ImvLLaIyJYncIf1vsvgdBbC1KVT.024DH8ZiJA6FuS0EViqhxDLylE91t8UJv3wFUX1pHYJ2rrNav6P2fWicCMda2Q39.mobS3hlwamFvKF096Fuq3V9.mQylAglJv1yY720Vhj1AkOoDJqa0fBNj8bta+6V37+kckyOYm47Q5kPLsA0KkxykWpwoAb475GkElijLLVDUWbIeQ8YNEDUXDUavseCqga.c5l6vXtnZrSr8J6PsxiY+X4mB7ry2t5BFIiJWR61poAa1lUy9FFMz6egIW+02q9mmZo6tA2+fgq8KwX.2VpLRdCHvFibL9wHg4LVlvTJcythyTRUxBkjGtYgENQa9bPWG6MdgvYeXwckj8N7BP.rzZUve1gmxk.Se6di2gXg+tGK1V95ScJfqqsU18+FiD59+yQBWnxLHk5YLrP0RrcdVb.xDGBHRjRPjZIy5XejQwZuRxs.PFku32veqT5aWSWozuT4+HmQLKTqdaXwCzr0x2OWBduk4j38w+DCt10mj+nMzOGuC7Ph8H9aCCsg6O2mPZ1munE97ksvmG2BedRK74osvmm0Be9ps5icXzqxLp3hVQTvzQ4udkRWOPm1k76jALje.
-
@d-healey said in Get Root Note:
Console.print and Knobvalue changes after click "Compile" - and only then.
if the knob in the module changes nothing happens.Label does not change.
I am completely lost?
HiseSnippet 1306.3oc4W0saaaCElJNrq1asXsKWzKEB1EN.oN1aMcqnXnNwwoHn4GuH2fcyV.sDsMgoHEjnRiaQA1E6h8zrmg9HrWg8Fr2fsCojrjSbR87PJFV0Ulm+324PxuywcBktznHYHxpb2wATj0mgcFKTCaMjvDn81AYcW7AjHEMzNQz1iCHQQTOjkUomqEXUdYj46Oe11DNQ3RyEgPmHYtz8Y9LUtzNMeAiy2k3Q6x7KX8iZtmqTzRxkw.dJgqiBHtiHCnGRzlsDFYcq1dLkLzQQTzHj0xaK8F6LT9JQh8mvhX83T8hFHGHPIh2Ux8zHVKE0ZHi60IKuiPHKbm7pPojpvJ3CXdrIxyqFetQgctGEqGVKccvqQQ3Ue9gmUA3sbB7tG1wMjEnx0nw1mh2S.GT8IvQPQXkXKZo3R3VRvBgplOYDc2PXwDOp9350W2dy50W6oUp.GCQJ6yHg1aE6wj6KkAc3jwzvF1ems49QsATkQmCwOfSm.jpqZjZqcwN0mUgPlGwWHj8zgICJPfZI8CjBXQ0UMZ0N.efEQRNsVPHCTcQjXPfREx5EqnWV6wRo5PohtlIVLAmIn18iEtJlTXKElMRigPIupaF.VGfHOltVk2To7Dg0h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UrR5m7TDDzos4+LXYMYB.qRn+FRsGD3C
-
changed()
isn't a function by itself, you have to call it on a component class, likemyButton.changed();
I don't understand what you're trying to do though, do you want the loop player's root note knob to be set by the knob on your UI?
-
@d-healey said in Get Root Note:
changed()
isn't a function by itself, you have to call it on a component class, likemyButton.changed();
already clear - Tried everything
I don't understand what you're trying to do though, do you want the loop player's root note knob to be set by the knob on your UI?
Very simple.
When you load a sample in the sample player, the RootNote stored in the sample is displayed in the AudioLoopPlayer.I would like to put it on a knob that also shows it in the GUI when changing a sample.
and with which I can also change it if necessary.like in the snippet. when you throw a sample into the player it shows you the RootNote. The button in the GUI does the same but only when compiling.
-
@MikeB You'd need a callback that is triggered when a sample is loaded, maybe the pre load callback does this. Putting it in the control callback won't work as that callback is only triggered when the knob is moved. You could also link them by parameter id, I'm not sure if that works in both directions though, and it won't change the label.
-
@d-healey
I have tried a little bit and I can't take over any value from anything.Neither from AudioLoopPlayer nor from a filter or delay.
It is not possible to show a value of a parameter of a module in a knob in the gui.
At least I don't succeed
It only works in one direction from the GUI to the module. -
@MikeB Did you try the preload callback? It is possible with a timer, but that's not a very efficient way to do it.
-
I can only find these two functions and both seem unsuitable - don't they?
getPreloadMessage Returns the current preload message if there is one. Engine.getPreloadMessage() getPreloadProgress Returns the preload progress from 0.0 to 1.0. Use this to display some kind of loading icon. Engine.getPreloadProgress()
-
It's actually part of the panel class (not 100% sure why).
-
@d-healey
I'll try that out tomorrow.
Thank you David. -
This does not work.
Question in the round
Has anyone ever managed to display the "RootNote" of the sample loaded in the AudioLoopPlayer in the GUI?Or the value of any knob of a module?
-
@MikeB Did you try a timer? Maybe have the timer run when loading a new audio file and then turn itself off after a second or so.
-
@DanH No - but David advised against this.
That would not be a Healeyfied method:-)
-
@MikeB Seems like a perfectly reasonable method to me!
However I'm not confident the preload callback would work - did you test that function yet?
-
@DanH How would you trigger the timer only when the audio file is loaded? If you can trigger the timer under such a condition then that would be fine, but then why would you need the timer?
-
@d-healey good point re needing the timer if you can trigger a callback when the file is loaded (assuming the root note is instantly assigned upon loading)