This directory contains standalone code examples that demonstrate specific JUCE concepts and techniques. Each example is self-contained and can be built independently to focus on particular aspects of audio development.
examples/
├── README.md # This file - examples overview
├── 01-hello-juce/ # Basic JUCE application
├── 02-audio-player/ # Simple audio file player
├── 03-basic-synthesizer/ # Sine wave synthesizer
├── 04-gui-components/ # Interactive GUI elements
├── 05-audio-effects/ # Basic audio effects
├── 06-midi-processor/ # MIDI input/output handling
├── 07-plugin-template/ # Audio plugin template
├── 08-spectrum-analyzer/ # Real-time spectrum analysis
├── 09-modern-cpp-audio/ # C++20 features in audio
└── 10-performance-optimization/ # Optimization techniques
- Hello JUCE - Basic application structure
- Audio Player - File I/O and playback
- GUI Components - Interactive interfaces
- Basic Synthesizer - Audio generation
- Audio Effects - Signal processing
- MIDI Processor - MIDI handling
- Plugin Template - Professional plugin development
- Spectrum Analyzer - Real-time analysis
- Modern C++ Audio - C++20 features
- Performance Optimization - Optimization techniques
# From project root
mkdir examples-build
cd examples-build
cmake ../examples
cmake --build . --config Release# Navigate to specific example
cd examples/03-basic-synthesizer
mkdir build && cd build
cmake ..
cmake --build . --config Release# Use Visual Studio generator
cmake .. -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release# Use Xcode generator
cmake .. -G Xcode
cmake --build . --config Release# Use Unix Makefiles (default)
cmake ..
make -j$(nproc)Concepts: Basic JUCE application, window management, component hierarchy
- Minimal JUCE application structure
- Window creation and management
- Basic component painting
- Event handling fundamentals
Concepts: Audio file I/O, playback, transport controls
- Audio format management
- File loading and streaming
- Transport controls (play, pause, stop)
- Position tracking and seeking
Concepts: Audio generation, oscillators, MIDI input
- Sine wave oscillator
- MIDI note handling
- Polyphonic voice management
- Real-time audio synthesis
Concepts: Interactive GUI, layout management, event handling
- Buttons, sliders, and labels
- Custom component painting
- Layout managers (FlexBox, Grid)
- Mouse and keyboard interaction
Concepts: Digital signal processing, filters, effects
- Low-pass and high-pass filters
- Delay and reverb effects
- Parameter automation
- Real-time processing
Concepts: MIDI I/O, message processing, virtual instruments
- MIDI input/output handling
- Message parsing and generation
- Virtual MIDI devices
- MIDI-to-audio conversion
Concepts: Audio plugin development, VST3/AU formats
- Plugin architecture
- Parameter management
- State saving/loading
- Cross-platform plugin building
Concepts: FFT analysis, real-time visualization, graphics
- Fast Fourier Transform (FFT)
- Real-time spectrum analysis
- Custom graphics rendering
- Performance optimization
Concepts: C++20 features, concepts, coroutines
- Audio concepts and constraints
- Template metaprogramming
- Coroutines for async operations
- Modern memory management
Concepts: Real-time safety, SIMD, profiling
- Lock-free programming
- SIMD optimization
- Performance profiling
- Memory management
- Start with
01-hello-juceto understand basic structure - Progress through examples in numerical order
- Experiment with code modifications
- Read the accompanying documentation
- Focus on examples relevant to your project
- Study the implementation patterns
- Adapt code for your specific needs
- Contribute improvements back to the project
- Use examples as reference implementations
- Study optimization techniques
- Contribute new examples
- Help maintain and improve existing examples
Each example is designed to be:
- Self-contained: Minimal dependencies
- Well-documented: Clear code comments
- Modifiable: Easy to experiment with
- Educational: Demonstrates best practices
To contribute a new example:
- Create a new directory following the naming convention
- Include a complete CMakeLists.txt
- Add comprehensive README.md
- Ensure cross-platform compatibility
- Follow JUCE coding standards
- Main README - Project overview
- Getting Started - Setup instructions
- Tutorial Index - Comprehensive tutorials
- Quick Reference - Fast lookup guide
- JUCE Examples - Official JUCE examples
- JUCE Documentation - Complete API reference
- Audio Developer Conference - Industry presentations
- JUCE Forum - Community support
We welcome contributions to improve and expand the examples collection:
- Report Issues: Found a bug or unclear documentation?
- Suggest Improvements: Ideas for better examples or explanations?
- Submit Examples: Have a great example to share?
- Fix Bugs: Help improve existing examples
- Follow existing code style and structure
- Include comprehensive documentation
- Test on multiple platforms
- Ensure examples are educational and clear
- Add appropriate comments and explanations
These examples are part of the comprehensive JUCE Audio Development Tutorial Series. Each example builds upon concepts from the main tutorials while providing focused, practical implementations.