Create a PlaylistComponent in the Projucer project
Thursday 6 August 2020
1. Go to Projucer and add a new Component Class (split between a .cpp and a .h file). Then don't forget File > Save Project.
2. We want one playlist - not one for each deck - which we are going to add on the MainComponent. So in MainComponent.h add
#include "PlaylistComponent.h"
3. In private add the following:
PlaylistComponent playlistComponent;
4. In MainComponent.cpp go to the Main constructor and add
addAndMakeVisible(playlistComponent);
5. In resized() change the code to the following:
deckGUI1.setBounds(0, 0, getWidth() / 2, getHeight() / 2);
deckGUI2.setBounds(getWidth() / 2, 0, getWidth() / 2, getHeight() / 2);
playlistComponent.setBounds(0, getHeight() / 2, getWidth(), getHeight() / 2);
On doing a compile and build this should now redraw the GUI.

More posts in cpp
- Add a component ID and converting between ints and strings
- Implement a play button and add a listener
- Implement paintRowBackground and paintCell
- Add a vector to store a list of files
- Add a TableListBox
- Create a PlaylistComponent in the Projucer project
- Threads
- Implement a timer
- Add getPosition and setPosition functions
- Refactor DJAudioPlayer to use app-scope formatManager
- Draw the thumbnail
- Hook up the load button to trigger the AudioThumbnail load
- The AudioThumbnail class in the API
- Creating a new component - WaveformDisplay
- Implementing drag and drop triggers
- Use a MixerAudioSource to play more than one file at a time
- Implement the listener interfaces to DeckGUI
- Creating a DeckGUI class
- setPosition control
- Implementing setGain and setSpeed
- Add audio playback functionality
- Writing the DJAudioPlayer class
- Creating a new JUCE class with Projucer
- Refactoring our code
- Using ResamplingAudioPlayer to implement variable speed playback
- Add stop, start and volume functionality
- Add a file chooser
- Audio file playback in JUCE
- Realtime sound synthesis in JUCE
- Adding a slider listener
- Introduction to event listeners
- Macros
- Inheritance
- Adding a GUI widget to the JUCE app
- Introduction to JUCE