Make num harmonics parameter an integer parameter

This commit is contained in:
xenakios 2018-01-30 18:07:47 +02:00
parent ced5a5e22a
commit 65545c96b6
3 changed files with 11 additions and 3 deletions

View File

@ -128,9 +128,12 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
{
return jmap<float>(value, 101.0f, 1.0f, 0.0f, 1.0f);
};
addParameter(new AudioParameterFloat("numharmonics0", "Num harmonics",
/*
addParameter(new AudioParameterFloat("numharmonics0", "Num harmonics",
NormalisableRange<float>(1.0f, 101.0f,
numhar_convertFrom0To1Func, numhar_convertTo0To1Func), 101.0f)); // 11
*/
addParameter(new AudioParameterInt("numharmonics0", "Num harmonics", 1, 100, 10)); // 11
addParameter(new AudioParameterFloat("harmonicsfreq0", "Harmonics base freq",
NormalisableRange<float>(1.0f, 5000.0f, 1.00f, 0.5), 128.0f)); // 12
addParameter(new AudioParameterFloat("harmonicsbw0", "Harmonics bandwidth", 0.1f, 200.0f, 25.0f)); // 13
@ -568,7 +571,7 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M
m_ppar.compressor.power = *getFloatParameter(cpi_compress);
m_ppar.harmonics.nharmonics = *getFloatParameter(cpi_numharmonics);
m_ppar.harmonics.nharmonics = *getIntParameter(cpi_numharmonics);
m_ppar.harmonics.freq = *getFloatParameter(cpi_harmonicsfreq);
m_ppar.harmonics.bandwidth = *getFloatParameter(cpi_harmonicsbw);
m_ppar.harmonics.gauss = getParameter(cpi_harmonicsgauss);

View File

@ -126,6 +126,10 @@ public:
{
return dynamic_cast<AudioParameterFloat*>(getParameters()[index]);
}
AudioParameterInt* getIntParameter(int index)
{
return dynamic_cast<AudioParameterInt*>(getParameters()[index]);
}
void setRecordingEnabled(bool b);
bool isRecordingEnabled() { return m_is_recording; }
double getRecordingPositionPercent();

View File

@ -44,7 +44,8 @@ History :
provide the file name of the source of audio file, so audio clip/event/item specific audio won't be imported)
-Removed an unnecessary level of buffering (doesn't reduce latency but should help a bit with CPU usage)
-Added About window
01-21-2018 1.0.0 preview 5
01-30-2018 1.0.0 preview 5
-Added buttons to enable/disable spectral processing steps
-Restored ability to set capture buffer length (via the settings menu)
-Seek to play range beginning when audio file imported
-Fixes to waveform display issues