From 6459dac63fbaad8783dc578e559d1d56c5a41d9f Mon Sep 17 00:00:00 2001 From: Gordon JC Pearce Date: Tue, 30 Jul 2024 19:03:05 +0100 Subject: [PATCH] program names for midiverb --- plugin/barrverb.cpp | 7 ++++--- plugin/rom.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/plugin/barrverb.cpp b/plugin/barrverb.cpp index a66177f..afeec24 100644 --- a/plugin/barrverb.cpp +++ b/plugin/barrverb.cpp @@ -21,7 +21,7 @@ START_NAMESPACE_DISTRHO -BarrVerb::BarrVerb() : Plugin(kParameterCount, 1, 0) { // two parameters, one program, no states +BarrVerb::BarrVerb() : Plugin(kParameterCount, 64, 0) { // two parameters, one program, no states lowpass = new float[getBufferSize()]; ram = new int16_t[16384]; @@ -81,7 +81,8 @@ void BarrVerb::initAudioPort(bool input, uint32_t index, AudioPort &port) { } void BarrVerb::initProgramName(uint32_t index, String &programName) { - programName = "Default Reverb"; + + programName = "init program"; //&prog_name[index & 0x3f]; } // Processing functions @@ -121,7 +122,7 @@ void BarrVerb::run(const float **inputs, float **outputs, uint32_t frames) { for (uint32_t i=0; i < frames; i+=2) { // run the actual DSP engine for each sample for (uint8_t step = 0; step < 128; step++) { - opcode = rom[(128*44) + step]; + opcode = rom[(128*57) + step]; switch (opcode & 0xc000) { case 0x0000: ai = ram[ptr]; diff --git a/plugin/rom.h b/plugin/rom.h index 2dd4a87..cc68931 100644 --- a/plugin/rom.h +++ b/plugin/rom.h @@ -1,3 +1,32 @@ +#include +#include + +#include "DistrhoPlugin.hpp" + + +const std::string prog_name[] = { + ".2 Sec Small Bright", ".2 Sec Small Warm", ".2 Sec Medium Bright", + ".3 Sec Small Bright", ".3 Sec Small Warm", ".4 Sec Medium Bright", + ".4 Sec Medium Warm", ".6 Sec Small Bright", ".6 Sec Medium Warm", + ".6 Sec Medium Dark", ".8 Sec Small Bright", ".8 Sec Large Warm", + "1.0 Sec Small Warm", "1.0 Sec Medium Warm", "1.0 Sec Large Bright", + "1.2 Medium Warm", "1.2 Sec Small Warm", "1.2 Sec Small Bright", + "1.4 Sec Large Warm", "1.4 Sec Large Dark", "1.4 Sec Medium Warm", + "1.6 Sec Small Dark", "1.6 Sec Large Bright", "1.6 Sec Medium Bright", + "1.8 Sec Large Dark", "1.8 Sec Large Bright", "1.8 Sec Medium Warm", + "2.0 Sec Large Bright", "2.0 Sec Medium Warm", "2.0 Sec Large Warm", + "2.5 Sec Medium Warm", "2.5 Sec Large Bright", "2.5 Sec Medium Bright", + "2.8 Sec Small Bright", "2.8 Sec Medium Bright", "3.0 Sec Large Bright", + "3.0 Sec Large Warm", "3.0 Sec Medium Dark", "3.5 Sec Large Bright", + "3.5 Sec Medium Warm", "4.0 Sec Large Dark", "4.0 Sec Medium Bright", + "5 Sec Large Warm", "8 Sec Large Bright", "8 Sec Large Warm", + "10 Sec Large Bright", "10 Sec Large Warm", "16 Sec Large Dark", + "18 Sec Ex. Large Bright", "20 Sec Ex Large Dark", "Gated - 100ms", + "Gated - 150ms", "Gated - 200ms", "Gated - 250ms", "Gated - 300ms", + "Gated - 350ms", "Gated - 400ms", "Gated - 500ms", "Gated - 600ms", + "Reverse - 300ms", "Reverse - 400ms", "Reverse - 500ms", "Reverse - 600ms" +}; + const uint16_t rom[] = { // Program 0, 0x0000 0x3e38, 0x7cff, 0x3e44, 0x3f3a, 0x074c, 0x8000, 0x4004, 0xbd44,