| 1 |
/* |
| 2 |
* Dragonfly Reverb, a hall-style reverb plugin |
| 3 |
* Copyright (c) 2018 Michael Willis, Rob van den Berg |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU General Public License as |
| 7 |
* published by the Free Software Foundation; either version 3 of |
| 8 |
* the License, or any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* For a full copy of the GNU General Public License see the LICENSE file. |
| 16 |
*/ |
| 17 |
|
| 18 |
#include <cstdint> |
| 19 |
#include <Param.hpp> |
| 20 |
|
| 21 |
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED |
| 22 |
#define DISTRHO_PLUGIN_INFO_H_INCLUDED |
| 23 |
|
| 24 |
#define DISTRHO_PLUGIN_BRAND "Dragonfly" |
| 25 |
#define DISTRHO_PLUGIN_NAME "Dragonfly Hall Reverb" |
| 26 |
#define DISTRHO_PLUGIN_URI "https://github.com/michaelwillis/dragonfly-reverb" |
| 27 |
#define DISTRHO_PLUGIN_CLAP_ID "michaelwillis.dragonfly.hall" |
| 28 |
|
| 29 |
#define DISTRHO_PLUGIN_HAS_UI 1 |
| 30 |
#define DISTRHO_PLUGIN_IS_RT_SAFE 1 |
| 31 |
#define DISTRHO_PLUGIN_NUM_INPUTS 2 |
| 32 |
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2 |
| 33 |
#define DISTRHO_PLUGIN_WANT_STATE 1 |
| 34 |
|
| 35 |
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" |
| 36 |
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb|Stereo" |
| 37 |
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "reverb", "stereo" |
| 38 |
|
| 39 |
#include "Artwork.hpp" |
| 40 |
|
| 41 |
#define DISTRHO_UI_DEFAULT_WIDTH Artwork::backgroundWidth |
| 42 |
#define DISTRHO_UI_DEFAULT_HEIGHT Artwork::backgroundHeight |
| 43 |
|
| 44 |
enum Parameters |
| 45 |
{ |
| 46 |
paramDry = 0, |
| 47 |
paramEarly, |
| 48 |
paramLate, |
| 49 |
paramSize, |
| 50 |
paramWidth, |
| 51 |
paramPredelay, |
| 52 |
paramDiffuse, |
| 53 |
paramLowCut, |
| 54 |
paramLowXover, |
| 55 |
paramLowMult, |
| 56 |
paramHighCut, |
| 57 |
paramHighXover, |
| 58 |
paramHighMult, |
| 59 |
paramSpin, |
| 60 |
paramWander, |
| 61 |
paramDecay, |
| 62 |
paramEarlySend, |
| 63 |
paramModulation, |
| 64 |
paramCount |
| 65 |
}; |
| 66 |
|
| 67 |
static const Param PARAMS[paramCount] = { |
| 68 |
{paramDry, "Dry Level", "dry_level", 0.0f, 100.0f, "%"}, |
| 69 |
{paramEarly, "Early Level", "early_level", 0.0f, 100.0f, "%"}, |
| 70 |
{paramLate, "Late Level", "late_level", 0.0f, 100.0f, "%"}, |
| 71 |
{paramSize, "Size", "size", 10.0f, 60.0f, "m"}, |
| 72 |
{paramWidth, "Width", "width", 50.0f, 150.0f, "%"}, |
| 73 |
{paramPredelay, "Predelay", "delay", 0.0f, 100.0f, "ms"}, |
| 74 |
{paramDiffuse, "Diffuse", "diffuse", 0.0f, 100.0f, "%"}, |
| 75 |
{paramLowCut, "Low Cut", "low_cut", 0.0f, 200.0f, "Hz"}, |
| 76 |
{paramLowXover, "Low Cross", "low_xo", 200.0f, 1200.0f, "Hz"}, |
| 77 |
{paramLowMult, "Low Mult", "low_mult", 0.5f, 2.5f, "X"}, |
| 78 |
{paramHighCut, "High Cut", "high_cut", 1000.0f, 16000.0f, "Hz"}, |
| 79 |
{paramHighXover, "High Cross", "high_xo", 1000.0f, 16000.0f, "Hz"}, |
| 80 |
{paramHighMult, "High Mult", "high_mult", 0.2f, 1.2f, "X"}, |
| 81 |
{paramSpin, "Spin", "spin", 0.0f, 10.0f, "Hz"}, |
| 82 |
{paramWander, "Wander", "wander", 0.0f, 40.0f, "ms"}, |
| 83 |
{paramDecay, "Decay", "decay", 0.1f, 10.0f, "s"}, |
| 84 |
{paramEarlySend, "Early Send", "early_send", 0.0f, 100.0f, "%"}, |
| 85 |
{paramModulation, "Modulation", "modulation", 0.0f, 100.0f, "%"} |
| 86 |
}; |
| 87 |
|
| 88 |
static const int NUM_BANKS = 5; |
| 89 |
static const int PRESETS_PER_BANK = 5; |
| 90 |
|
| 91 |
typedef struct { |
| 92 |
const char *name; |
| 93 |
const float params[paramCount]; |
| 94 |
} Preset; |
| 95 |
|
| 96 |
typedef struct { |
| 97 |
const char *name; |
| 98 |
const Preset presets[PRESETS_PER_BANK]; |
| 99 |
} Bank; |
| 100 |
|
| 101 |
static const Bank banks[NUM_BANKS] = { |
| 102 |
{ |
| 103 |
"Rooms", { // dry, early, late, size, width, delay, diffuse, low cut, low xo, low mult, high cut, high xo, high mult, spin, wander, decay, e. send, modulation |
| 104 |
{"Bright Room", { 80.0, 10.0, 20.0, 10.0, 90.0, 4.0, 90.0, 4.0, 500, 0.80, 16000, 7900, 0.75, 1.0, 25.0, 0.6, 20.0, 30.0 }}, |
| 105 |
{"Clear Room", { 80.0, 10.0, 20.0, 10.0, 90.0, 4.0, 90.0, 4.0, 500, 0.90, 13000, 5800, 0.50, 1.0, 25.0, 0.6, 20.0, 30.0 }}, |
| 106 |
{"Dark Room", { 80.0, 10.0, 20.0, 10.0, 90.0, 4.0, 50.0, 4.0, 500, 1.20, 7300, 4900, 0.35, 1.0, 25.0, 0.7, 20.0, 30.0 }}, |
| 107 |
{"Small Chamber", { 80.0, 10.0, 20.0, 16.0, 80.0, 8.0, 70.0, 4.0, 500, 1.10, 8200, 5500, 0.35, 1.2, 10.0, 0.8, 20.0, 20.0 }}, |
| 108 |
{"Large Chamber", { 80.0, 10.0, 20.0, 20.0, 80.0, 8.0, 90.0, 4.0, 500, 1.30, 7000, 4900, 0.25, 1.8, 12.0, 1.0, 20.0, 20.0 }}, |
| 109 |
} |
| 110 |
}, |
| 111 |
{ |
| 112 |
"Studios", { // dry, early, late, size, width, delay, diffuse, low cut, low xo, low mult, high cut, high xo, high mult, spin, wander, decay, e. send, modulation |
| 113 |
{"Acoustic Studio", { 80.0, 10.0, 20.0, 12.0, 90.0, 8.0, 75.0, 4.0, 450, 1.50, 7600, 4900, 0.80, 2.5, 7.0, 0.8, 20.0, 20.0 }}, |
| 114 |
{"Electric Studio", { 80.0, 10.0, 20.0, 12.0, 90.0, 6.0, 45.0, 4.0, 250, 1.25, 7600, 5800, 0.70, 2.5, 7.0, 0.9, 20.0, 30.0 }}, |
| 115 |
{"Percussion Studio", { 80.0, 10.0, 20.0, 12.0, 90.0, 6.0, 30.0, 20.0, 200, 1.75, 5800, 5200, 0.45, 2.5, 7.0, 0.7, 20.0, 10.0 }}, |
| 116 |
{"Piano Studio", { 80.0, 10.0, 20.0, 12.0, 80.0, 8.0, 40.0, 20.0, 600, 1.50, 8200, 5800, 0.50, 2.8, 10.0, 0.7, 20.0, 15.0 }}, |
| 117 |
{"Vocal Studio", { 80.0, 10.0, 20.0, 12.0, 90.0, 0.0, 60.0, 4.0, 400, 1.20, 5800, 5200, 0.40, 2.5, 7.0, 0.8, 20.0, 10.0 }}, |
| 118 |
} |
| 119 |
}, |
| 120 |
{ |
| 121 |
"Small Halls", { // dry, early, late, size, width, delay, diffuse, low cut, low xo, low mult, high cut, high xo, high mult, spin, wander, decay, e. send, modulation |
| 122 |
{"Small Bright Hall", { 80.0, 10.0, 20.0, 24.0, 80.0, 12.0, 90.0, 4.0, 400, 1.10, 11200, 6250, 0.75, 2.5, 13.0, 1.3, 20.0, 15.0 }}, |
| 123 |
{"Small Clear Hall", { 80.0, 10.0, 20.0, 24.0, 100.0, 4.0, 90.0, 4.0, 500, 1.30, 7600, 5500, 0.50, 3.3, 15.0, 1.3, 20.0, 15.0 }}, |
| 124 |
{"Small Dark Hall", { 80.0, 10.0, 20.0, 24.0, 100.0, 12.0, 60.0, 4.0, 500, 1.50, 5800, 4000, 0.35, 2.5, 10.0, 1.5, 20.0, 15.0 }}, |
| 125 |
{"Small Percussion Hall", { 80.0, 10.0, 20.0, 24.0, 80.0, 12.0, 40.0, 20.0, 250, 2.00, 5200, 4000, 0.35, 2.0, 13.0, 1.1, 20.0, 10.0 }}, |
| 126 |
{"Small Vocal Hall", { 80.0, 10.0, 20.0, 24.0, 80.0, 4.0, 60.0, 4.0, 500, 1.25, 6250, 5200, 0.35, 3.1, 15.0, 1.2, 20.0, 10.0 }}, |
| 127 |
} |
| 128 |
}, |
| 129 |
{ |
| 130 |
"Medium Halls", { // dry, early, late, size, width, delay, diffuse, low cut, low xo, low mult, high cut, high xo, high mult, spin, wander, decay, e. send, modulation |
| 131 |
{"Medium Bright Hall", { 80.0, 10.0, 20.0, 30.0, 100.0, 18.0, 90.0, 4.0, 400, 1.25, 10000, 6400, 0.60, 2.9, 15.0, 1.6, 20.0, 15.0 }}, |
| 132 |
{"Medium Clear Hall", { 80.0, 10.0, 20.0, 30.0, 100.0, 8.0, 90.0, 4.0, 500, 1.50, 7600, 5500, 0.50, 2.9, 15.0, 1.7, 20.0, 15.0 }}, |
| 133 |
{"Medium Dark Hall", { 80.0, 10.0, 20.0, 30.0, 100.0, 18.0, 60.0, 4.0, 500, 1.75, 5800, 4000, 0.40, 2.9, 15.0, 1.8, 20.0, 15.0 }}, |
| 134 |
{"Medium Percussion Hall", { 80.0, 10.0, 20.0, 30.0, 80.0, 12.0, 40.0, 20.0, 300, 2.00, 5200, 4000, 0.35, 2.0, 12.0, 1.2, 20.0, 10.0 }}, |
| 135 |
{"Medium Vocal Hall", { 80.0, 10.0, 20.0, 32.0, 80.0, 8.0, 75.0, 4.0, 600, 1.50, 5800, 5200, 0.40, 2.8, 16.0, 1.3, 20.0, 10.0 }}, |
| 136 |
} |
| 137 |
}, |
| 138 |
{ |
| 139 |
"Large Halls", { // dry, early, late, size, width, delay, diffuse, low cut, low xo, low mult, high cut, high xo, high mult, spin, wander, decay, e. send, modulation |
| 140 |
{"Large Bright Hall", { 80.0, 10.0, 20.0, 40.0, 100.0, 20.0, 90.0, 4.0, 400, 1.50, 8200, 5800, 0.50, 2.1, 20.0, 2.5, 20.0, 15.0 }}, |
| 141 |
{"Large Clear Hall", { 80.0, 10.0, 20.0, 40.0, 100.0, 12.0, 80.0, 4.0, 550, 2.00, 8200, 5200, 0.40, 2.1, 20.0, 2.8, 20.0, 15.0 }}, |
| 142 |
{"Large Dark Hall", { 80.0, 10.0, 20.0, 40.0, 100.0, 20.0, 60.0, 4.0, 600, 2.50, 6250, 2800, 0.20, 2.1, 20.0, 3.0, 20.0, 15.0 }}, |
| 143 |
{"Large Vocal Hall", { 80.0, 10.0, 20.0, 40.0, 80.0, 12.0, 80.0, 4.0, 700, 2.25, 6250, 4600, 0.30, 2.1, 17.0, 2.4, 20.0, 10.0 }}, |
| 144 |
{"Great Hall", { 80.0, 10.0, 20.0, 50.0, 90.0, 20.0, 95.0, 4.0, 750, 2.50, 5500, 4000, 0.30, 2.6, 22.0, 3.8, 20.0, 15.0 }}, |
| 145 |
} |
| 146 |
} |
| 147 |
}; |
| 148 |
|
| 149 |
static const int DEFAULT_BANK = 2; // Small Halls |
| 150 |
static const int DEFAULT_PRESET = 1; // Second preset in each bank |
| 151 |
|
| 152 |
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |