xiasri, channelstrip
This commit is contained in:
parent
faf704fe7a
commit
b853326ab6
8 changed files with 435 additions and 73 deletions
|
|
@ -427,8 +427,17 @@ class ChannelStripAudioApp : public AudioAppBase<NPARAMS>
|
|||
{
|
||||
public:
|
||||
static constexpr size_t kN_Params = NPARAMS;
|
||||
static constexpr size_t nVoiceSpaces=3;
|
||||
static constexpr size_t nVoiceSpaces=5;
|
||||
|
||||
enum class controlMessages {
|
||||
MSG_BYPASS_ALL=0,
|
||||
MSG_BYPASS_EQ,
|
||||
MSG_BYPASS_COMP,
|
||||
MSG_BYPASS_PREPOSTGAIN,
|
||||
MSG_BYPASS_INFILTERS,
|
||||
};
|
||||
|
||||
queue_t controlMessageQueue;
|
||||
|
||||
std::array<VoiceSpace<NPARAMS>, nVoiceSpaces> voiceSpaces;
|
||||
|
||||
|
|
@ -449,8 +458,12 @@ public:
|
|||
}
|
||||
|
||||
ChannelStripAudioApp() : AudioAppBase<NPARAMS>() {
|
||||
auto voiceSpaceBasic = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_BASIC_BODY
|
||||
|
||||
auto voiceSpaceNeve66 = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_NEVE66_BODY
|
||||
};
|
||||
auto voiceSpaceSSL4K = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_SSL4KGIST_BODY
|
||||
};
|
||||
auto voiceSpaceMaleVox = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_MALE_VOX_BODY
|
||||
|
|
@ -458,14 +471,19 @@ public:
|
|||
auto voiceSpaceFemaleVox = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_FEMALE_VOX_BODY
|
||||
};
|
||||
auto voiceSpaceSSL9K = [this](const std::array<float, NPARAMS>& params) {
|
||||
VOICE_SPACE_CHSTRIP_SSL9KINDA_BODY
|
||||
};
|
||||
|
||||
|
||||
voiceSpaces[0] = {"WannabeNeve66", voiceSpaceBasic};
|
||||
voiceSpaces[1] = {"MaleVox", voiceSpaceBasic};
|
||||
voiceSpaces[2] = {"FemaleVox", voiceSpaceBasic};
|
||||
voiceSpaces[0] = {"WannabeNeve66", voiceSpaceNeve66};
|
||||
voiceSpaces[1] = {"SSL 4K G-ist", voiceSpaceSSL4K};
|
||||
voiceSpaces[2] = {"SSL 9K-inda", voiceSpaceSSL9K};
|
||||
voiceSpaces[3] = {"MaleVox", voiceSpaceMaleVox};
|
||||
voiceSpaces[4] = {"FemaleVox", voiceSpaceFemaleVox};
|
||||
|
||||
currentVoiceSpace = voiceSpaces[0].mappingFunction;
|
||||
|
||||
queue_init(&controlMessageQueue, sizeof(controlMessages), 1);
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -473,19 +491,29 @@ public:
|
|||
__attribute__((hot)) stereosample_t __force_inline Process(const stereosample_t x) override
|
||||
{
|
||||
float y = x[0];
|
||||
y = tanhf(y * preGain);
|
||||
if (!bypassAll) {
|
||||
|
||||
if (!bypassPrePostGain) {
|
||||
y = tanhf(y * preGain);
|
||||
}
|
||||
if (!bypassInFilters)
|
||||
{
|
||||
y = inLowPass.loresChamberlain(y, inLowPassCutoff, 1.f);
|
||||
y = inHighPass.hiresChamberlain(y, inHighPassCutoff, 1.f);
|
||||
|
||||
y = lowshelf.play(y);
|
||||
}
|
||||
if (!bypassEQ) {
|
||||
y = peak0.play(y);
|
||||
y = peak1.play(y);
|
||||
y = lowshelf.play(y);
|
||||
y = highshelf.play(y);
|
||||
|
||||
}
|
||||
if (!bypassComp) {
|
||||
y = dyn.compress(y, compThreshold, compRatio, 0.f);
|
||||
|
||||
}
|
||||
if (!bypassPrePostGain) {
|
||||
y = tanhf(y * postGain);
|
||||
}
|
||||
}
|
||||
stereosample_t ret { y, y};
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -502,6 +530,28 @@ public:
|
|||
|
||||
__attribute__((always_inline)) void ProcessParams(const std::array<float, NPARAMS>& params)
|
||||
{
|
||||
controlMessages msg;
|
||||
while (queue_try_remove(&controlMessageQueue, &msg)) {
|
||||
Serial.printf("ChannelStripAudioApp: received control message %d\n", static_cast<int>(msg));
|
||||
switch(msg) {
|
||||
case controlMessages::MSG_BYPASS_ALL:
|
||||
bypassAll = !bypassAll;
|
||||
break;
|
||||
case controlMessages::MSG_BYPASS_EQ:
|
||||
bypassEQ = !bypassEQ;
|
||||
break;
|
||||
case controlMessages::MSG_BYPASS_COMP:
|
||||
bypassComp = !bypassComp;
|
||||
break;
|
||||
case controlMessages::MSG_BYPASS_PREPOSTGAIN:
|
||||
bypassPrePostGain = !bypassPrePostGain;
|
||||
break;
|
||||
case controlMessages::MSG_BYPASS_INFILTERS:
|
||||
bypassInFilters = !bypassInFilters;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
currentVoiceSpace(params);
|
||||
dyn.setAttackHigh(compAttack);
|
||||
dyn.setReleaseHigh(compRelease);
|
||||
|
|
@ -545,6 +595,12 @@ protected:
|
|||
float highShelfQ=1.f;
|
||||
float highShelfGain=1.f;
|
||||
|
||||
bool bypassAll = false;
|
||||
bool bypassEQ = false;
|
||||
bool bypassComp = false;
|
||||
bool bypassPrePostGain = false;
|
||||
bool bypassInFilters = false;
|
||||
|
||||
maxiDynamicsLite dyn;
|
||||
|
||||
maxiBiquad lowshelf;
|
||||
|
|
|
|||
|
|
@ -23,16 +23,21 @@
|
|||
#include "modes/MEMLNautModePAFSynth.hpp"
|
||||
#include "modes/MEMLNautModeChannelStrip.hpp"
|
||||
#include "modes/MEMLNautModeSoundAnalysisMIDI.hpp"
|
||||
#include "modes/MEMLNautModeXIASRI.hpp"
|
||||
|
||||
// #define INTERFACE_TYPE InterfaceRL
|
||||
//hook up the memlnaut mode
|
||||
|
||||
#define MEMLNAUT_MODE_TYPE MEMLNautModeSoundAnalysisMIDI
|
||||
// #define MEMLNAUT_MODE_TYPE MEMLNautModeSoundAnalysisMIDI
|
||||
// #define MEMLNAUT_MODE_TYPE MEMLNautModeXIASRI
|
||||
#define MEMLNAUT_MODE_TYPE MEMLNautModeChannelStrip
|
||||
|
||||
MEMLNAUT_MODE_TYPE AUDIO_MEM soundAnalysisMIDIMode;
|
||||
MEMLNAUT_MODE_TYPE AUDIO_MEM MEMLNautModeHub;
|
||||
|
||||
// MEMLNAUT_MODE_TYPE AUDIO_MEM soundAnalysisMIDIMode;
|
||||
// MEMLNautModeChannelStrip AUDIO_MEM channelStripMode;
|
||||
// MEMLNautModePAFSynth AUDIO_MEM pafSynthMode;
|
||||
|
||||
MEMLNautMode auto* AUDIO_MEM currentMode = &soundAnalysisMIDIMode;
|
||||
MEMLNautMode auto* AUDIO_MEM currentMode = &MEMLNautModeHub;
|
||||
|
||||
|
||||
#define APP_SRAM __not_in_flash("app")
|
||||
|
|
@ -54,11 +59,9 @@ uint32_t get_rosc_entropy_seed(int bits) {
|
|||
|
||||
|
||||
// Global objects
|
||||
// std::shared_ptr<INTERFACE_TYPE> APP_SRAM interface;
|
||||
|
||||
std::shared_ptr<MIDIInOut> APP_SRAM midi_interf;
|
||||
|
||||
|
||||
// Inter-core communication
|
||||
volatile bool APP_SRAM core_0_ready = false;
|
||||
volatile bool APP_SRAM core_1_ready = false;
|
||||
|
|
@ -68,8 +71,6 @@ volatile bool APP_SRAM interface_ready = false;
|
|||
|
||||
|
||||
|
||||
// We're only bound to the joystick inputs (x, y, rotate)
|
||||
// constexpr size_t kN_InputParams = 3;
|
||||
|
||||
// Add these macros near other globals
|
||||
#define MEMORY_BARRIER() __sync_synchronize()
|
||||
|
|
@ -99,36 +100,18 @@ void setup() {
|
|||
MEMLNaut::Initialize();
|
||||
pinMode(33, OUTPUT);
|
||||
|
||||
// {
|
||||
// auto temp_interface = std::make_shared<INTERFACE_TYPE>();
|
||||
|
||||
// // temp_interface->setup(kN_InputParams, PAFSynthAudioApp<>::kN_Params);
|
||||
// // temp_interface->setup(kN_InputParams, ChannelStripAudioApp<>::kN_Params);
|
||||
// temp_interface->setup(currentMode->kN_InputParams, currentMode->getNParams());
|
||||
|
||||
|
||||
// MEMORY_BARRIER();
|
||||
// interface = temp_interface;
|
||||
// MEMORY_BARRIER();
|
||||
// }
|
||||
currentMode->setupInterface();
|
||||
|
||||
// Setup interface with memory barrier protection
|
||||
WRITE_VOLATILE(interface_ready, true);
|
||||
// Bind interface after ensuring it's fully initialized
|
||||
//TODO: control this from the mode
|
||||
// interface->bindInterface(true);
|
||||
Serial.println("Bound interface to MEMLNaut.");
|
||||
|
||||
|
||||
midi_interf = std::make_shared<MIDIInOut>();
|
||||
Serial.println("MIDI setup complete.");
|
||||
if (midi_interf) {
|
||||
currentMode->setupMIDI(midi_interf);
|
||||
// interface->bindMIDI(midi_interf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRITE_VOLATILE(core_0_ready, true);
|
||||
while (!READ_VOLATILE(core_1_ready)) {
|
||||
MEMORY_BARRIER();
|
||||
|
|
@ -160,12 +143,10 @@ PERF_DECLARE(MLSTATS);
|
|||
|
||||
#define ML_INFERENCE_PERIOD_US 5000
|
||||
|
||||
|
||||
void loop() {
|
||||
|
||||
PERIODIC_RUN_US(
|
||||
PERF_BEGIN(MLSTATS);
|
||||
// currentMode->processAnalysisParams(interface);
|
||||
currentMode->processAnalysisParams();
|
||||
MEMLNaut::Instance()->loop();
|
||||
PERF_END(MLSTATS);
|
||||
|
|
|
|||
134
XIASRIAudioApp.hpp
Normal file
134
XIASRIAudioApp.hpp
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
#ifndef __XIASRI_AUDIO_APP_HPP__
|
||||
#define __XIASRI_AUDIO_APP_HPP__
|
||||
|
||||
#include "src/memllib/audio/AudioAppBase.hpp" // Added missing include
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
//#include "src/memllib/interface/InterfaceBase.hpp" // Added missing include
|
||||
|
||||
#include <span>
|
||||
#include "voicespaces/VoiceSpaces.hpp"
|
||||
#include "src/memllib/synth/OnePoleSmoother.hpp"
|
||||
#include "src/memllib/synth/maximilian.h"
|
||||
|
||||
|
||||
|
||||
|
||||
template<size_t NPARAMS=12> //params just go out as MIDI for this one
|
||||
class XIASRIAudioApp : public AudioAppBase<NPARAMS>
|
||||
{
|
||||
public:
|
||||
static constexpr size_t kN_Params = NPARAMS;
|
||||
static constexpr size_t nVoiceSpaces=1;
|
||||
|
||||
|
||||
std::array<VoiceSpace<NPARAMS>, nVoiceSpaces> voiceSpaces;
|
||||
|
||||
VoiceSpaceFn<NPARAMS> currentVoiceSpace;
|
||||
|
||||
std::array<String, nVoiceSpaces> getVoiceSpaceNames() {
|
||||
std::array<String, nVoiceSpaces> names;
|
||||
for(size_t i=0; i < voiceSpaces.size(); i++) {
|
||||
names[i] = voiceSpaces[i].name;
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
void setVoiceSpace(size_t i) {
|
||||
if (i < voiceSpaces.size()) {
|
||||
currentVoiceSpace = voiceSpaces[i].mappingFunction;
|
||||
}
|
||||
}
|
||||
|
||||
XIASRIAudioApp() : AudioAppBase<NPARAMS>() {
|
||||
// auto voiceSpaceXIASRI = [this](const std::array<float, NPARAMS>& params) {
|
||||
// };
|
||||
|
||||
// voiceSpaces[0] = {"XIASRI", voiceSpaceXIASRI};
|
||||
|
||||
// currentVoiceSpace = voiceSpaces[0].mappingFunction;
|
||||
|
||||
};
|
||||
|
||||
|
||||
__attribute__((hot)) stereosample_t __force_inline Process(const stereosample_t x) override
|
||||
{
|
||||
float mix = x.L + x.R;
|
||||
|
||||
smoother.Process(neuralNetOutputs.data(), smoothParams.data());
|
||||
|
||||
dl1mix = smoothParams[0] * smoothParams[0] * 0.4f;
|
||||
dl2mix = smoothParams[1] * smoothParams[1] * 0.4f;
|
||||
dl3mix = smoothParams[2] * smoothParams[2] * 0.8f;
|
||||
allp1fb = smoothParams[4] * 0.99f;
|
||||
allp2fb = smoothParams[5] * 0.99f;
|
||||
float comb1fb = (smoothParams[6] * 0.95f);
|
||||
float comb2fb = (smoothParams[7] * 0.95f);
|
||||
|
||||
float dl1fb = (smoothParams[8] * 0.95f);
|
||||
float dl2fb = (smoothParams[9] * 0.95f);
|
||||
float dl3fb = (smoothParams[10] * 0.95f);
|
||||
|
||||
float y = dcb.play(mix, 0.99f) * 3.f;
|
||||
float y1 = allp1.allpass(y, 30, allp1fb);
|
||||
y1 = comb1.combfb(y1, 127, comb1fb);
|
||||
|
||||
float y2 = allp2.allpass(y, 500, allp2fb);
|
||||
y2 = comb2.combfb(y2, 808, comb2fb);
|
||||
|
||||
y = y1 + y2;
|
||||
float d1 = (dl1.play(y, 3500, dl1fb) * dl1mix);
|
||||
float d2 = (dl2.play(y, 9000, dl2fb) * dl2mix);
|
||||
float d3 = (dl3.play(y, 1199, dl3fb) * dl3mix);
|
||||
|
||||
|
||||
y = y + d1 + d2 + d3;
|
||||
|
||||
y = tanhf(y);
|
||||
|
||||
stereosample_t ret { y, y };
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Setup(float sample_rate, std::shared_ptr<InterfaceBase> interface) override
|
||||
{
|
||||
AudioAppBase<NPARAMS>::Setup(sample_rate, interface);
|
||||
maxiSettings::sampleRate = sample_rate;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) void ProcessParams(const std::array<float, NPARAMS>& params)
|
||||
{
|
||||
// currentVoiceSpace(params);
|
||||
neuralNetOutputs = params;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
std::array<float,NPARAMS> neuralNetOutputs{0}, smoothParams{0};
|
||||
|
||||
maxiDelayline<5000> dl1;
|
||||
maxiDelayline<15100> dl2;
|
||||
maxiDelayline<1201> dl3;
|
||||
|
||||
maxiReverbFilters<300> allp1;
|
||||
maxiReverbFilters<1000> allp2;
|
||||
maxiReverbFilters<300> comb1;
|
||||
maxiReverbFilters<1000> comb2;
|
||||
|
||||
float dl1mix = 0.0f;
|
||||
float dl2mix = 0.0f;
|
||||
float dl3mix = 0.0f;
|
||||
float allp1fb=0.5f;
|
||||
float allp2fb=0.5f;
|
||||
|
||||
maxiDCBlocker dcb;
|
||||
|
||||
OnePoleSmoother<kN_Params> smoother{150.f, kSampleRate};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -15,6 +15,7 @@ public:
|
|||
std::array<String, ChannelStripAudioApp<>::nVoiceSpaces> voiceSpaceList;
|
||||
InterfaceRL interface;
|
||||
std::shared_ptr<InterfaceRL> interfacePtr;
|
||||
std::shared_ptr<BlockSelectView> bypassView;
|
||||
|
||||
void setupInterface() {
|
||||
interface.setup(kN_InputParams, ChannelStripAudioApp<>::kN_Params);
|
||||
|
|
@ -45,6 +46,46 @@ public:
|
|||
}
|
||||
|
||||
void addViews() {
|
||||
bypassView = std::make_shared<BlockSelectView>("Bypasses", TFT_YELLOW, 5, 80, 70, TFT_BLACK,
|
||||
std::vector<String>{ "All", "EQ", "Comp", "PPG", "InFilt" });
|
||||
bypassView->SetOnSelectCallback([this] (size_t id) {
|
||||
Serial.println("Bypass toggled: " + String(id));
|
||||
queue_t& audioAppQ = audioAppChannelStrip.controlMessageQueue;
|
||||
switch(id) {
|
||||
case 1:
|
||||
{
|
||||
auto msg = ChannelStripAudioApp<>::controlMessages::MSG_BYPASS_ALL;
|
||||
queue_try_add(&audioAppQ, &msg);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
auto msg = ChannelStripAudioApp<>::controlMessages::MSG_BYPASS_EQ;
|
||||
queue_try_add(&audioAppQ, &msg);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
auto msg = ChannelStripAudioApp<>::controlMessages::MSG_BYPASS_COMP;
|
||||
queue_try_add(&audioAppQ, &msg);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
auto msg = ChannelStripAudioApp<>::controlMessages::MSG_BYPASS_PREPOSTGAIN;
|
||||
queue_try_add(&audioAppQ, &msg);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
auto msg = ChannelStripAudioApp<>::controlMessages::MSG_BYPASS_INFILTERS;
|
||||
queue_try_add(&audioAppQ, &msg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
MEMLNaut::Instance()->disp->AddView(bypassView);
|
||||
|
||||
std::shared_ptr<VoiceSpaceSelectView> voiceSpaceSelectView;
|
||||
voiceSpaceSelectView = std::make_shared<VoiceSpaceSelectView>("Voice Spaces");
|
||||
|
||||
|
|
@ -72,4 +113,7 @@ public:
|
|||
|
||||
inline void processAnalysisParams() {}
|
||||
|
||||
void analyse(stereosample_t) {}
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -124,4 +124,6 @@ public:
|
|||
|
||||
inline void processAnalysisParams() {}
|
||||
|
||||
void analyse(stereosample_t) {}
|
||||
|
||||
};
|
||||
|
|
|
|||
83
modes/MEMLNautModeXIASRI.hpp
Normal file
83
modes/MEMLNautModeXIASRI.hpp
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
#pragma once
|
||||
|
||||
#include "../src/memllib/interface/MIDIInOut.hpp"
|
||||
#include "../XIASRIAudioApp.hpp"
|
||||
#include "MEMLNautMode.hpp"
|
||||
#include <memory>
|
||||
#include <array>
|
||||
#include "../XiasriAnalysis.hpp"
|
||||
#include "../src/memllib/utils/sharedMem.hpp"
|
||||
#include "../src/memllib/audio/AudioDriver.hpp"
|
||||
#include "../src/memllib/examples/InterfaceRL.hpp"
|
||||
#include "../src/memllib/PicoDefs.hpp"
|
||||
|
||||
|
||||
|
||||
class MEMLNautModeXIASRI {
|
||||
public:
|
||||
constexpr static size_t kN_InputParams = XiasriAnalysis::kN_Params; //ML
|
||||
InterfaceRL interface;
|
||||
std::shared_ptr<InterfaceRL> interfacePtr;
|
||||
XiasriAnalysis mlAnalysis{kSampleRate};
|
||||
SharedBuffer<float, XiasriAnalysis::kN_Params> machine_list_buffer;
|
||||
|
||||
XIASRIAudioApp<> audioAppXIASRI;
|
||||
std::shared_ptr<MIDIInOut> midi_interf;
|
||||
|
||||
void setupInterface() {
|
||||
interface.setup(kN_InputParams, XIASRIAudioApp<>::kN_Params);
|
||||
interface.bindInterface(InterfaceRL::INPUT_MODES::MACHINE_LISTENING);
|
||||
interfacePtr = make_non_owning(interface);
|
||||
}
|
||||
|
||||
String getHelpTitle() {
|
||||
return "XIASRI Mode";
|
||||
}
|
||||
|
||||
__force_inline stereosample_t process(stereosample_t x) {
|
||||
return audioAppXIASRI.Process(x);
|
||||
}
|
||||
|
||||
void setupMIDI(std::shared_ptr<MIDIInOut> new_midi_interf) {
|
||||
midi_interf = new_midi_interf;
|
||||
midi_interf->Setup(0);
|
||||
midi_interf->SetMIDISendChannel(1);
|
||||
interface.bindMIDI(midi_interf);
|
||||
}
|
||||
|
||||
void addViews() {
|
||||
};
|
||||
|
||||
void setupAudio(float sample_rate) {
|
||||
audioAppXIASRI.Setup(sample_rate, interfacePtr);
|
||||
// Reinitialize XiasriAnalysis filters after maxiSettings is properly configured
|
||||
mlAnalysis.ReinitFilters();
|
||||
}
|
||||
|
||||
__force_inline void loop() {
|
||||
audioAppXIASRI.loop();
|
||||
}
|
||||
|
||||
__force_inline void analyse(stereosample_t x) {
|
||||
union {
|
||||
XiasriAnalysis::parameters_t p;
|
||||
float v[XiasriAnalysis::kN_Params];
|
||||
} param_u;
|
||||
param_u.p = mlAnalysis.Process(x.L + x.R);
|
||||
// Write params into shared_buffer
|
||||
machine_list_buffer.writeNonBlocking(param_u.v, XiasriAnalysis::kN_Params);
|
||||
}
|
||||
|
||||
__force_inline void processAnalysisParams() {
|
||||
// Read SharedBuffer
|
||||
std::vector<float> mlist_params(XiasriAnalysis::kN_Params, 0);
|
||||
machine_list_buffer.readNonBlocking(mlist_params);
|
||||
// Send parameters to RL interface
|
||||
interface.readAnalysisParameters(mlist_params);
|
||||
// PERIODIC_RUN(
|
||||
// Serial.printf("%f %f %f\n", mlist_params[0], mlist_params[1], mlist_params[2]);
|
||||
// , 100);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit cdfe2c597656c227c666e088b7e9eb643572e203
|
||||
Subproject commit 2fd9b685d1ba0897b9ad8da21e31edd04956039e
|
||||
|
|
@ -1,32 +1,94 @@
|
|||
#ifndef __VOICE_SPACE_CHSTRIP_BASIC_HPP__
|
||||
#define __VOICE_SPACE_CHSTRIP_BASIC_HPP__
|
||||
|
||||
#define VOICE_SPACE_CHSTRIP_BASIC_BODY \
|
||||
#define VOICE_SPACE_CHSTRIP_NEVE66_BODY \
|
||||
preGain=0.5f + (params[0] * 4.f); \
|
||||
inLowPassCutoff = 1000.f + (params[7] * 19000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * params[8] * 1990.f); \
|
||||
compThreshold = params[10] * -30.f; \
|
||||
compRatio = 1.0f + (params[11] * 11.f); \
|
||||
compAttack = 0.08f + (params[12] * 50.f); \
|
||||
compRelease = 50.0f + (params[13] * 1050.f); \
|
||||
\
|
||||
inLowPassCutoff = 2000.f + (params[7] * params[7] * 18000.f); \
|
||||
inHighPassCutoff = 30.f + (params[8] * params[8] * 270.f); \
|
||||
\
|
||||
lowShelfFreq = 31.5f + (params[14] * params[14] * 313.5f); \
|
||||
lowShelfQ = 0.6f + (params[15] * 4.4f); \
|
||||
lowShelfGain = -15.f + (params[16] * 30.f);\
|
||||
\
|
||||
peak0Freq = 200.f + (params[1] * params[1] * 1800.f); \
|
||||
peak0Q = 0.6f + (params[5] * 4.4f); \
|
||||
peak0Gain = -18.f + (params[6] * 36.f);\
|
||||
peak1Freq = 800.f + (params[4] * params[4] * 7200.f); \
|
||||
peak1Q = 0.6f + (params[5] * 4.4f); \
|
||||
peak1Gain = -18.f + (params[6] * 36.f);\
|
||||
\
|
||||
highShelfFreq = 1600.f + (params[17] * params[17] * 14400.f); \
|
||||
highShelfQ = 0.6f + (params[18] * 4.4f); \
|
||||
highShelfGain = -18.f + (params[19] * 36.f);\
|
||||
\
|
||||
compThreshold = 20 + (params[10] * -40.f); \
|
||||
compRatio = 1.0f + (params[11] * 19.f); \
|
||||
compAttack = 0.002f + (params[12] * 10.f); \
|
||||
compRelease = 30.0f + (params[13] * params[13] * 2970.f); \
|
||||
\
|
||||
postGain=0.5f + (params[23] * 4.f); \
|
||||
|
||||
#define VOICE_SPACE_CHSTRIP_SSL4KGIST_BODY \
|
||||
preGain=0.5f + (params[0] * 4.f); \
|
||||
inLowPassCutoff = 3000.f + (params[7] * params[7] * 18000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * 340.f); \
|
||||
\
|
||||
lowShelfFreq = 30.f + (params[14] * params[14] * 420.f); \
|
||||
lowShelfQ = 0.6f + (params[15] * 4.4f); \
|
||||
lowShelfGain = -18.f + (params[16] * 36.f);\
|
||||
\
|
||||
peak0Freq = 200.f + (params[1] * params[1] * 2300.f); \
|
||||
peak0Q = 0.6f + (params[5] * 4.4f); \
|
||||
peak0Gain = -22.f + (params[6] * 44.f);\
|
||||
\
|
||||
peak1Freq = 600.f + (params[4] * params[4] * 6400.f); \
|
||||
peak1Q = 0.6f + (params[5] * 4.4f); \
|
||||
peak1Gain = -22.f + (params[6] * 44.f);\
|
||||
\
|
||||
highShelfFreq = 1500.f + (params[17] * params[17] * 14500.f); \
|
||||
highShelfQ = 0.6f + (params[18] * 4.4f); \
|
||||
highShelfGain = -20.f + (params[19] * 40.f);\
|
||||
\
|
||||
compThreshold = 10.f + (params[10] * -30.f); \
|
||||
compRatio = 1.0f + (params[11] * params[11] * 20.f); \
|
||||
compAttack = 0.08f + (params[12] * 3.f); \
|
||||
compRelease = 100.0f + (params[13] * params [13] * 3900.f); \
|
||||
\
|
||||
postGain=0.5f + (params[23] * 4.f); \
|
||||
|
||||
#define VOICE_SPACE_CHSTRIP_SSL9KINDA_BODY \
|
||||
preGain=0.5f + (params[0] * 4.f); \
|
||||
inLowPassCutoff = 3000.f + (params[7] * params[7] * 18000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * 490.f); \
|
||||
\
|
||||
lowShelfFreq = 40.f + (params[14] * params[14] * 560.f); \
|
||||
lowShelfQ = 0.6f + (params[15] * 4.4f); \
|
||||
lowShelfGain = -20.f + (params[16] * 40.f);\
|
||||
\
|
||||
peak0Freq = 200.f + (params[1] * params[1] * 1800.f); \
|
||||
peak0Q = 0.5f + (params[5] * 2.f); \
|
||||
peak0Gain = -20.f + (params[6] * 40.f);\
|
||||
\
|
||||
peak1Freq = 600.f + (params[4] * params[4] * 6400.f); \
|
||||
peak1Q = 0.5f + (params[5] * 2.f); \
|
||||
peak1Gain = -20.f + (params[6] * 40.f);\
|
||||
\
|
||||
highShelfFreq = 1500.f + (params[17] * params[17] * 20500.f); \
|
||||
highShelfQ = 0.6f + (params[18] * 4.4f); \
|
||||
highShelfGain = -20.f + (params[19] * 40.f);\
|
||||
\
|
||||
compThreshold = 10.f + (params[10] * -30.f); \
|
||||
compRatio = 1.0f + (params[11] * params[11] * 20.f); \
|
||||
compAttack = 0.08f + (params[12] * 3.f); \
|
||||
compRelease = 100.0f + (params[13] * params [13] * 3900.f); \
|
||||
\
|
||||
postGain=0.5f + (params[23] * 4.f); \
|
||||
peak0Freq = 60.f + (params[1] * params[1] * 2940.f); \
|
||||
peak0Q = 0.6f + (params[5]*4.4f); \
|
||||
peak0Gain = -18.f + (params[6]*36.f);\
|
||||
peak1Freq = 300.f + (params[4] * params[4] * 7700.f); \
|
||||
peak1Q = 0.6f + (params[5]*4.4f); \
|
||||
peak1Gain = -18.f + (params[6]*36.f);\
|
||||
lowShelfFreq = 20.f + (params[14] * params[14] * 980.f); \
|
||||
lowShelfQ = 0.6f + (params[15]*4.4f); \
|
||||
lowShelfGain = -18.f + (params[16]*36.f);\
|
||||
highShelfFreq = 1000.f + (params[17] * params[17] * 9000.f); \
|
||||
highShelfQ = 0.6f + (params[18]*4.4f); \
|
||||
highShelfGain = -18.f + (params[19]*36.f);\
|
||||
|
||||
#define VOICE_SPACE_CHSTRIP_MALE_VOX_BODY \
|
||||
preGain=0.5f + (params[0] * 4.f); \
|
||||
inLowPassCutoff = 1000.f + (params[7] * 19000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * params[8] * 1990.f); \
|
||||
inLowPassCutoff = 1000.f + (params[7] * params[7] * 19000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * 1990.f); \
|
||||
compThreshold = params[10] * -30.f; \
|
||||
compRatio = 2.0f + (params[11] * 6.f); \
|
||||
compAttack = 0.08f + (params[12] * 50.f); \
|
||||
|
|
@ -53,8 +115,8 @@
|
|||
|
||||
#define VOICE_SPACE_CHSTRIP_FEMALE_VOX_BODY \
|
||||
preGain=0.5f + (params[0] * 4.f); \
|
||||
inLowPassCutoff = 1000.f + (params[7] * 19000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * params[8] * 1990.f); \
|
||||
inLowPassCutoff = 1000.f + (params[7] * params[7] * 19000.f); \
|
||||
inHighPassCutoff = 10.f + (params[8] * params[8] * 1990.f); \
|
||||
compThreshold = params[10] * -30.f; \
|
||||
compRatio = 2.0f + (params[11] * 6.f); \
|
||||
compAttack = 0.08f + (params[12] * 50.f); \
|
||||
|
|
|
|||
Loading…
Reference in a new issue