program names for midiverb

This commit is contained in:
Gordon JC Pearce 2024-07-30 19:03:05 +01:00
parent 83c4cba47c
commit a236214c6d
2 changed files with 33 additions and 3 deletions

View File

@ -21,7 +21,7 @@
START_NAMESPACE_DISTRHO 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()]; lowpass = new float[getBufferSize()];
ram = new int16_t[16384]; 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) { void BarrVerb::initProgramName(uint32_t index, String &programName) {
programName = "Default Reverb";
programName = "init program"; //&prog_name[index & 0x3f];
} }
// Processing functions // 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) { for (uint32_t i=0; i < frames; i+=2) {
// run the actual DSP engine for each sample // run the actual DSP engine for each sample
for (uint8_t step = 0; step < 128; step++) { for (uint8_t step = 0; step < 128; step++) {
opcode = rom[(128*44) + step]; opcode = rom[(128*57) + step];
switch (opcode & 0xc000) { switch (opcode & 0xc000) {
case 0x0000: case 0x0000:
ai = ram[ptr]; ai = ram[ptr];

View File

@ -1,3 +1,32 @@
#include <stdint.h>
#include <string>
#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[] = { const uint16_t rom[] = {
// Program 0, 0x0000 // Program 0, 0x0000
0x3e38, 0x7cff, 0x3e44, 0x3f3a, 0x074c, 0x8000, 0x4004, 0xbd44, 0x3e38, 0x7cff, 0x3e44, 0x3f3a, 0x074c, 0x8000, 0x4004, 0xbd44,