mirror of
https://codeberg.org/armin/gelyk.git
synced 2026-10-11 17:01:53 +02:00
Initial Gelyk EQ plugin
This commit is contained in:
commit
13863f4522
9 changed files with 1080 additions and 0 deletions
59
Source/PluginProcessor.h
Normal file
59
Source/PluginProcessor.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#pragma once
|
||||
|
||||
#include <JuceHeader.h>
|
||||
#include "EqualizerDSP.h"
|
||||
|
||||
namespace gelyk
|
||||
{
|
||||
|
||||
class GelykEQAudioProcessor final : public juce::AudioProcessor
|
||||
{
|
||||
public:
|
||||
GelykEQAudioProcessor();
|
||||
~GelykEQAudioProcessor() override = default;
|
||||
|
||||
void prepareToPlay(double sampleRate, int samplesPerBlock) override;
|
||||
void releaseResources() override;
|
||||
void processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
|
||||
|
||||
juce::AudioProcessorEditor* createEditor() override;
|
||||
bool hasEditor() const override { return true; }
|
||||
|
||||
const juce::String getName() const override { return "Gelyk EQ"; }
|
||||
bool acceptsMidi() const override { return false; }
|
||||
bool producesMidi() const override { return false; }
|
||||
double getTailLengthSeconds() const override { return 0.0; }
|
||||
|
||||
int getNumPrograms() override { return 1; }
|
||||
int getCurrentProgram() override { return 0; }
|
||||
void setCurrentProgram(int) override {}
|
||||
const juce::String getProgramName(int) override { return {}; }
|
||||
void changeProgramName(int, const juce::String&) override {}
|
||||
|
||||
void getStateInformation(juce::MemoryBlock&) override;
|
||||
void setStateInformation(const void*, int) override;
|
||||
|
||||
juce::AudioProcessorValueTreeState& getAPVTS() { return apvts; }
|
||||
|
||||
// Exposed for the editor / analyser.
|
||||
SpectrumAnalyser& getAnalyser() { return analyser; }
|
||||
|
||||
// Returns human-readable Git build info.
|
||||
const juce::String& getGitInfo() const { return gitInfo; }
|
||||
|
||||
private:
|
||||
juce::AudioProcessorValueTreeState apvts;
|
||||
|
||||
static constexpr int numBands = 5;
|
||||
FilterBand bands[numBands];
|
||||
double currentSampleRate = 44100.0;
|
||||
|
||||
SpectrumAnalyser analyser;
|
||||
|
||||
juce::String buildVersion;
|
||||
juce::String gitInfo;
|
||||
|
||||
void rebuildCoefficients();
|
||||
};
|
||||
|
||||
} // namespace gelyk
|
||||
Loading…
Add table
Add a link
Reference in a new issue