Initial work to move the free filter parameter components to the free gilter tab page
This commit is contained in:
parent
4f203de39a
commit
2d6dce9572
@ -30,13 +30,13 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
|
|||||||
m_free_filter_component(p.getStretchSource()->getMutex())
|
m_free_filter_component(p.getStretchSource()->getMutex())
|
||||||
{
|
{
|
||||||
m_wave_container = new Component;
|
m_wave_container = new Component;
|
||||||
m_free_filter_component.set_envelope(processor.m_free_filter_envelope);
|
m_free_filter_component.getEnvelopeComponent()->set_envelope(processor.m_free_filter_envelope);
|
||||||
m_free_filter_component.TimeFromNormalized = [this](double x)
|
m_free_filter_component.getEnvelopeComponent()->TimeFromNormalized = [this](double x)
|
||||||
{
|
{
|
||||||
//return jmap<double>(pow(x, 3.0), 0.0, 1.0, 30.0, processor.getSampleRateChecked()/2.0);
|
//return jmap<double>(pow(x, 3.0), 0.0, 1.0, 30.0, processor.getSampleRateChecked()/2.0);
|
||||||
return 30.0*pow(1.05946309436, x*115.0);
|
return 30.0*pow(1.05946309436, x*115.0);
|
||||||
};
|
};
|
||||||
m_free_filter_component.ValueFromNormalized = [this](double x)
|
m_free_filter_component.getEnvelopeComponent()->ValueFromNormalized = [this](double x)
|
||||||
{
|
{
|
||||||
return jmap<double>(x, 0.0, 1.0, -48.0, 12.0);
|
return jmap<double>(x, 0.0, 1.0, -48.0, 12.0);
|
||||||
};
|
};
|
||||||
@ -1511,3 +1511,13 @@ void RatioMixerEditor::paint(Graphics & g)
|
|||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
g.drawText(String(i + 1), slidw / 2 + slidw * i - 8, 1, 15, 15, Justification::centred);
|
g.drawText(String(i + 1), slidw / 2 + slidw * i - 8, 1, 15, 15, Justification::centred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FreeFilterComponent::FreeFilterComponent(CriticalSection* cs) : m_env(cs), m_cs(cs)
|
||||||
|
{
|
||||||
|
addAndMakeVisible(m_env);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeFilterComponent::resized()
|
||||||
|
{
|
||||||
|
m_env.setBounds(200, 0, getWidth() - 200, getHeight());
|
||||||
|
}
|
||||||
|
@ -230,6 +230,18 @@ private:
|
|||||||
uptrvec<Slider> m_ratio_level_sliders;
|
uptrvec<Slider> m_ratio_level_sliders;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class FreeFilterComponent : public Component
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FreeFilterComponent(CriticalSection* cs);
|
||||||
|
void resized() override;
|
||||||
|
EnvelopeComponent* getEnvelopeComponent() { return &m_env; }
|
||||||
|
private:
|
||||||
|
EnvelopeComponent m_env;
|
||||||
|
uptrvec<ParameterComponent> m_parcomps;
|
||||||
|
CriticalSection* m_cs = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor,
|
class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor,
|
||||||
public MultiTimer, public FileDragAndDropTarget, public DragAndDropContainer
|
public MultiTimer, public FileDragAndDropTarget, public DragAndDropContainer
|
||||||
{
|
{
|
||||||
@ -263,7 +275,7 @@ private:
|
|||||||
String m_last_err;
|
String m_last_err;
|
||||||
zoom_scrollbar m_zs;
|
zoom_scrollbar m_zs;
|
||||||
RatioMixerEditor m_ratiomixeditor{ 8 };
|
RatioMixerEditor m_ratiomixeditor{ 8 };
|
||||||
EnvelopeComponent m_free_filter_component;
|
FreeFilterComponent m_free_filter_component;
|
||||||
TabbedComponent m_wavefilter_tab;
|
TabbedComponent m_wavefilter_tab;
|
||||||
Component* m_wave_container=nullptr;
|
Component* m_wave_container=nullptr;
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor)
|
||||||
|
Loading…
Reference in New Issue
Block a user