How to : Use a plug-in internally

Hey everyone!

CS student here tasked with making a music player app for finals, been meddling with the JUCE framework for about a month now and consider me impressed ! It is really well documented and thought out as a framework, (at least for someone on my level) so a forward thank you to all the people who worked on it!

What I have not been able to understand yet is whether or not (and how to be honest) I can implement sound effects/processing on my app. Any effect I have tried from the tutorials (e.g. the sine wave generator or white noise) can only work on its own, that is to say I cant overlay it on the playing song. Another example, I’ve been thinking I can make a small sampling mod that can work on the fly while playing a song and sample a part of it by pressing a button twice (start and end). I thought about trying to do it via following one of the tutorials and making a plugin(s) for the effects but I can’t really wrap my head around on how to use them with my app , or even if that’s the proper way to go around doing it??

I have currently a perfectly capable music player with functionalities such as speeding up, skipping ahead or back and gain.

I have scoured the forum looking for topics of interest but to no avail. Any help would be very much appreciated!

Check out the AudioProcessorGraph class - you can then create a chain of AudioProcessor(s).


Is your existing app made with JUCE?
If not, it sounds like you’d have to merge the audio buffers with the ones from the examples somewhere. But maybe you’ve done that already.
What point are you at?

@railjonrogut Hmm, If I understand correctly, I would have to make an audio processor module/component for each effect I want, connect them to an audioprocessorgraph, and then connect them all to my main AudioSource component that’s actually responsible for playback ?

@Chuckk Everything is made in JUCE the JUCE way ! I have an up and running GUI and AudioSource class that’s responsible for playing songs and providing speed up/skipping and cueing up tracks. Playlist functionality, e.g. loading/saving etc . That’s about it, but I want to add basic sampling and a couple of bass/treble sliders as well. :sweat_smile:

Right. You’d make all the connections and in your processBlock() you’d call the graph…

    if (m_pMainGraph != nullptr)
        m_pMainGraph->processBlock (buffer, midiMessages);