AetherDSP JUCE Bridge
C FFI bridge for integrating AetherDSP with JUCE audio plugins.
Add world music tuning systems and real-time safe DSP processing to your JUCE plugins with just a few lines of code.
Features
- ✅ 17 World Music Tuning Systems - Ethiopian (7), Arabic (3), Indian (1), Gamelan (3), Western (3)
- ✅ Lock-Free DSP Graph - Real-time safe audio processing
- ✅ Memory Safe - Rust's safety guarantees protect your audio thread
- ✅ Zero-Cost Abstraction - No performance overhead
- ✅ Drop-in Integration - Works with existing JUCE projects
- ✅ MIT Licensed - Free forever, no royalties
Quick Start
1. Build the Library
This generates:
- Static library:
target/release/libaetherdsp_juce_bridge.a(macOS/Linux) oraetherdsp_juce_bridge.lib(Windows) - Dynamic library:
target/release/libaetherdsp_juce_bridge.dylib(macOS),.so(Linux), or.dll(Windows) - C header:
include/aetherdsp_juce_bridge.h
2. Add to Your JUCE Project
In Projucer:
-
Add the static library to your project:
- Go to "Modules" → "Add a module from a specified folder"
- Or add directly in "Build" tab → "External Libraries to Link"
-
Add include path:
- Add
crates/aether-juce-bridge/includeto header search paths
- Add
In CMake:
target_link_libraries(YourPlugin
PRIVATE
${AETHERDSP_BRIDGE_PATH}/target/release/libaetherdsp_juce_bridge.a
)
target_include_directories(YourPlugin
PRIVATE
${AETHERDSP_BRIDGE_PATH}/include
)
3. Use in Your Plugin
;
Available Tuning Systems
Ethiopian Scales (Qenet)
All 7 traditional Ethiopian qenet modes are now implemented:
// Tizita variants (expressing nostalgia and longing)
auto tuning = ; // Tizita major - pentatonic, characteristic of Ethiopian blues
auto tuning = ; // Tizita minor - melancholic, introspective
// Bati variants (expressing depth and melancholy)
auto tuning = ; // Bati minor - standard minor pentatonic (most common)
auto tuning = ; // Bati major - bright, uplifting variant
// Other main modes
auto tuning = ; // Ambassel - pentatonic with flat 2nd
auto tuning = ; // Anchihoye - pentatonic without 3rd degree
Arabic Maqamat
auto tuning = ; // Quarter-tone flats on 3rd and 7th
auto tuning = ; // Half-flat on 2nd degree
auto tuning = ; // Augmented 2nd (dramatic sound)
Indian Ragas
auto tuning = ; // Raised 4th (Kalyan thaat)
Gamelan (Javanese)
auto tuning = ; // 5-tone scale
auto tuning = ; // 1210-cent octaves!
auto tuning = ; // 7-tone with unequal intervals
Western Tunings
auto tuning = ; // 5-limit (pure thirds)
auto tuning = ; // 7-limit (blues, barbershop)
auto tuning = ; // Standard 12-TET
API Reference
Graph Management
// Create a DSP graph
AetherGraph* ;
// Free a DSP graph
void ;
// Process audio
AetherResult ;
Node Creation
// Add nodes to the graph
AetherNodeId ;
AetherNodeId ;
AetherNodeId ;
Parameter Control
// Set a parameter with optional smoothing
AetherResult ;
Tuning Tables
// Get frequency for a MIDI note
AetherResult ;
// Free a tuning table
void ;
Example Plugins
See the examples/ directory for complete JUCE plugin examples:
- EthiopianSynth - Simple synthesizer with Ethiopian Tizita scale
- ArabicMaqamSynth - Polyphonic synth with switchable Arabic maqamat
- WorldMusicSampler - Sampler with tuning system selector
Building the Examples
&&
Performance
The bridge has zero runtime overhead compared to pure Rust:
- No heap allocations in audio thread
- Lock-free graph updates
- SIMD-optimized DSP (where applicable)
- Typical DSP node latency: <100ns per sample
Benchmark (MacBook Pro M1, 48kHz, 64 samples):
- Parameter update: 51.7ns
- Oscillator processing: ~5µs per block
- Full graph (10 nodes): ~50µs per block
Thread Safety
Real-Time Safe Operations
These functions are safe to call from the audio thread:
aether_graph_process()aether_graph_set_param()aether_tuning_get_frequency()
Non-Real-Time Operations
These functions must be called from the main/message thread:
aether_graph_create()/aether_graph_free()aether_graph_add_*()(node creation)aether_tuning_*()creation andaether_tuning_free()
Troubleshooting
Linking Errors
macOS: Make sure to link against the C++ standard library:
target_link_libraries(YourPlugin PRIVATE "-lc++")
Windows MSVC: Use .lib files, not .dll.lib:
target_link_libraries(YourPlugin PRIVATE aetherdsp_juce_bridge.lib)
Linux: Link against pthread and dl:
target_link_libraries(YourPlugin PRIVATE pthread dl)
Runtime Errors
"Symbol not found": Make sure the dynamic library is in the search path or use static linking.
Crashes on process(): Ensure sample_rate and block_size match your AudioProcessor settings.
License
MIT License - See LICENSE for details.
Contributing
Contributions welcome! Please see CONTRIBUTING.md.
Support
- GitHub Issues: github.com/1yos/aether-dsp/issues
- Email: yoseph@aetherdsp.dev
- Documentation: docs.rs/aetherdsp-juce-bridge
Made with ❤️ in Addis Ababa, Ethiopia