Get Root Note
-
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)
-
@DanH In my plug-in, the user can select the desired sample from 100 by means of a knob, and this four times for four AudioLoopPlayers.
A new sample is loaded with each scrolled value.
So I can scroll through the samples in 1 second with the mouse wheel.If I set a timer here, it won't follow - I think.
-
@MikeB well if you already have a callback for loading samples (via your knob) can you not get the value of the root note and update the ui control in the knob callback?
-
-
@DanH Go to the beginning of the entry.
We were already here. That was the first and actually sensible thought, but it doesn't work. Or at least I (beginner) and David (Jedi Knight) can't solve it. -
@MikeB snippet?
-
@MikeB It does (should) work. But your original post didn't explain what you were trying to do :p This is the first mention we've had of a sample selector on your UI. Post a snippet with that.