From eecd6c5005f9fd3998d6107474dea00144486df1 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Thu, 23 Jul 2020 15:42:35 +0000 Subject: [PATCH] - increased to version 0.5.8 - improved limiter - VCO: Waveform "Impulse" hase now amplitude of 100 git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@715 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- JuceLibraryCode/AppConfig.h | 6 +++--- Source/PluginProcessor.cpp | 17 +++++++++++------ Source/synth/synth_defs.h | 4 ++-- Source/synth/vco.c | 4 ++-- Source/synth/vco.h | 1 + 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/JuceLibraryCode/AppConfig.h b/JuceLibraryCode/AppConfig.h index 57c1428..5c6dc99 100644 --- a/JuceLibraryCode/AppConfig.h +++ b/JuceLibraryCode/AppConfig.h @@ -236,13 +236,13 @@ #define JucePlugin_EditorRequiresKeyboardFocus 0 #endif #ifndef JucePlugin_Version - #define JucePlugin_Version 0.5.7 + #define JucePlugin_Version 0.5.8 #endif #ifndef JucePlugin_VersionCode - #define JucePlugin_VersionCode 0x00050007 + #define JucePlugin_VersionCode 0x00050008 #endif #ifndef JucePlugin_VersionString - #define JucePlugin_VersionString "0.5.7" + #define JucePlugin_VersionString "0.5.8" #endif #ifndef JucePlugin_VSTUniqueID #define JucePlugin_VSTUniqueID JucePlugin_PluginCode diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 78d31cf..407ca41 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -550,17 +550,21 @@ void JaySynthAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer buf[1][i] = (synth_float_t)buf2[i] * synth_gain; // Limiter - limiter_ar = 1.0/(SYNTH_LIMITER_RISE_TIME*m_fs); + limiter_ar = 5.0/(SYNTH_LIMITER_RISE_TIME*m_fs); limiter_af = 5.0/(SYNTH_LIMITER_FALL_TIME*m_fs); limiter_threshold = pow((synth_float_t)10.0, (synth_float_t)SYNTH_LIMITER_THRESHOLD/20); for (i=0; i m_limiter_env) + { + m_limiter_env = (1.0-limiter_ar)*m_limiter_env + limiter_ar*x; + } else - m_limiter_env += limiter_af*(x - m_limiter_env); + { + m_limiter_env = (1.0-limiter_af)*m_limiter_env; + } limiter_env[i] = m_limiter_env; } @@ -568,10 +572,11 @@ void JaySynthAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer m_limiter_active = 0; for (i=0; i sine, fs); BLIT_Init(&pObj->blep, &pCom->blit, fs); WT_Init(&pObj->wt, id, &pCom->wt, fs); - pObj->impulse = 10; + pObj->impulse = OSC_IMPULS_HEIGHT; } void VCO_Free(osc_t *pObj) @@ -101,7 +101,7 @@ void VCO_Reset(osc_t *pObj, synth_float_t phase) Sine_Reset(&pObj->sine, phase); BLIT_Reset(&pObj->blep, phase); WT_Reset(&pObj->wt, phase); - pObj->impulse = 10; + pObj->impulse = OSC_IMPULS_HEIGHT; } void VCO_Start(osc_t *pObj) diff --git a/Source/synth/vco.h b/Source/synth/vco.h index d843cbf..d338cc0 100644 --- a/Source/synth/vco.h +++ b/Source/synth/vco.h @@ -10,6 +10,7 @@ #include "wavetable.h" #define OSC_RECALC_THRESH 0.001f +#define OSC_IMPULS_HEIGHT 100.0f // -------------------------------------------------------------- // Types