@@ -83,7 +83,9 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau | |||||
m_zs.RangeChanged = [this](Range<double> r) | m_zs.RangeChanged = [this](Range<double> r) | ||||
{ | { | ||||
m_wavecomponent.setViewRange(r); | m_wavecomponent.setViewRange(r); | ||||
processor.m_wave_view_range = r; | |||||
}; | }; | ||||
m_zs.setRange(processor.m_wave_view_range, true); | |||||
setSize (1000, 30+(pars.size()/2)*25+200+15); | setSize (1000, 30+(pars.size()/2)*25+200+15); | ||||
m_wavecomponent.TimeSelectionChangedCallback = [this](Range<double> range, int which) | m_wavecomponent.TimeSelectionChangedCallback = [this](Range<double> range, int which) | ||||
{ | { | ||||
@@ -229,7 +231,7 @@ void PaulstretchpluginAudioProcessorEditor::resized() | |||||
int remain_h = getHeight() - 1 - yoffs -15; | int remain_h = getHeight() - 1 - yoffs -15; | ||||
m_spec_order_ed.setBounds(1, yoffs, getWidth() - 2, remain_h / 5 * 1); | m_spec_order_ed.setBounds(1, yoffs, getWidth() - 2, remain_h / 5 * 1); | ||||
m_wavecomponent.setBounds(1, m_spec_order_ed.getBottom()+1, getWidth()-2, remain_h/5*4); | m_wavecomponent.setBounds(1, m_spec_order_ed.getBottom()+1, getWidth()-2, remain_h/5*4); | ||||
m_zs.setBounds(1, m_wavecomponent.getBottom(), getWidth() - 2, 14); | |||||
m_zs.setBounds(1, m_wavecomponent.getBottom(), getWidth() - 2, 16); | |||||
//m_specvis.setBounds(1, yoffs, getWidth() - 2, getHeight() - 1 - yoffs); | //m_specvis.setBounds(1, yoffs, getWidth() - 2, getHeight() - 1 - yoffs); | ||||
} | } | ||||
@@ -1132,6 +1134,8 @@ void zoom_scrollbar::paint(Graphics &g) | |||||
void zoom_scrollbar::setRange(Range<double> rng, bool docallback) | void zoom_scrollbar::setRange(Range<double> rng, bool docallback) | ||||
{ | { | ||||
if (rng.isEmpty()) | |||||
return; | |||||
m_therange = rng.constrainRange({ 0.0,1.0 }); | m_therange = rng.constrainRange({ 0.0,1.0 }); | ||||
if (RangeChanged && docallback) | if (RangeChanged && docallback) | ||||
RangeChanged(m_therange); | RangeChanged(m_therange); | ||||
@@ -225,6 +225,7 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool | |||||
paramtree.setProperty("prebufamount", -1, nullptr); | paramtree.setProperty("prebufamount", -1, nullptr); | ||||
paramtree.setProperty("loadfilewithstate", m_load_file_with_state, nullptr); | paramtree.setProperty("loadfilewithstate", m_load_file_with_state, nullptr); | ||||
} | } | ||||
storeToTreeProperties(paramtree, nullptr, "waveviewrange", m_wave_view_range); | |||||
return paramtree; | return paramtree; | ||||
} | } | ||||
@@ -246,6 +247,7 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree) | |||||
} | } | ||||
m_stretch_source->setSpectrumProcessOrder(order); | m_stretch_source->setSpectrumProcessOrder(order); | ||||
} | } | ||||
getFromTreeProperties(tree, "waveviewrange", m_wave_view_range); | |||||
for (int i = 0; i < getNumParameters(); ++i) | for (int i = 0; i < getNumParameters(); ++i) | ||||
{ | { | ||||
auto par = getFloatParameter(i); | auto par = getFloatParameter(i); | ||||
@@ -163,6 +163,7 @@ public: | |||||
bool m_state_dirty = false; | bool m_state_dirty = false; | ||||
std::unique_ptr<AudioThumbnail> m_thumb; | std::unique_ptr<AudioThumbnail> m_thumb; | ||||
bool m_show_technical_info = false; | bool m_show_technical_info = false; | ||||
Range<double> m_wave_view_range; | |||||
private: | private: | ||||
@@ -8,8 +8,9 @@ Released under GNU General Public License v.2 license. | |||||
History : | History : | ||||
02-13-2018 1.0.1 | |||||
02-14-2018 1.0.1 | |||||
-Increased maximum number of input channels to 8 | -Increased maximum number of input channels to 8 | ||||
-Added zoom/scroll bar for waveform | |||||
-GUI performance improvement/bug fix during capture mode | -GUI performance improvement/bug fix during capture mode | ||||
02-09-2018 1.0.0 | 02-09-2018 1.0.0 | ||||
-Control/Command click on waveform seeks (if click within active play range) | -Control/Command click on waveform seeks (if click within active play range) | ||||