From 5737b9216572cc248da8b4509940bc2b5cd06224 Mon Sep 17 00:00:00 2001 From: xenakios Date: Tue, 12 Dec 2017 19:54:54 +0200 Subject: [PATCH] Layout parameters in a grid for now etc --- Source/PS_Source/StretchSource.cpp | 1 + Source/PluginEditor.cpp | 6 ++++-- Source/PluginProcessor.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/PS_Source/StretchSource.cpp b/Source/PS_Source/StretchSource.cpp index fa53f6a..80e5854 100644 --- a/Source/PS_Source/StretchSource.cpp +++ b/Source/PS_Source/StretchSource.cpp @@ -467,6 +467,7 @@ void StretchAudioSource::setProcessParameters(ProcessParameters * pars) { if (*pars == m_ppar) return; + //SpinLock::ScopedLockType std::lock_guard locker(m_mutex); m_ppar = *pars; for (int i = 0; i < m_stretchers.size(); ++i) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index eba73c6..f612f0c 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -43,7 +43,7 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor (Pa m_rec_enable.setButtonText("Capture"); attachCallback(m_rec_enable, [this]() { processor.setRecordingEnabled(m_rec_enable.getToggleState()); }); //addAndMakeVisible(&m_specvis); - setSize (700, 30+pars.size()*25+200); + setSize (1000, 30+(pars.size()/2)*25+200); m_wavecomponent.TimeSelectionChangedCallback = [this](Range range, int which) { *processor.getFloatParameter(5) = range.getStart(); @@ -80,7 +80,9 @@ void PaulstretchpluginAudioProcessorEditor::resized() for (int i = 0; i < m_parcomps.size(); ++i) { - m_parcomps[i]->setBounds(1, 30 + i * 25, getWidth()-2, 24); + int gridx = i % 2; + int gridy = i / 2; + m_parcomps[i]->setBounds(1+gridx*(getWidth()/2), 30 + gridy * 25, getWidth()/2-2, 24); } int yoffs = m_parcomps.back()->getBottom() + 1; m_wavecomponent.setBounds(1, yoffs, getWidth()-2, getHeight()-1-yoffs); diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index d00a46b..d4810dd 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -98,7 +98,8 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor() addParameter(new AudioParameterFloat("compress0", "Compress", 0.0f, 1.0f, 0.0f)); // 9 addParameter(new AudioParameterFloat("loopxfadelen0", "Loop xfade length", 0.0f, 1.0f, 0.0f)); // 10 addParameter(new AudioParameterFloat("numharmonics0", "Num harmonics", 0.0f, 100.0f, 0.0f)); // 11 - addParameter(new AudioParameterFloat("harmonicsfreq0", "Harmonics base freq", 1.0f, 5000.0f, 100.0f)); // 12 + addParameter(new AudioParameterFloat("harmonicsfreq0", "Harmonics base freq", + NormalisableRange(1.0f, 5000.0f, 1.00f, 0.5), 128.0f)); // 12 addParameter(new AudioParameterFloat("harmonicsbw0", "Harmonics bandwidth", 0.1f, 200.0f, 25.0f)); // 13 addParameter(new AudioParameterBool("harmonicsgauss0", "Gaussian harmonics", false)); // 14 addParameter(new AudioParameterFloat("octavemixm2_0", "2 octaves down level", 0.0f, 1.0f, 0.0f)); // 15