diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 2c82869..744f119 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -257,6 +257,11 @@ void PaulstretchpluginAudioProcessorEditor::resized() m_parcomps[cpi_freefilter_shiftx]->setBounds(xoffs, yoffs, div - 1, 24); xoffs += div; m_parcomps[cpi_freefilter_shifty]->setBounds(xoffs, yoffs, div - 1, 24); + xoffs = 1; + yoffs += 25; + m_parcomps[cpi_freefilter_scaley]->setBounds(xoffs, yoffs, div - 1, 24); + xoffs += div; + m_parcomps[cpi_freefilter_tilty]->setBounds(xoffs, yoffs, div - 1, 24); yoffs += 25; int remain_h = getHeight() - 1 - yoffs; m_spec_order_ed.setBounds(1, yoffs, getWidth() - 2, remain_h / 5 * 1); diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 4499a05..2bbd4d4 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -152,6 +152,8 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor() addParameter(new AudioParameterBool("bypass_stretch0", "Bypass stretch", false)); // 33 addParameter(new AudioParameterFloat("freefilter_shiftx_0", "Free filter shift X", -1.0f, 1.0f, 0.0f)); // 34 addParameter(new AudioParameterFloat("freefilter_shifty_0", "Free filter shift Y", -1.0f, 1.0f, 0.0f)); // 35 + addParameter(new AudioParameterFloat("freefilter_scaley_0", "Free filter scale Y", -1.0f, 1.0f, 1.0f)); // 36 + addParameter(new AudioParameterFloat("freefilter_tilty_0", "Free filter tilt Y", -1.0f, 1.0f, 0.0f)); // 37 auto& pars = getParameters(); for (const auto& p : pars) m_reset_pars.push_back(p->getValue()); @@ -630,6 +632,9 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M return; m_free_filter_envelope->m_transform_x_shift = *getFloatParameter(cpi_freefilter_shiftx); m_free_filter_envelope->m_transform_y_shift = *getFloatParameter(cpi_freefilter_shifty); + m_free_filter_envelope->m_transform_y_scale = *getFloatParameter(cpi_freefilter_scaley); + m_free_filter_envelope->m_transform_y_tilt = *getFloatParameter(cpi_freefilter_tilty); + m_stretch_source->setMainVolume(*getFloatParameter(cpi_main_volume)); m_stretch_source->setRate(*getFloatParameter(cpi_stretchamount)); m_stretch_source->setPreviewDry(*getBoolParameter(cpi_bypass_stretch)); diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index ae6c9b0..5fd88cd 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -62,6 +62,8 @@ const int cpi_num_inchans = 32; const int cpi_bypass_stretch = 33; const int cpi_freefilter_shiftx = 34; const int cpi_freefilter_shifty = 35; +const int cpi_freefilter_scaley = 36; +const int cpi_freefilter_tilty = 37; class MyPropertiesFile { diff --git a/Source/jcdp_envelope.h b/Source/jcdp_envelope.h index a804a19..9e7b527 100644 --- a/Source/jcdp_envelope.h +++ b/Source/jcdp_envelope.h @@ -577,9 +577,9 @@ public: double scaled = 0.5 - m_transform_y_scale * diff; double shifted = scaled + m_transform_y_shift + m_transform_y_sinus* sin(2*3.141592653*(x-m_transform_x_shift)*m_transform_y_sinus_freq); - double tiltline = 0.5+m_transform_y_tilt*x; + double tiltline = m_transform_y_tilt*x; double tilted = shifted+tiltline; - return jlimit(0.0,1.0,shifted); + return jlimit(0.0,1.0,tilted); } bool isTransformed() const { diff --git a/readme.txt b/readme.txt index 704ea4b..f2db6a3 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ Released under GNU General Public License v.2 license. History : -02-27-2018 1.0.3 +02-28-2018 1.0.3 -Added free filter spectral processing module -Basic feature to allow offline rendering of the output of the plugin into a new file -Fixed bug with the number of harmonics parameter not getting saved and recalled