Audio Thumbnail Demo


#1

I’m exploring the Juce demo build to learn about thumbnails.
In the AudioPlaybackDemo.cpp theres a DemoThumbnailComp class.
on the pirvate of this class are the objects:

AudioThumbnailCache thumbnailCache; AudioThumbnail thumbnail;

How does DemoThumbnailComp declare these? Im attempting my own thumbnailComp class and it won’t accept : public AudioThumbnail & or create the objects AudioThumnailCache & AudioThumbnail. I was asuming they are part of the Juce library, avliable to call or inherit from?

Thanks


#2

This is a good place to start:

https://juce.com/doc/tutorial_audio_thumbnail


#3

The AudioThumbNail stuff is part of the juce_audio_utils module which for some reason is not by default added by Projucer into new projects, so you need to manually add that module.

And don’t needlessly inherit from AudioThumbNail for your component, use it as a member subobject in your Component subclass.


#4

I havent used git hub before https://github.com/WeAreROLI/JUCE/tree/master/modules/juce_audio_utils/gui is it as simple as downloading the source files here to add the module?


#5

juce_audio_utils is a standard Juce module which you should already have.


#6

I thought it had to add manually ? i dont see it anyway on the Juce modules direct i have…Theres a long list of files in the link you send me i guess I just add the onces i need?

edit: I’ve taken a look in the Juce folder i’ve saved in my documents. It doesn show up in xcode but it is in the module directory, I think this is what you meant when you said to add it manually? How can I do that from xcode?


#7

Add it manually in the Projucer and then re-export the project to Xcode.


#8

and thats possible to do in a already developed application?


#9

Yes, but you may lose manually made project settings in your Xcode project. If you’ve made extensive changes you don’t want to lose, you could attempt manually adding the audio_utils module, but someone else will need to explain that to you, I don’t remember at the moment what files need to be edited…


#10

I’ve made an AudioThumbnailComp class so it can be an object in another class. It inherits from AudioAppComponant.
In the class that uses audioThumbnailComp it asks for an explicit initialisation how do I know what it needs to be initialized with? Its not clear from the tutorial because its not demonstrated in this context?