From ced5a5e22a6fbfdebb96bf0e0afa881f3ec2e5ce Mon Sep 17 00:00:00 2001 From: xenakios Date: Tue, 30 Jan 2018 17:54:06 +0200 Subject: [PATCH] Increase spec process enabled button size. Init spread spec process to disabled. Remove checks for spec process enabled states from processBlock --- Source/PS_Source/StretchSource.cpp | 2 +- Source/PluginEditor.cpp | 8 ++++---- Source/PluginProcessor.cpp | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/PS_Source/StretchSource.cpp b/Source/PS_Source/StretchSource.cpp index b9d0d1e..87919bd 100644 --- a/Source/PS_Source/StretchSource.cpp +++ b/Source/PS_Source/StretchSource.cpp @@ -12,7 +12,7 @@ StretchAudioSource::StretchAudioSource(int initialnumoutchans, AudioFormatManage m_resampler = std::make_unique(); m_resampler_outbuf.resize(1024*1024); m_inputfile = std::make_unique(m_afm); - m_specproc_order = { {0,false} , { 1, false} ,{2,true},{3,true},{4,true},{5,true},{6,true},{7,true} }; + m_specproc_order = { {0,false} , { 1, false} ,{2,true},{3,true},{4,true},{5,false},{6,true},{7,true} }; setNumOutChannels(initialnumoutchans); m_xfadetask.buffer.setSize(8, 65536); m_xfadetask.buffer.clear(); diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 27f7ece..cd97114 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -722,7 +722,7 @@ void SpectralChainEditor::mouseDown(const MouseEvent & ev) m_cur_index = ev.x / box_w; if (m_cur_index >= 0) { - juce::Rectangle r(box_w*m_cur_index, 1, 10, 10); + juce::Rectangle r(box_w*m_cur_index, 1, 12, 12); if (r.contains(ev.x, ev.y)) { m_order[m_cur_index].m_enabled = !m_order[m_cur_index].m_enabled; @@ -790,11 +790,11 @@ void SpectralChainEditor::drawBox(Graphics & g, int index, int x, int y, int w, g.drawRect(x, y, w, h); g.drawFittedText(txt, x,y,w,h, Justification::centred, 3); g.setColour(Colours::gold); - g.drawRect(x + 2, y + 2, 10, 10); + g.drawRect(x + 2, y + 2, 12, 12); if (m_order[index].m_enabled == true) { - g.drawLine(x+2, y+2, x+12, y+12); - g.drawLine(x+2, y+12, x+12, y+2); + g.drawLine(x+2, y+2, x+14, y+14); + g.drawLine(x+2, y+14, x+14, y+2); } g.setColour(Colours::white); } diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index f6e1868..c7de18d 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -563,25 +563,26 @@ void PaulstretchpluginAudioProcessor::processBlock (AudioSampleBuffer& buffer, M setFFTSize(*getFloatParameter(cpi_fftsize)); m_ppar.pitch_shift.cents = *getFloatParameter(cpi_pitchshift) * 100.0; m_ppar.freq_shift.Hz = *getFloatParameter(cpi_frequencyshift); - m_ppar.spread.enabled = *getFloatParameter(cpi_spreadamount) > 0.0f; + m_ppar.spread.bandwidth = *getFloatParameter(cpi_spreadamount); - m_ppar.compressor.enabled = *getFloatParameter(cpi_compress)>0.0f; + m_ppar.compressor.power = *getFloatParameter(cpi_compress); - m_ppar.harmonics.enabled = *getFloatParameter(cpi_numharmonics)<101.0; + m_ppar.harmonics.nharmonics = *getFloatParameter(cpi_numharmonics); m_ppar.harmonics.freq = *getFloatParameter(cpi_harmonicsfreq); m_ppar.harmonics.bandwidth = *getFloatParameter(cpi_harmonicsbw); m_ppar.harmonics.gauss = getParameter(cpi_harmonicsgauss); + m_ppar.octave.om2 = *getFloatParameter(cpi_octavesm2); m_ppar.octave.om1 = *getFloatParameter(cpi_octavesm1); m_ppar.octave.o0 = *getFloatParameter(cpi_octaves0); m_ppar.octave.o1 = *getFloatParameter(cpi_octaves1); m_ppar.octave.o15 = *getFloatParameter(cpi_octaves15); m_ppar.octave.o2 = *getFloatParameter(cpi_octaves2); - m_ppar.octave.enabled = true; + m_ppar.filter.low = *getFloatParameter(cpi_filter_low); m_ppar.filter.high = *getFloatParameter(cpi_filter_high); - m_ppar.tonal_vs_noise.enabled = (*getFloatParameter(cpi_tonalvsnoisebw)) > 0.75; + m_ppar.tonal_vs_noise.bandwidth = *getFloatParameter(cpi_tonalvsnoisebw); m_ppar.tonal_vs_noise.preserve = *getFloatParameter(cpi_tonalvsnoisepreserve); m_stretch_source->setOnsetDetection(*getFloatParameter(cpi_onsetdetection));