Juce C++ Learning more


#1

Are there resources beyond the tutorials? does anyone have any tips as to how I can improve and learn more about JUCE? I’m currently aiming to view the play position of a sample as it plays but it’s not clear what does would do this?


#2

I suppose a quick hack for that is to use a Slider. (Which could also be used to seek in the file.)
Otherwise I think you will need to do your own little waveform viewer Component, with some help from AudioThumbnail and AudioThumbnailcache. (Juce does not have a ready to use waveform viewing component for audio files/samples.)

You can take some inspiration from my class, but I don’t recommend copy pasting it directly into your code, as I haven’t designed this class to be reused by other code or by other people at the moment :

https://bitbucket.org/xenakios/paulstretch2017/src/62fd4f8112ca288524d964792c5ba2ea311cba86/Source/MyComponents.h?at=master&fileviewer=file-view-default#MyComponents.h-93
https://bitbucket.org/xenakios/paulstretch2017/src/62fd4f8112ca288524d964792c5ba2ea311cba86/Source/MyComponents.cpp?at=master&fileviewer=file-view-default#MyComponents.cpp-198


#3

Thank you, I’ll examine your code…for the “quick hack” how can we get the play position then send that to a slider that moves in the GUI? May audio class looks like this:

is there a way to getValue perhaps to receive the play position data?


#4

The demo app contains a demo that does exactly this, with a play cursor, thumbnails, zooming, etc!