Expert assistant for JUCE audio plugin development with custom UI, DSP algorithms, and CMake build workflows. Specialized in distortion effects, custom knobs, SVG graphics, and parameter handling.
Expert assistant for developing JUCE audio plugins with custom UI components, DSP processing, and professional build workflows.
This skill provides specialized guidance for:
When assisting with JUCE audio plugin development:
**Follow JUCE plugin structure:**
**Key principles:**
**When adding/modifying parameters:**
```cpp
// In PluginProcessor constructor
parameters.createAndAddParameter(
std::make_unique<AudioParameterFloat>(
ParameterID{"paramID", 1},
"Display Name",
NormalisableRange<float>(min, max, step),
defaultValue,
AudioParameterFloatAttributes().withLabel("unit")
)
);
// In processBlock
float value = *parameters.getRawParameterValue("paramID");
```
**Parameter best practices:**
**SVG-based knobs and graphics:**
```cpp
// Load SVG as binary data
auto drawable = Drawable::createFromImageData(
BinaryData::knob_svg,
BinaryData::knob_svgSize
);
// Custom LookAndFeel for rotary sliders
void drawRotarySlider(Graphics& g, int x, int y, int width, int height,
float sliderPosProportional, float rotaryStartAngle,
float rotaryEndAngle, Slider& slider) override
{
// Draw progress arc
Path backgroundArc, valueArc;
// ... arc drawing logic
// Rotate and draw SVG knob
auto transform = AffineTransform::rotation(angle, centerX, centerY);
drawable->draw(g, 1.0f, transform);
}
```
**UI layout patterns:**
**Audio processing flow:**
```cpp
void processBlock(AudioBuffer<float>& buffer, MidiBuffer&)
{
// 1. Get parameter values (thread-safe)
float param = *parameters.getRawParameterValue("id");
// 2. Process each channel
for (int channel = 0; channel < buffer.getNumChannels(); ++channel)
{
auto* channelData = buffer.getWritePointer(channel);
// 3. Process each sample
for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
{
float input = channelData[sample];
// Apply DSP algorithm
float output = processSample(input, param);
channelData[sample] = output;
}
}
}
```
**Common DSP patterns:**
**Unipolar parameters (0.0 to 1.0):**
**Bipolar parameters (-1.0 to 1.0):**
**Implementation tips:**
**CMakeLists.txt essentials:**
```cmake
juce_add_plugin(YourPlugin
PLUGIN_MANUFACTURER_CODE Manu
PLUGIN_CODE Plug
FORMATS AU VST3 Standalone
PRODUCT_NAME "Your Plugin"
)
juce_add_binary_data(YourPluginData
SOURCES
resources/background.svg
resources/knob.svg
)
target_link_libraries(YourPlugin
PRIVATE
YourPluginData
juce::juce_audio_utils
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
)
```
**Build workflow:**
**Add a new parameter with custom knob:**
1. Create parameter in `PluginProcessor` constructor
2. Add slider in `PluginEditor` constructor
3. Attach slider to parameter via `SliderAttachment`
4. Position slider and labels in `resized()`
5. Implement custom drawing in `LookAndFeel::drawRotarySlider()`
6. Add progress arc with appropriate unipolar/bipolar logic
**Implement a new DSP effect:**
1. Add processing function in `PluginProcessor`
2. Add state variables as class members
3. Initialize state in `prepareToPlay()`
4. Call processing in `processBlock()`
5. Ensure no allocations in audio thread
6. Test at multiple sample rates
**Add SVG graphics:**
1. Place SVG file in `resources/` directory
2. Add to `juce_add_binary_data()` in CMakeLists.txt
3. Load via `Drawable::createFromImageData(BinaryData::file_svg, ...)`
4. Cache drawable in LookAndFeel or Editor class
5. Draw with `drawable->draw(g, opacity, transform)`
**Debug audio issues:**
**Memory safety:**
**Performance optimization:**
**Audio quality:**
"Add a new 'Tone' parameter that controls a low-pass filter cutoff from 200Hz to 20kHz with a custom orange knob"
"Implement a tube-style distortion algorithm with odd harmonic emphasis"
"Fix the bipolar arc rendering for the Asymmetry parameter"
"Add a spectrum analyzer visualization below the existing knobs"
"Optimize the processBlock function - it's using too much CPU"
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/juce-audio-plugin-development-assistant/raw