mirror of
https://codeberg.org/armin/rmx-19.git
synced 2026-10-11 16:51:55 +02:00
Initial commit: RMX-19 rack sound module (VST3/AU) with dot-matrix LCD UI
This commit is contained in:
commit
c72c0216fd
16 changed files with 2170 additions and 0 deletions
64
Source/PluginProcessor.h
Normal file
64
Source/PluginProcessor.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#pragma once
|
||||
#include <juce_audio_processors/juce_audio_processors.h>
|
||||
#include "Params.h"
|
||||
#include "PresetBank.h"
|
||||
#include "SynthEngine.h"
|
||||
#include <juce_dsp/juce_dsp.h>
|
||||
|
||||
class RMX19AudioProcessor : public juce::AudioProcessor
|
||||
{
|
||||
public:
|
||||
RMX19AudioProcessor();
|
||||
~RMX19AudioProcessor() override;
|
||||
|
||||
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;
|
||||
|
||||
const juce::String getName() const override;
|
||||
bool acceptsMidi() const override { return true; }
|
||||
bool producesMidi() const override { return false; }
|
||||
double getTailLengthSeconds() const override { return 3.0; }
|
||||
|
||||
int getNumPrograms() override;
|
||||
int getCurrentProgram() override;
|
||||
void setCurrentProgram (int) override;
|
||||
const juce::String getProgramName (int) override;
|
||||
void changeProgramName (int, const juce::String&) override;
|
||||
|
||||
void getStateInformation (juce::MemoryBlock&) override;
|
||||
void setStateInformation (const void*, int) override;
|
||||
|
||||
juce::AudioProcessorValueTreeState apvts;
|
||||
|
||||
PresetBank& getBank() { return bank; }
|
||||
SynthEngine& getEngine() { return engine; }
|
||||
int getPatchIndex() const noexcept { return patchIndex; }
|
||||
void selectPatch (int i);
|
||||
|
||||
void getMeters (float& l, float& r) const noexcept { engine.getMeters (l, r); }
|
||||
int getActiveVoices() const noexcept { return engine.activeVoices(); }
|
||||
juce::uint32 getLastMidiTime() const noexcept { return lastMidi; }
|
||||
float getCpu() const noexcept { return cpu; }
|
||||
|
||||
private:
|
||||
void processMidi (juce::MidiBuffer&, const VParams&);
|
||||
|
||||
juce::AudioProcessorValueTreeState::ParameterLayout createParams();
|
||||
|
||||
class FxEngine;
|
||||
std::unique_ptr<FxEngine> fx;
|
||||
|
||||
PresetBank bank;
|
||||
SynthEngine engine;
|
||||
int patchIndex = 0;
|
||||
int lastPatchParam = 0;
|
||||
juce::uint32 lastMidi = 0;
|
||||
float cpu = 0.0f;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RMX19AudioProcessor)
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue