mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 04:10:46 +02:00
add juce to gitignore
This commit is contained in:
parent
fd82954072
commit
8ed279e84c
5 changed files with 107 additions and 17 deletions
|
|
@ -576,10 +576,8 @@ MonostepAudioProcessorEditor::MonostepAudioProcessorEditor (MonostepAudioProcess
|
|||
accentKnob ("Accent"),
|
||||
rateBar (processor.getAPVTS(), "seqRate", { "1/4", "1/8", "1/8T", "1/16", "1/32" }),
|
||||
octaveBar (processor.getAPVTS(), "seqOctave", { "-2", "-1", "0", "+1", "+2" }),
|
||||
zoomBar ({ "100%", "125%", "150%", "175%", "200%" }, [] (int) {}),
|
||||
wave1Bar (processor.getAPVTS(), "osc1Wave", { "Sin", "Tri", "Saw", "Sq" }),
|
||||
wave2Bar (processor.getAPVTS(), "osc2Wave", { "Sin", "Tri", "Saw", "Sq" }),
|
||||
matrix (processor),
|
||||
zoomBar ({ "100%", "125%", "150%", "175%", "200%" }, [] (int) {}),
|
||||
matrix (processor),
|
||||
stepPanel (processor)
|
||||
{
|
||||
setLookAndFeel (lnf.get());
|
||||
|
|
@ -593,8 +591,37 @@ MonostepAudioProcessorEditor::MonostepAudioProcessorEditor (MonostepAudioProcess
|
|||
content.addAndMakeVisible (rateBar);
|
||||
content.addAndMakeVisible (octaveBar);
|
||||
content.addAndMakeVisible (zoomBar);
|
||||
content.addAndMakeVisible (wave1Bar);
|
||||
content.addAndMakeVisible (wave2Bar);
|
||||
|
||||
static const juce::StringArray waveformChoices =
|
||||
{
|
||||
"Sine", "Triangle", "Saw", "Square",
|
||||
"Pulse", "Noise", "Sub", "Pluck",
|
||||
"Super", "S&H", "Formant", "PWM"
|
||||
};
|
||||
|
||||
auto setupWaveCombo = [&apvts, &waveformChoices] (juce::ComboBox& combo,
|
||||
const juce::String& paramId)
|
||||
{
|
||||
combo.setColour (juce::ComboBox::textColourId, colours::text);
|
||||
combo.setColour (juce::ComboBox::outlineColourId, colours::gridLight);
|
||||
combo.setColour (juce::ComboBox::backgroundColourId, colours::grid);
|
||||
combo.setColour (juce::ComboBox::arrowColourId, colours::accent);
|
||||
combo.setFont (font (11.0f));
|
||||
|
||||
for (int i = 0; i < waveformChoices.size(); ++i)
|
||||
combo.addItem (waveformChoices[i], i + 1);
|
||||
|
||||
combo.selectId (static_cast<int> (apvts.getRawParameterValue (paramId)->load()) + 1);
|
||||
};
|
||||
|
||||
setupWaveCombo (wave1Box, "osc1Wave");
|
||||
setupWaveCombo (wave2Box, "osc2Wave");
|
||||
|
||||
wave1Attachment = std::make_unique<juce::AudioProcessorValueTreeState::ComboBoxAttachment> (apvts, "osc1Wave", wave1Box);
|
||||
wave2Attachment = std::make_unique<juce::AudioProcessorValueTreeState::ComboBoxAttachment> (apvts, "osc2Wave", wave2Box);
|
||||
|
||||
content.addAndMakeVisible (wave1Box);
|
||||
content.addAndMakeVisible (wave2Box);
|
||||
|
||||
static constexpr float zoomValues[] = { 1.0f, 1.25f, 1.5f, 1.75f, 2.0f };
|
||||
zoomBar.setManualHandler ([this] (int idx)
|
||||
|
|
@ -734,8 +761,8 @@ void MonostepAudioProcessorEditor::paintContent (juce::Graphics& g)
|
|||
drawCaption (rateBar, "RATE");
|
||||
drawCaption (octaveBar, "OCTAVE");
|
||||
drawCaption (zoomBar, "ZOOM");
|
||||
drawCaption (wave1Bar, "OSC 1");
|
||||
drawCaption (wave2Bar, "OSC 2");
|
||||
drawCaption (wave1Box, "OSC 1");
|
||||
drawCaption (wave2Box, "OSC 2");
|
||||
|
||||
const int footY = baseHeight - 20;
|
||||
g.setColour (colours::grid);
|
||||
|
|
@ -799,8 +826,8 @@ void MonostepAudioProcessorEditor::resized()
|
|||
int x = 16;
|
||||
const int barW = 112;
|
||||
|
||||
wave1Bar.setBounds (x, bottomY + 30, barW, 24); x += barW + 8;
|
||||
wave2Bar.setBounds (x, bottomY + 30, barW, 24); x += barW + 16;
|
||||
wave1Box.setBounds (x, bottomY + 30, barW, 24); x += barW + 8;
|
||||
wave2Box.setBounds (x, bottomY + 30, barW, 24); x += barW + 16;
|
||||
|
||||
const int knobW = 56;
|
||||
const int knobGap = 60;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue