There's a lot of info out there scattered all over the JUCE forum, the Audio Programmer Discord and beyond.
It can be hard to know how how to prioritize when getting started. What is critical? What is nice to know? What's agreed upon vs. just someone's random opinion?
Here are some tips by people working daily with the framework (please feel free to add yours!)
This might sound obvious, but it's especially true with JUCE. Historically, the community hasn't contributed much to official docs, so they often aren't beginner friendly. But you'll find thousands of beginners on the forum, all wanting similar answers. The search is your friend.
The tutorials are very good too, they describe a lot of higher level concepts.
If you are using the AudioPluginHost as a test host, you can save your "patch" with everything wired up.
File > Save the AudioPluginHost settings as a .filtergraph
. When your IDE loads the host next time, it will autoload the last saved "patch".
Bonus points: add an EQ and whatever other metering you might use regularly to the chain.
DBG
will add dropouts and glitches in DebugDBG
works with strings and allocates. It's likely you'll hear issues if you fire too many of them in the audio thread.
Can't have your cake and eat it too!
If you are in Xcode wondering where your DBG
output is:
View > Debug Area > Activate Console
The order matters, specifically on destruction.
Members are deleted in the reverse order they are listed in the class. So, you want the look and feel to be deleted after the component using them. In this case, customLookAndFeel
should be declared before myOtherComponent assuming the latter uses the look and feel.
class MyComponent : public juce::Component
{
private:
CustomLookAndFeel customLookAndFeel;
MyOtherComponent myOtherComponent;
}
Furthermore the customLookAndFeel could be accessed while it is already being destructed. Therefore you should add setLookAndFeel (nullptr);
to your destructor. If you fail to do so, a jassertfalse
on shutdown will remind you.
When specifying heights and widths in JUCE, you are specifying the "logical" number of pixels. They are device and resolution independent. Don't get them confused with the number of physical pixels in your screen!