Advanced audio processor base class with parameter management and preset system.
More...
Inherits ProcessorBaseClass, juce::ChangeBroadcaster, and juce::Timer.
|
| | Processor (bool init=true, ProcessorOptions={}) |
| | If you override any virtual functions, they won't get called by the constructor.
|
| |
| | Processor (const BusesProperties &ioLayouts, bool init=true, ProcessorOptions={}) |
| |
| | ~Processor () override |
| |
| virtual void | init () |
| |
| virtual Program * | createProgram () |
| |
| void | reset () override |
| |
| void | prepareToPlay (double sampleRate, int samplesPerBlock) override |
| |
| void | releaseResources () override |
| |
| virtual juce::PropertiesFile * | getSettings () |
| |
| void | addPluginParameter (gin::Parameter *parameter) |
| |
| gin::Parameter * | addExtParam (juce::String uid, juce::String name, juce::String shortName, juce::String label, juce::NormalisableRange< float > range, float defaultValue, SmoothingType st, std::function< juce::String(const gin::Parameter &, float)> textFunction=nullptr) |
| |
| gin::Parameter * | addIntParam (juce::String uid, juce::String name, juce::String shortName, juce::String label, juce::NormalisableRange< float > range, float defaultValue, SmoothingType st, std::function< juce::String(const gin::Parameter &, float)> textFunction=nullptr) |
| |
| gin::Parameter * | getParameter (const juce::String &uid) |
| |
| float | parameterValue (const juce::String &uid) |
| |
| int | parameterIntValue (const juce::String &uid) |
| |
| bool | parameterBoolValue (const juce::String &uid) |
| |
| const juce::Array< gin::Parameter * > & | getPluginParameters () |
| |
| bool | isSmoothing () |
| |
| virtual bool | isParamLocked (gin::Parameter *) |
| |
| virtual juce::File | getProgramDirectory () |
| |
| virtual void | loadAllPrograms () |
| |
| const juce::String | getName () const override |
| |
| bool | acceptsMidi () const override |
| |
| bool | producesMidi () const override |
| |
| double | getTailLengthSeconds () const override |
| |
| int | getNumPrograms () override |
| |
| int | getCurrentProgram () override |
| |
| const juce::OwnedArray< Program > & | getPrograms () |
| |
| Program * | getProgram (const juce::String &name) |
| |
| void | setCurrentProgram (juce::String name) |
| |
| void | setCurrentProgram (int index) override |
| |
| const juce::String | getProgramName (int index) override |
| |
| void | changeProgramName (int index, const juce::String &newName) override |
| |
| void | saveProgram (juce::String name, juce::String author, juce::String tags) |
| |
| void | deleteProgram (int index) |
| |
| bool | hasProgram (juce::String name) |
| |
| juce::String | getStateXml () |
| |
| void | setStateXml (const juce::String &s) |
| |
| void | getStateInformation (juce::MemoryBlock &destData) override |
| |
| void | setStateInformation (const void *data, int sizeInBytes) override |
| |
Advanced audio processor base class with parameter management and preset system.
Processor extends JUCE's AudioProcessor with a complete parameter management system, preset/program handling, state management, and various conveniences for building professional audio plugins.
Key Features:
- Parameter Management: Internal and external parameters with automatic host exposure
- Preset System: Full program/preset management with file watching
- State Management: ValueTree-based state with automatic parameter sync
- Parameter Smoothing: Built-in smoothing for audio-rate parameters
- Settings: Optional persistent settings via PropertiesFile
- Modulation Support: Integration with ModMatrix system
- Update Checking: Optional update and news checking
Parameter Types:
- External Parameters: Exposed to host, automatable, saved in presets
- Internal Parameters: Not exposed to host, for UI-only settings
Preset System: Programs are automatically loaded from a directory and file-watched for changes. Each program stores parameters and can include custom state data.
Usage:
{
public:
{
cutoff = addExtParam("cutoff", "Cutoff", "Cutoff", "Hz",
{20.0f, 20000.0f}, 1000.0f,
resonance = addExtParam(
"resonance",
"Resonance",
"Res",
"",
{0.0f, 1.0f}, 0.5f,
init();
}
void prepareToPlay(
double sr,
int block)
override
{
filter.setSampleRate(
sr);
}
{
filter.setCutoff(cutoff->getProcValue());
filter.setResonance(
resonance->getProcValue());
filter.process(buffer);
}
private:
};
Advanced parameter class with modulation, real-time callbacks, and host automation.
Definition gin_parameter.h:67
A lightweight 2D point class for projects that don't use juce_graphics.
Definition gin_point.h:25
Advanced audio processor base class with parameter management and preset system.
Definition gin_processor.h:247
void prepareToPlay(double sampleRate, int samplesPerBlock) override
Parameter smoothing configuration for audio-rate interpolation.
Definition gin_processor.h:53
void processBlock(juce::AudioSampleBuffer &buffer, float drive, float lowclip, float highclip)
Definition gin_audioutil.h:187
- See also
- Parameter, Program, ModMatrix