Initial work to add back the free filter feature
This commit is contained in:
parent
600f2d1251
commit
cf9b54d19b
@ -28,9 +28,14 @@ extern String g_plugintitle;
|
||||
PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(PaulstretchpluginAudioProcessor& p)
|
||||
: AudioProcessorEditor(&p),
|
||||
m_wavecomponent(p.m_afm,p.m_thumb.get()),
|
||||
processor(p), m_perfmeter(&p)
|
||||
processor(p), m_perfmeter(&p),
|
||||
m_wavefilter_tab(TabbedButtonBar::TabsAtTop)
|
||||
|
||||
{
|
||||
//addAndMakeVisible(&m_free_filter_component);
|
||||
m_free_filter_component.set_envelope(processor.m_free_filter_envelope);
|
||||
m_wavefilter_tab.setTabBarDepth(17);
|
||||
|
||||
addAndMakeVisible(&m_perfmeter);
|
||||
|
||||
addAndMakeVisible(&m_import_button);
|
||||
@ -45,7 +50,10 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
|
||||
m_info_label.setJustificationType(Justification::centredRight);
|
||||
|
||||
m_wavecomponent.GetFileCallback = [this]() { return processor.getAudioFile(); };
|
||||
addAndMakeVisible(&m_wavecomponent);
|
||||
//addAndMakeVisible(&m_wavecomponent);
|
||||
|
||||
|
||||
|
||||
const auto& pars = processor.getParameters();
|
||||
for (int i=0;i<pars.size();++i)
|
||||
{
|
||||
@ -86,7 +94,7 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
|
||||
processor.m_wave_view_range = r;
|
||||
};
|
||||
m_zs.setRange(processor.m_wave_view_range, true);
|
||||
setSize (1000, 30+(pars.size()/2)*25+200+15);
|
||||
|
||||
m_wavecomponent.TimeSelectionChangedCallback = [this](Range<double> range, int which)
|
||||
{
|
||||
*processor.getFloatParameter(cpi_soundstart) = range.getStart();
|
||||
@ -118,6 +126,11 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
|
||||
{
|
||||
processor.setDirty();
|
||||
};
|
||||
m_wavefilter_tab.addTab("Waveform", Colours::white, &m_wavecomponent, false);
|
||||
m_wavefilter_tab.addTab("Free filter", Colours::white, &m_free_filter_component, false);
|
||||
|
||||
addAndMakeVisible(&m_wavefilter_tab);
|
||||
setSize (1000, 30+(pars.size()/2)*25+200+15);
|
||||
startTimer(1, 100);
|
||||
startTimer(2, 1000);
|
||||
startTimer(3, 200);
|
||||
@ -240,9 +253,10 @@ void PaulstretchpluginAudioProcessorEditor::resized()
|
||||
yoffs += 25;
|
||||
int remain_h = getHeight() - 1 - yoffs -15;
|
||||
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_zs.setBounds(1, m_wavecomponent.getBottom(), getWidth() - 2, 16);
|
||||
//m_specvis.setBounds(1, yoffs, getWidth() - 2, getHeight() - 1 - yoffs);
|
||||
//m_wavecomponent.setBounds(1, m_spec_order_ed.getBottom()+1, getWidth()-2, remain_h/5*4);
|
||||
|
||||
m_wavefilter_tab.setBounds(1, m_spec_order_ed.getBottom()+1, getWidth()-2, remain_h/5*4);
|
||||
m_zs.setBounds(1, m_wavefilter_tab.getBottom(), getWidth() - 2, 16);
|
||||
}
|
||||
|
||||
void PaulstretchpluginAudioProcessorEditor::timerCallback(int id)
|
||||
|
@ -24,6 +24,7 @@ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include "PluginProcessor.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "envelope_component.h"
|
||||
|
||||
class zoom_scrollbar : public Component
|
||||
{
|
||||
@ -229,6 +230,8 @@ private:
|
||||
void showSettingsMenu();
|
||||
String m_last_err;
|
||||
zoom_scrollbar m_zs;
|
||||
EnvelopeComponent m_free_filter_component;
|
||||
TabbedComponent m_wavefilter_tab;
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor)
|
||||
};
|
||||
|
||||
|
@ -80,6 +80,9 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
|
||||
|
||||
g_activeprocessors.insert(this);
|
||||
m_playposinfo.timeInSeconds = 0.0;
|
||||
|
||||
m_free_filter_envelope = std::make_shared<breakpoint_envelope>();
|
||||
|
||||
m_recbuffer.setSize(2, 44100);
|
||||
m_recbuffer.clear();
|
||||
if (m_afm->getNumKnownFormats()==0)
|
||||
|
@ -22,6 +22,7 @@ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
#include "PS_Source/PaulStretchControl.h"
|
||||
#include "jcdp_envelope.h"
|
||||
|
||||
class MyThumbCache;
|
||||
|
||||
@ -169,6 +170,7 @@ public:
|
||||
bool m_show_technical_info = false;
|
||||
Range<double> m_wave_view_range;
|
||||
int m_prepare_count = 0;
|
||||
std::shared_ptr<breakpoint_envelope> m_free_filter_envelope;
|
||||
private:
|
||||
|
||||
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
Copyright (C) 2006-2011 Nasca Octavian Paul
|
||||
Author: Nasca Octavian Paul
|
||||
|
||||
Copyright (C) 2017 Xenakios
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of version 2 of the GNU General Public License
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License (version 2) for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License (version 2)
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "envelope_component.h"
|
||||
|
||||
EnvelopeComponent::EnvelopeComponent()
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
Copyright (C) 2006-2011 Nasca Octavian Paul
|
||||
Author: Nasca Octavian Paul
|
||||
|
||||
Copyright (C) 2017 Xenakios
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of version 2 of the GNU General Public License
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License (version 2) for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License (version 2)
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../JuceLibraryCode/JuceHeader.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
file="Source/envelope_component.cpp"/>
|
||||
<FILE id="apM6W6" name="envelope_component.h" compile="0" resource="0"
|
||||
file="Source/envelope_component.h"/>
|
||||
<FILE id="qfCc8R" name="jcdp_envelope.h" compile="0" resource="0" file="Source/jcdp_envelope.h"/>
|
||||
<FILE id="TDOHpE" name="resample.cpp" compile="1" resource="0" file="Source/WDL/resample.cpp"/>
|
||||
<GROUP id="{3B6D1AF9-E53E-2F78-24A5-D12A34009E6A}" name="PS_Source">
|
||||
<FILE id="bnWZA4" name="BinauralBeats.cpp" compile="1" resource="0"
|
||||
|
Loading…
Reference in New Issue
Block a user