get current position in sample?
-
Is it possible to get current playing position in a sample, in a Sampler or LoopPlayer?
-
@ulrik I'm referring to this:
-
I don't see a function that gives access to it.
-
@d-healey Hm, it could be useful to have that function.. @Christoph-Hart ?
-
Yes that is actually a good request - also it‘s the same for table ruler positions and highlighted sliders in a slider pack now so you‘ll get these too for free.
-
@Christoph-Hart Horray!! 🥳
-
@Christoph-Hart I just noticed your new commit, is this feature in? 🥶
-
Nope, not yet. I'll try to include it when I work on the complex data types next time.
-
@Christoph-Hart Ok, thanks!
-
Next time was just now :)
Just create a reference to the actual data object, then call
getCurrentlyDisplayedIndex()
. Works with Tables, SliderPacks and AudioFiles. -
@Christoph-Hart said in get current position in sample?:
Next time was just now :)
Just create a reference to the actual data object, then call
getCurrentlyDisplayedIndex()
. Works with Tables, SliderPacks and AudioFiles.Awesome!
-
@Christoph-Hart said in get current position in sample?:
Next time was just now :)
Just create a reference to the actual data object, then call
getCurrentlyDisplayedIndex()
. Works with Tables, SliderPacks and AudioFiles.But the playhead still isn't visible in my compiled standalone plugin... not sure what is going on...
-
@Christoph-Hart thank you Christoph, it works great, is it possible to get a
setPlayhead as well? 😬
-
@ulrik Did you get this to work? I am trying to get a custom playhead panel to display the sample position... No luck so far.
-
@UrsBollhalder yes it works, I use a timer to check current
Timer.setTimerCallback(function() { var current = AudioFile.getCurrentlyDisplayedIndex(); Console.print(current); });
-
@ulrik said in get current position in sample?:
@UrsBollhalder yes it works, I use a timer to check current
Timer.setTimerCallback(function() { var current = AudioFile.getCurrentlyDisplayedIndex(); Console.print(current); });
Allright... but... I have a Sampler with multiple audio files (5-7)... I suppose on the onNoteOn I have to somehow feed it the right audio file, no? With the AudioSampleProcessor.getAudioFile??
-
@UrsBollhalder Hmm....yes you have to make a reference to that particular audio file, I don't remember how to do that but I guess you'll find it in the documentation
If I remember correctly, I think you have to make a "selection" of that file using some of these methods
and use it when making the reference ...
I've only used the "getCurrentlyDisplayedIndex();" inside the AudioPlayer, not the sampler
-
@ulrik ok... That'll be fun...
What is meant by indexes in this case? I also saw this one:
slotIndex?!Thx for the help!
-
@Christoph-Hart could we have a small snippet showing how to
getCurrentlyDisplayedIndex()
from played sample in a sampler?
I've fiddled around with
createSelection() createSelectionFromIndexes() and createSelectionWithFilter()
but I just can't getCurrentlyDisplayedIndex()
from any of the selections, I guess I'm doing something stupid 🥺 -
@Christoph-Hart I guess we need to enable this for creating the proper reference to the sampler, right?