- 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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 <numSamples; i++)
|
||||
{
|
||||
x = max(fabs(buf[0][i]), fabs(buf[1][i]));
|
||||
if (m_limiter_env < x)
|
||||
m_limiter_env += limiter_ar*(x - m_limiter_env);
|
||||
if (x > 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,11 +572,12 @@ void JaySynthAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffer
|
||||
m_limiter_active = 0;
|
||||
for (i=0; i <numSamples; i++)
|
||||
{
|
||||
limiter_gain[i] = (float)(limiter_threshold/max(limiter_threshold, limiter_env[i]));
|
||||
|
||||
limiter_gain[i] = min(1.0, 1.0/(limiter_env[i] + 1.0e-6));
|
||||
if (limiter_gain[i] < 1.0)
|
||||
{
|
||||
m_limiter_active = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i <numSamples; i++)
|
||||
buf1[i] = (float)(buf[0][i]*limiter_gain[i]);
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#define BLIT_TABLE_OVERSAMPLING (4)
|
||||
#define BLIT_INTEROLATION_ORDER (2)
|
||||
|
||||
#define SYNTH_LIMITER_RISE_TIME 0.001 //s
|
||||
#define SYNTH_LIMITER_RISE_TIME 0.010 //s
|
||||
#define SYNTH_LIMITER_FALL_TIME 1.000 //s
|
||||
#define SYNTH_LIMITER_THRESHOLD 3 // dbFS
|
||||
#define SYNTH_LIMITER_THRESHOLD -6 // dbFS
|
||||
|
||||
#define SYNTH_MAX_BUFSIZE 8192
|
||||
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ void VCO_Init(osc_t *pObj, UINT32 id, vco_common_t *pCom, synth_float_t fs)
|
||||
Sine_Init(&pObj->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)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "wavetable.h"
|
||||
|
||||
#define OSC_RECALC_THRESH 0.001f
|
||||
#define OSC_IMPULS_HEIGHT 100.0f
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Types
|
||||
|
||||
Reference in New Issue
Block a user