Update Synth_Dexed to 65d8383ad5 (#871)

* use std::min and std::max in Compressor

* update Synth_Dexed to 65d8383ad5

Contains various fixes:
https://codeberg.org/dcoredump/Synth_Dexed/pulls/11
https://codeberg.org/dcoredump/Synth_Dexed/pulls/12
https://codeberg.org/dcoredump/Synth_Dexed/pulls/13

And sostenuto/hold:
https://codeberg.org/dcoredump/Synth_Dexed/pulls/10
https://codeberg.org/dcoredump/Synth_Dexed/pulls/7

* use the corrected named functions of Synth_Dexed

https://codeberg.org/dcoredump/Synth_Dexed/pulls/12
pull/874/head^2
soyer 2 days ago committed by GitHub
parent b383f4ce39
commit 26e258b25a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 9
      src/effect_compressor.cpp
  2. 4
      src/minidexed.cpp
  3. 2
      submod.sh

@ -12,6 +12,7 @@
MIT License. use at your own risk.
*/
#include <algorithm>
#include <circle/logger.h>
#include <cstdlib>
#include "effect_compressor.h"
@ -203,7 +204,7 @@ void Compressor::setPreGain_dB(float32_t gain_dB)
void Compressor::setCompressionRatio(float32_t cr)
{
comp_ratio = max(0.001f, cr); //limit to positive values
comp_ratio = std::max(0.001f, cr); //limit to positive values
updateThresholdAndCompRatioConstants();
}
@ -213,7 +214,7 @@ void Compressor::setAttack_sec(float32_t a, float32_t fs_Hz)
attack_const = expf(-1.0f / (attack_sec * fs_Hz)); //expf() is much faster than exp()
//also update the time constant for the envelope extraction
setLevelTimeConst_sec(min(attack_sec,release_sec) / 5.0, fs_Hz); //make the level time-constant one-fifth the gain time constants
setLevelTimeConst_sec(std::min(attack_sec,release_sec) / 5.0, fs_Hz); //make the level time-constant one-fifth the gain time constants
}
void Compressor::setRelease_sec(float32_t r, float32_t fs_Hz)
@ -222,13 +223,13 @@ void Compressor::setRelease_sec(float32_t r, float32_t fs_Hz)
release_const = expf(-1.0f / (release_sec * fs_Hz)); //expf() is much faster than exp()
//also update the time constant for the envelope extraction
setLevelTimeConst_sec(min(attack_sec,release_sec) / 5.0, fs_Hz); //make the level time-constant one-fifth the gain time constants
setLevelTimeConst_sec(std::min(attack_sec,release_sec) / 5.0, fs_Hz); //make the level time-constant one-fifth the gain time constants
}
void Compressor::setLevelTimeConst_sec(float32_t t_sec, float32_t fs_Hz)
{
const float32_t min_t_sec = 0.002f; //this is the minimum allowed value
level_lp_sec = max(min_t_sec,t_sec);
level_lp_sec = std::max(min_t_sec,t_sec);
level_lp_const = expf(-1.0f / (level_lp_sec * fs_Hz)); //expf() is much faster than exp()
}

@ -1237,7 +1237,7 @@ std::string CMiniDexed::GetVoiceName (unsigned nTG)
if (nTG < m_nToneGenerators)
{
assert (m_pTG[nTG]);
m_pTG[nTG]->setName (VoiceName);
m_pTG[nTG]->getName (VoiceName);
}
std::string Result (VoiceName);
return Result;
@ -2078,7 +2078,7 @@ void CMiniDexed::SetVoiceName (const std::string &VoiceName, unsigned nTG)
char Name[11];
strncpy(Name, VoiceName.c_str(),10);
Name[10] = '\0';
m_pTG[nTG]->getName (Name);
m_pTG[nTG]->setName (Name);
}
bool CMiniDexed::DeletePerformance(unsigned nID)

@ -23,5 +23,5 @@ cd -
# Use fixed master branch of Synth_Dexed
cd Synth_Dexed/
git reset --hard
git checkout c9f5274 -f
git checkout 65d8383ad5 -f
cd -

Loading…
Cancel
Save