From e93852981a937fe9a6af3fa4e8bbb757a44ca2f4 Mon Sep 17 00:00:00 2001 From: Roland Rabien Date: Sat, 10 Jan 2026 13:47:20 -0800 Subject: [PATCH] Add midi learn --- Changelist.txt | 7 +++++-- VERSION | 2 +- modules/gin | 2 +- modules/juce | 2 +- plugin/Source/Panels.h | 1 + plugin/Source/PluginProcessor.cpp | 11 ++++++++++- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Changelist.txt b/Changelist.txt index 9ecd3f4..93cfe62 100644 --- a/Changelist.txt +++ b/Changelist.txt @@ -1,7 +1,10 @@ +1.0.24 +- Added MIDI learn + 1.0.23: - Fixed crash -1.0.22: +1.0.22: - Added microtonal support 1.0.21: @@ -151,7 +154,7 @@ 0.0.8: -- Added UI for mod matrix +- Added UI for mod matrix - Fixed poly params modulated by mono source not showing their live value 0.0.7: diff --git a/VERSION b/VERSION index 1c2de38..321816a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.23 \ No newline at end of file +1.0.24 \ No newline at end of file diff --git a/modules/gin b/modules/gin index c2ca600..0e6c979 160000 --- a/modules/gin +++ b/modules/gin @@ -1 +1 @@ -Subproject commit c2ca60094fdc0488dd3a487b76986096c8b1078d +Subproject commit 0e6c97989c4b506f75fed6e30fe088fccb6ef872 diff --git a/modules/juce b/modules/juce index 2582037..bc7339f 160000 --- a/modules/juce +++ b/modules/juce @@ -1 +1 @@ -Subproject commit 258203706cdfc1357effe8cc752672b793cea37d +Subproject commit bc7339fe07ca1ef7d4708cb6a124932de4af3719 diff --git a/plugin/Source/Panels.h b/plugin/Source/Panels.h index cf79d30..30c91ab 100644 --- a/plugin/Source/Panels.h +++ b/plugin/Source/Panels.h @@ -176,6 +176,7 @@ public: juce::PopupMenu m; m.setLookAndFeel (&getLookAndFeel()); + for (auto itr : menus) m.addSubMenu (itr.first, itr.second); diff --git a/plugin/Source/PluginProcessor.cpp b/plugin/Source/PluginProcessor.cpp index 83eaae3..e0deef4 100644 --- a/plugin/Source/PluginProcessor.cpp +++ b/plugin/Source/PluginProcessor.cpp @@ -508,8 +508,15 @@ void extractWavetables() #endif //============================================================================== +static gin::ProcessorOptions createProcessorOptions() +{ + gin::ProcessorOptions opts; + opts.hasMidiLearn = true; + return opts; +} + WavetableAudioProcessor::WavetableAudioProcessor() - : gin::Processor (juce::AudioProcessor::BusesProperties().withOutput ("Output", juce::AudioChannelSet::stereo(), true), false), + : gin::Processor (juce::AudioProcessor::BusesProperties().withOutput ("Output", juce::AudioChannelSet::stereo(), true), false, createProcessorOptions()), bitcrusher (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })), fireAmp (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })), grindAmp (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })) @@ -847,6 +854,8 @@ void WavetableAudioProcessor::processBlock (juce::AudioBuffer& buffer, ju if (buffer.getNumChannels() != 2) return; + midiLearn->processBlock (midi, buffer.getNumSamples()); + if (mtsClient) for (auto itr : midi) if (auto m = itr.getMessage(); m.isSysEx())