It would be quite useful to have an internal audio file player filter in the plugin host example. There probably are 3rd party plugins that just play a file, but it’s an additional hassle to find one that would also be cross platform. It also isn’t as convenient as could be desired to use a sampler plugin instrument for this.
I just worked a couple of hours myself to add such an internal filter for the plugin host and it wasn’t too bad. I am sure the Juce developers could add a better one in a fraction of that time…
Totally agree on this. My current solution is a cobbled together straightforward port of the audio file player from the JUCE demo into a plugin. This would be an awesome official utility plugin + example project for the JUCE team to make!
Nice to know there is interest to have this added!
I could also show my code, but it doesn’t do anything special at the moment. It doesn’t currently resample files that are at a different samplerate than the host is running at, and there’s no IO thread used for the file reading. Naughty me. But SSD drives seem to handle the playback fine anyway… Also the GUI is just a FileNameComponent at the moment.
I was just trying to do the same. I got curious about JUCE just recently and I’ve been fooling around with it for two weeks for now as a side project, but it is a bit hard to grasp how to combine these two examples, so I’d very much appreciate any code that I could have a look at how to implement such a feature.
If you aren’t too shy about sharing your code, no matter how crude, it would really give me a good kickstart here!
My example’s current status is more sophisticated, but partially in experimental or ugly state.
I can publish it as soon as it is cleaner.
Additionally, it will only fully work with the revised multibus API.
It will be including a multifile player with audio thumbnails and a recorder.