Parameter layout tweaks etc

This commit is contained in:
xenakios 2018-02-13 15:47:17 +02:00
parent 103a085304
commit 53029555d0
2 changed files with 9 additions and 3 deletions

View File

@ -139,6 +139,9 @@ void PaulstretchpluginAudioProcessorEditor::resized()
int xoffs = 1; int xoffs = 1;
int yoffs = 30; int yoffs = 30;
int div = w / 4; int div = w / 4;
//std::vector<std::vector<int>> layout;
//layout.emplace_back(cpi_capture_enabled, cpi_passthrough, cpi_pause_enabled, cpi_freeze);
//layout.emplace_back(cpi_main_volume, cpi_num_inchans, cpi_num_outchans);
m_parcomps[cpi_capture_enabled]->setBounds(xoffs, yoffs, div-1, 24); m_parcomps[cpi_capture_enabled]->setBounds(xoffs, yoffs, div-1, 24);
//xoffs += div; //xoffs += div;
//m_parcomps[cpi_max_capture_len]->setBounds(xoffs, yoffs, div - 1, 24); //m_parcomps[cpi_max_capture_len]->setBounds(xoffs, yoffs, div - 1, 24);
@ -898,7 +901,10 @@ void ParameterComponent::resized()
{ {
if (m_slider) if (m_slider)
{ {
m_label.setBounds(0, 0, 200, 24); int labw = 200;
if (getWidth() < 400)
labw = 100;
m_label.setBounds(0, 0, labw, 24);
m_slider->setBounds(m_label.getRight() + 1, 0, getWidth() - 2 - m_label.getWidth(), 24); m_slider->setBounds(m_label.getRight() + 1, 0, getWidth() - 2 - m_label.getWidth(), 24);
} }
if (m_togglebut) if (m_togglebut)

View File

@ -134,13 +134,13 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
filt_convertFrom0To1Func,filt_convertTo0To1Func), 20000.0f));; // 24 filt_convertFrom0To1Func,filt_convertTo0To1Func), 20000.0f));; // 24
addParameter(make_floatpar("onsetdetect_0", "Onset detection", 0.0f, 1.0f, 0.0f, 0.01, 1.0)); // 25 addParameter(make_floatpar("onsetdetect_0", "Onset detection", 0.0f, 1.0f, 0.0f, 0.01, 1.0)); // 25
addParameter(new AudioParameterBool("capture_enabled0", "Capture", false)); // 26 addParameter(new AudioParameterBool("capture_enabled0", "Capture", false)); // 26
m_outchansparam = new AudioParameterInt("numoutchans0", "Num output channels", 2, 8, 2); // 27 m_outchansparam = new AudioParameterInt("numoutchans0", "Num outs", 2, 8, 2); // 27
addParameter(m_outchansparam); // 27 addParameter(m_outchansparam); // 27
addParameter(new AudioParameterBool("pause_enabled0", "Pause", false)); // 28 addParameter(new AudioParameterBool("pause_enabled0", "Pause", false)); // 28
addParameter(new AudioParameterFloat("maxcapturelen_0", "Max capture length", 1.0f, 120.0f, 10.0f)); // 29 addParameter(new AudioParameterFloat("maxcapturelen_0", "Max capture length", 1.0f, 120.0f, 10.0f)); // 29
addParameter(new AudioParameterBool("passthrough0", "Pass input through", false)); // 30 addParameter(new AudioParameterBool("passthrough0", "Pass input through", false)); // 30
addParameter(new AudioParameterBool("markdirty0", "Internal (don't use)", false)); // 31 addParameter(new AudioParameterBool("markdirty0", "Internal (don't use)", false)); // 31
m_inchansparam = new AudioParameterInt("numinchans0", "Num input channels", 2, 8, 2); // 32 m_inchansparam = new AudioParameterInt("numinchans0", "Num ins", 2, 8, 2); // 32
addParameter(m_inchansparam); // 32 addParameter(m_inchansparam); // 32
auto& pars = getParameters(); auto& pars = getParameters();
for (const auto& p : pars) for (const auto& p : pars)