Layout parameter components manually...Add parameter for input pass through. etc
This commit is contained in:
parent
0052c77bbb
commit
da6afcf05f
@ -94,30 +94,84 @@ void PaulstretchpluginAudioProcessorEditor::resized()
|
|||||||
m_settings_button.changeWidthToFitText();
|
m_settings_button.changeWidthToFitText();
|
||||||
m_info_label.setBounds(m_settings_button.getRight() + 1, m_settings_button.getY(),
|
m_info_label.setBounds(m_settings_button.getRight() + 1, m_settings_button.getY(),
|
||||||
getWidth()-m_settings_button.getRight()-1, 24);
|
getWidth()-m_settings_button.getRight()-1, 24);
|
||||||
std::array<int,30> indexes;
|
int w = getWidth();
|
||||||
indexes[cpi_main_volume] = 0; indexes[cpi_pause_enabled] = 1;
|
int xoffs = 1;
|
||||||
indexes[cpi_capture_enabled] = 2; indexes[cpi_max_capture_len] = 3;
|
int yoffs = 30;
|
||||||
indexes[cpi_freeze] = 4; indexes[cpi_num_outchans] = 5;
|
int div = w / 4;
|
||||||
indexes[cpi_fftsize] = 6; indexes[cpi_stretchamount] = 7;
|
m_parcomps[cpi_capture_enabled]->setBounds(xoffs, yoffs, div-1, 24);
|
||||||
indexes[cpi_pitchshift] = 8; indexes[cpi_frequencyshift] = 9;
|
xoffs += div;
|
||||||
indexes[cpi_octavesm2] = 10; indexes[cpi_octavesm1] = 11;
|
m_parcomps[cpi_passthrough]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
indexes[cpi_octaves0] = 12; indexes[cpi_octaves1] = 13;
|
xoffs += div;
|
||||||
indexes[cpi_octaves15] = 14; indexes[cpi_octaves2] = 15;
|
m_parcomps[cpi_pause_enabled]->setBounds(xoffs, yoffs, div-1, 24);
|
||||||
indexes[cpi_numharmonics] = 16; indexes[cpi_harmonicsfreq] = 17;
|
xoffs += div;
|
||||||
indexes[cpi_harmonicsbw] = 18; indexes[cpi_harmonicsgauss] = 19;
|
m_parcomps[cpi_freeze]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
indexes[cpi_spreadamount] = 20; indexes[cpi_compress] = 21;
|
xoffs = 1;
|
||||||
indexes[cpi_tonalvsnoisebw] = 22; indexes[cpi_tonalvsnoisepreserve] = 23;
|
yoffs += 25;
|
||||||
indexes[cpi_soundstart] = 24; indexes[cpi_soundend] = 25;
|
div = w / 2;
|
||||||
indexes[cpi_filter_low] = 26; indexes[cpi_filter_high] = 27;
|
m_parcomps[cpi_main_volume]->setBounds(xoffs, yoffs, div-1, 24);
|
||||||
indexes[cpi_loopxfadelen] = 28; indexes[cpi_onsetdetection] = 29;
|
xoffs += div;
|
||||||
for (int i = 0; i < indexes.size(); ++i)
|
m_parcomps[cpi_num_outchans]->setBounds(xoffs, yoffs, div-1, 24);
|
||||||
{
|
xoffs = 1;
|
||||||
int tempfoo = indexes[i];
|
yoffs += 25;
|
||||||
int gridx = tempfoo % 2;
|
m_parcomps[cpi_fftsize]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
int gridy = tempfoo / 2;
|
xoffs += div;
|
||||||
m_parcomps[i]->setBounds(1+gridx*(getWidth()/2), 30 + gridy * 25, getWidth()/2-2, 24);
|
m_parcomps[cpi_stretchamount]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
}
|
xoffs = 1;
|
||||||
int yoffs = m_parcomps[cpi_loopxfadelen]->getBottom() + 1;
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_pitchshift]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_frequencyshift]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_octavesm2]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_octavesm1]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_octaves0]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_octaves1]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_octaves15]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_octaves2]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_numharmonics]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_harmonicsfreq]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_harmonicsbw]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_harmonicsgauss]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_spreadamount]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_compress]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_tonalvsnoisebw]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_tonalvsnoisepreserve]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_soundstart]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_soundend]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_filter_low]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_filter_high]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs = 1;
|
||||||
|
yoffs += 25;
|
||||||
|
m_parcomps[cpi_loopxfadelen]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
xoffs += div;
|
||||||
|
m_parcomps[cpi_onsetdetection]->setBounds(xoffs, yoffs, div - 1, 24);
|
||||||
|
yoffs += 25;
|
||||||
int remain_h = getHeight() - 1 - yoffs;
|
int remain_h = getHeight() - 1 - yoffs;
|
||||||
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);
|
||||||
|
@ -317,6 +317,19 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ParamLayoutInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ParamLayoutInfo() {}
|
||||||
|
ParamLayoutInfo(int c, int x, int y, int w, int h) :
|
||||||
|
m_comp(c), m_col(x), m_row(y), m_w(w), m_h(h) {}
|
||||||
|
int m_comp = 0;
|
||||||
|
int m_col = 0;
|
||||||
|
int m_row = 0;
|
||||||
|
int m_w = 1;
|
||||||
|
int m_h = 1;
|
||||||
|
};
|
||||||
|
|
||||||
class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor,
|
class PaulstretchpluginAudioProcessorEditor : public AudioProcessorEditor,
|
||||||
public MultiTimer
|
public MultiTimer
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
|
|||||||
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
|
||||||
setPreBufferAmount(2);
|
setPreBufferAmount(2);
|
||||||
startTimer(1, 50);
|
startTimer(1, 50);
|
||||||
}
|
}
|
||||||
@ -176,6 +177,13 @@ void PaulstretchpluginAudioProcessor::setPreBufferAmount(int x)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PaulstretchpluginAudioProcessor::getPreBufferAmount()
|
||||||
|
{
|
||||||
|
if (m_use_backgroundbuffering == false)
|
||||||
|
return -1;
|
||||||
|
return m_prebuffer_amount;
|
||||||
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const String PaulstretchpluginAudioProcessor::getName() const
|
const String PaulstretchpluginAudioProcessor::getName() const
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,7 @@ const int cpi_capture_enabled = 26;
|
|||||||
const int cpi_num_outchans = 27;
|
const int cpi_num_outchans = 27;
|
||||||
const int cpi_pause_enabled = 28;
|
const int cpi_pause_enabled = 28;
|
||||||
const int cpi_max_capture_len = 29;
|
const int cpi_max_capture_len = 29;
|
||||||
|
const int cpi_passthrough = 30;
|
||||||
|
|
||||||
class MyPropertiesFile
|
class MyPropertiesFile
|
||||||
{
|
{
|
||||||
@ -141,12 +142,7 @@ public:
|
|||||||
bool m_use_backgroundbuffering = true;
|
bool m_use_backgroundbuffering = true;
|
||||||
bool m_pass_input_through = false;
|
bool m_pass_input_through = false;
|
||||||
void setPreBufferAmount(int x);
|
void setPreBufferAmount(int x);
|
||||||
int getPreBufferAmount()
|
int getPreBufferAmount();
|
||||||
{
|
|
||||||
if (m_use_backgroundbuffering==false)
|
|
||||||
return -1;
|
|
||||||
return m_prebuffer_amount;
|
|
||||||
}
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,10 +25,12 @@ History :
|
|||||||
-File import dialog allows importing file formats supported by JUCE, not just .wav
|
-File import dialog allows importing file formats supported by JUCE, not just .wav
|
||||||
12-17-2017 1.0.0 preview 2b
|
12-17-2017 1.0.0 preview 2b
|
||||||
-Fix buffer channel count issue, seems to make AU validation pass consistently
|
-Fix buffer channel count issue, seems to make AU validation pass consistently
|
||||||
12-20-2017 1.0.0 preview 3
|
12-22-2017 1.0.0 preview 3
|
||||||
-Added parameter to set audio input capture buffer length (up to 120 seconds)
|
-Added parameter to set audio input capture buffer length (up to 120 seconds)
|
||||||
-Add button to show settings menu
|
-Add button to show settings menu
|
||||||
-Fix bug when offline rendering in host
|
-Fix bug when offline rendering in host
|
||||||
-Allow setting background prebuffering amount in settings, including none. (None is mostly useful in case the plugin doesn't detect the host is offline rendering. For real time playback none is likely only going to work with small FFT sizes.)
|
-Allow setting background prebuffering amount in settings, including none.
|
||||||
|
(None is mostly useful in case the plugin doesn't detect the host is offline rendering.
|
||||||
|
For real time playback none is likely only going to work with small FFT sizes.)
|
||||||
-Slightly better GUI layout but still just 2 columns of parameters
|
-Slightly better GUI layout but still just 2 columns of parameters
|
||||||
-Remember last file import folder
|
-Remember last file import folder
|
||||||
|
Loading…
Reference in New Issue
Block a user