get current position in sample?
-
@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?
-
@ulrik Why its Not working?
HiseSnippet 1227.3oc0W0saaTDEd1XunZCEQghDWNJvEtRso1kjVDHDNw1AYQbhUbZKWDopI6N1dTlclUyNqaLnJwM7BvSDOB7nvUbKblcVu+j5DkXRpf8BKMmybl4aN+7cNdnR5QihjJjSsilGRQNef6n4B8zNSILApeWjyG5NfDooJrUzNyCIQQTejiSku2HvoVUTx2e9c6P3DgGMWDB8BIyitGKfoykNr8Ov37cI9ziXAE18ls66IEcjbYLfmJtMQgDuSISn6SLaaMWjy60ymokpQZhlFgbptize9noxWKr6+ErH1IbpYQKzH3frh2Ux8MH1HE0YJi6Obw6NBgbbGl6EpX8B22c.ymkIO2a7QIJv4VTze3rVY3UoD7ZUDdMK.uk.ImBPppER2ycjmhEpy0Xvy661W.AmwDvsWDJ18hV6ubb6HgcHzaDPNktqBVjYQim1r4CwvOO3apWGb8QZ7LhBOjHn7V3uEuvxITcGYPnT.KZrtU85fM4lrcrOStmTFNjSlSUFiSRiLllnaDIHjSyvdi0SjhMlfSswbh0sG9FQTsI2P0gv4m.IAMFGK7zLonwCp+y0qYtRuXkBvCbSm+xSvqUKedWVTnQreegO8rFvcTCdVQRNciPECdOomCn3MF.73GigvmRi0SoXsACYXxHNAUMdxVItr5KPEVJ1WpoGjBu5uoN97pFOdo5LtXkjygCcYpsW2kXXCQbvIT0Cgn.OllsQHqobpn6EmJVrRwyFwKrQonufoOHjJtn5GTZZhIsMEUPgpNIo8SSSZSBQujLiNVpBPLeSgTIYsPIOfhTG9DMA47atc95iedDUEcrh9SD5wcoQmpkgG2Yd.Qy7hv1TKHq06znboOBefh3AxKn93ATtzmQW115vgZGlGNYK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