Upload files to "Source"

This commit is contained in:
ed
2025-10-25 17:56:37 +00:00
parent a43db68120
commit d9f672cd10
2 changed files with 695 additions and 17 deletions

View File

@@ -12,6 +12,15 @@ class NeuralSynthAudioProcessor : public juce::AudioProcessor,
private juce::AudioProcessorValueTreeState::Listener
{
public:
struct PresetDefinition
{
juce::String category;
juce::String name;
int wtBankIndex;
int wt2BankIndex { -1 };
std::vector<std::pair<juce::String, float>> parameterValues;
};
NeuralSynthAudioProcessor();
~NeuralSynthAudioProcessor() override;
@@ -53,6 +62,10 @@ public:
const std::string& paramGroup);
juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout();
void applyPreset(int index);
const std::vector<PresetDefinition>& getFactoryPresets() const noexcept { return factoryPresets; }
int getCurrentPresetIndex() const noexcept { return currentPresetIndex; }
// Utilities
juce::MidiMessageCollector& getMidiMessageCollector() noexcept { return midiMessageCollector; }
AudioBufferQueue<float>& getAudioBufferQueue() noexcept { return audioBufferQueue; }
@@ -87,4 +100,13 @@ private:
// Scope collector (uses audioBufferQueue, so declare after it)
ScopeDataCollector<float> scopeDataCollector { audioBufferQueue };
std::vector<PresetDefinition> factoryPresets;
int currentPresetIndex { -1 };
bool presetChangeInProgress { false };
static std::vector<PresetDefinition> makeFactoryPresets();
void setParameterValue(const juce::String& paramID, float value);
juce::dsp::Limiter<float> outputLimiter;
};