commit 866fe953a5d4d25d8b4300922a087aba48a69f95
parent bce89a9e986a4242e53dd8656e39059ad88b6dee
Author: 790 <790@users.noreply.github.com>
Date: Thu, 6 Jan 2022 12:32:00 +0000
tabs to spaces
Diffstat:
3 files changed, 230 insertions(+), 230 deletions(-)
diff --git a/source/jucePlugin/ui/VirusEditor.cpp b/source/jucePlugin/ui/VirusEditor.cpp
@@ -14,7 +14,7 @@ constexpr auto kPanelWidth = 1377;
constexpr auto kPanelHeight = 800;
VirusEditor::VirusEditor(VirusParameterBinding &_parameterBinding, Virus::Controller& _controller) :
- m_parameterBinding(_parameterBinding), m_controller(_controller)
+ m_parameterBinding(_parameterBinding), m_controller(_controller)
{
setLookAndFeel(&m_lookAndFeel);
@@ -38,75 +38,75 @@ VirusEditor::VirusEditor(VirusParameterBinding &_parameterBinding, Virus::Contro
m_lfoEditor->setVisible(m_mainButtons.m_lfoMatrix.getToggleState());
m_oscEditor->setVisible(m_mainButtons.m_oscFilter.getToggleState());
};
- m_oscEditor->setVisible(true);
- m_mainButtons.m_oscFilter.setToggleState(true, NotificationType::dontSendNotification);
+ m_oscEditor->setVisible(true);
+ m_mainButtons.m_oscFilter.setToggleState(true, NotificationType::dontSendNotification);
addAndMakeVisible(m_presetButtons);
- m_presetButtons.m_load.onClick = [this]() { loadFile(); };
- for (auto pt = 0; pt < 16; pt++)
- {
- m_partLabels[pt].setBounds(34, 161 + pt * (36), 39, 36);
- m_partLabels[pt].setText(juce::String(pt + 1), juce::dontSendNotification);
- m_partLabels[pt].setColour(0, juce::Colours::white);
- m_partLabels[pt].setColour(1, juce::Colour(45, 24, 24));
- m_partLabels[pt].setJustificationType(Justification::centredLeft);
- addAndMakeVisible(m_partLabels[pt]);
-
- m_partSelect[pt].setBounds(34, 161 + pt*(36), 39, 36);
- m_partSelect[pt].setButtonText(juce::String(pt));
- m_partSelect[pt].setRadioGroupId(kPartGroupId);
- m_partSelect[pt].setClickingTogglesState(true);
- m_partSelect[pt].onClick = [this, pt]() {
- this->changePart(pt);
- };
- addAndMakeVisible(m_partSelect[pt]);
+ m_presetButtons.m_load.onClick = [this]() { loadFile(); };
+ for (auto pt = 0; pt < 16; pt++)
+ {
+ m_partLabels[pt].setBounds(34, 161 + pt * (36), 39, 36);
+ m_partLabels[pt].setText(juce::String(pt + 1), juce::dontSendNotification);
+ m_partLabels[pt].setColour(0, juce::Colours::white);
+ m_partLabels[pt].setColour(1, juce::Colour(45, 24, 24));
+ m_partLabels[pt].setJustificationType(Justification::centredLeft);
+ addAndMakeVisible(m_partLabels[pt]);
+
+ m_partSelect[pt].setBounds(34, 161 + pt*(36), 39, 36);
+ m_partSelect[pt].setButtonText(juce::String(pt));
+ m_partSelect[pt].setRadioGroupId(kPartGroupId);
+ m_partSelect[pt].setClickingTogglesState(true);
+ m_partSelect[pt].onClick = [this, pt]() {
+ this->changePart(pt);
+ };
+ addAndMakeVisible(m_partSelect[pt]);
m_presetNames[pt].setBounds(80, 172 + pt * (36), 136, 16);
- m_presetNames[pt].setButtonText(_controller.getCurrentPartPresetName(pt));
- m_presetNames[pt].setColour(0, juce::Colours::white);
+ m_presetNames[pt].setButtonText(_controller.getCurrentPartPresetName(pt));
+ m_presetNames[pt].setColour(0, juce::Colours::white);
m_presetNames[pt].onClick = [this, pt]() {
- juce::PopupMenu selector;
-
- for (uint8_t b = 0; b < m_controller.getBankCount(); ++b)
- {
- const auto bank = virusLib::fromArrayIndex(b);
- auto presetNames = m_controller.getSinglePresetNames(bank);
- juce::PopupMenu p;
- for (uint8_t j = 0; j < 128; j++)
- {
- const auto presetName = presetNames[j];
- p.addItem(presetNames[j], [this, bank, j, pt, presetName] {
- m_controller.setCurrentPartPreset(pt, bank, j);
- m_presetNames[pt].setButtonText(presetName);
- });
- }
- std::stringstream bankName;
- bankName << "Bank " << static_cast<char>('A' + b);
- selector.addSubMenu(std::string(bankName.str()), p);
- }
- selector.showMenu(juce::PopupMenu::Options());
- };
- addAndMakeVisible(m_presetNames[pt]);
-
- m_prevPatch[pt].setBounds(228, 173 + 36*pt, 16, 12);
- m_nextPatch[pt].setBounds(247, 173 + 36*pt, 16, 12);
- m_prevPatch[pt].setButtonText("<");
- m_nextPatch[pt].setButtonText(">");
- m_prevPatch[pt].onClick = [this, pt]() {
- m_controller.setCurrentPartPreset(
- pt, m_controller.getCurrentPartBank(pt),
- std::max(0, m_controller.getCurrentPartProgram(pt) - 1));
- };
- m_nextPatch[pt].onClick = [this, pt]() {
- m_controller.setCurrentPartPreset(
- pt, m_controller.getCurrentPartBank(pt),
- std::min(127, m_controller.getCurrentPartProgram(pt) + 1));
- };
- addAndMakeVisible(m_prevPatch[pt]);
- addAndMakeVisible(m_nextPatch[pt]);
- }
- m_partSelect[0].setToggleState(true, NotificationType::sendNotification);
- startTimerHz(5);
+ juce::PopupMenu selector;
+
+ for (uint8_t b = 0; b < m_controller.getBankCount(); ++b)
+ {
+ const auto bank = virusLib::fromArrayIndex(b);
+ auto presetNames = m_controller.getSinglePresetNames(bank);
+ juce::PopupMenu p;
+ for (uint8_t j = 0; j < 128; j++)
+ {
+ const auto presetName = presetNames[j];
+ p.addItem(presetNames[j], [this, bank, j, pt, presetName] {
+ m_controller.setCurrentPartPreset(pt, bank, j);
+ m_presetNames[pt].setButtonText(presetName);
+ });
+ }
+ std::stringstream bankName;
+ bankName << "Bank " << static_cast<char>('A' + b);
+ selector.addSubMenu(std::string(bankName.str()), p);
+ }
+ selector.showMenu(juce::PopupMenu::Options());
+ };
+ addAndMakeVisible(m_presetNames[pt]);
+
+ m_prevPatch[pt].setBounds(228, 173 + 36*pt, 16, 12);
+ m_nextPatch[pt].setBounds(247, 173 + 36*pt, 16, 12);
+ m_prevPatch[pt].setButtonText("<");
+ m_nextPatch[pt].setButtonText(">");
+ m_prevPatch[pt].onClick = [this, pt]() {
+ m_controller.setCurrentPartPreset(
+ pt, m_controller.getCurrentPartBank(pt),
+ std::max(0, m_controller.getCurrentPartProgram(pt) - 1));
+ };
+ m_nextPatch[pt].onClick = [this, pt]() {
+ m_controller.setCurrentPartPreset(
+ pt, m_controller.getCurrentPartBank(pt),
+ std::min(127, m_controller.getCurrentPartProgram(pt) + 1));
+ };
+ addAndMakeVisible(m_prevPatch[pt]);
+ addAndMakeVisible(m_nextPatch[pt]);
+ }
+ m_partSelect[0].setToggleState(true, NotificationType::sendNotification);
+ startTimerHz(5);
setSize (kPanelWidth, kPanelHeight);
}
@@ -114,24 +114,24 @@ VirusEditor::~VirusEditor() { setLookAndFeel(nullptr); }
void VirusEditor::timerCallback()
{
- // ugly (polling!) way for refreshing presets names as this is temporary ui
- const auto multiMode = m_controller.isMultiMode();
- for (auto pt = 0; pt < 16; pt++)
- {
- bool singlePartOrInMulti = pt == 0 || multiMode;
- m_presetNames[pt].setVisible(singlePartOrInMulti);
- m_prevPatch[pt].setVisible(singlePartOrInMulti);
- m_nextPatch[pt].setVisible(singlePartOrInMulti);
- if (singlePartOrInMulti)
- m_presetNames[pt].setButtonText(m_controller.getCurrentPartPresetName(pt));
- }
+ // ugly (polling!) way for refreshing presets names as this is temporary ui
+ const auto multiMode = m_controller.isMultiMode();
+ for (auto pt = 0; pt < 16; pt++)
+ {
+ bool singlePartOrInMulti = pt == 0 || multiMode;
+ m_presetNames[pt].setVisible(singlePartOrInMulti);
+ m_prevPatch[pt].setVisible(singlePartOrInMulti);
+ m_nextPatch[pt].setVisible(singlePartOrInMulti);
+ if (singlePartOrInMulti)
+ m_presetNames[pt].setButtonText(m_controller.getCurrentPartPresetName(pt));
+ }
}
void VirusEditor::updatePartsPresetNames()
{
- for (auto i = 0; i < 16; i++)
- {
- m_presetNames[i].setButtonText(m_controller.getCurrentPartPresetName(i));
- }
+ for (auto i = 0; i < 16; i++)
+ {
+ m_presetNames[i].setButtonText(m_controller.getCurrentPartPresetName(i));
+ }
}
void VirusEditor::applyToSections(std::function<void(Component *)> action)
{
@@ -153,24 +153,24 @@ void VirusEditor::resized()
void VirusEditor::changePart(uint8_t _part) {
m_parameterBinding.m_part = _part;
- removeChildComponent(m_oscEditor.get());
+ removeChildComponent(m_oscEditor.get());
m_oscEditor = std::make_unique<OscEditor>(m_parameterBinding);
- addChildComponent(m_oscEditor.get());
+ addChildComponent(m_oscEditor.get());
- removeChildComponent(m_lfoEditor.get());
- m_lfoEditor = std::make_unique<LfoEditor>(m_parameterBinding);
- addChildComponent(m_lfoEditor.get());
+ removeChildComponent(m_lfoEditor.get());
+ m_lfoEditor = std::make_unique<LfoEditor>(m_parameterBinding);
+ addChildComponent(m_lfoEditor.get());
removeChildComponent(m_fxEditor.get());
- m_fxEditor = std::make_unique<FxEditor>(m_parameterBinding);
- addChildComponent(m_fxEditor.get());
+ m_fxEditor = std::make_unique<FxEditor>(m_parameterBinding);
+ addChildComponent(m_fxEditor.get());
removeChildComponent(m_arpEditor.get());
- m_arpEditor = std::make_unique<ArpEditor>(m_parameterBinding);
- addChildComponent(m_arpEditor.get());
+ m_arpEditor = std::make_unique<ArpEditor>(m_parameterBinding);
+ addChildComponent(m_arpEditor.get());
- m_mainButtons.updateSection();
- resized();
+ m_mainButtons.updateSection();
+ resized();
}
VirusEditor::MainButtons::MainButtons()
@@ -221,79 +221,79 @@ VirusEditor::PartButtons::PartButtons()
void VirusEditor::loadFile()
{
- juce::FileChooser chooser(
- "Choose syx/midi banks to import",
- m_previousPath.isEmpty()
- ? juce::File::getSpecialLocation(juce::File::currentApplicationFile).getParentDirectory()
- : m_previousPath,
- "*.syx,*.mid,*.midi", true);
-
- if (!chooser.browseForFileToOpen())
- return;
- bool sentData = false;
- const auto result = chooser.getResult();
- m_previousPath = result.getParentDirectory().getFullPathName();
- const auto ext = result.getFileExtension().toLowerCase();
- if (ext == ".syx")
- {
- juce::MemoryBlock data;
- result.loadFileAsData(data);
- if (data.getSize() % 267 != 0)
- {
- return;
- }
- for (auto it = data.begin(); it != data.end(); it += 267)
- {
- if ((it + 267) < data.end())
- {
- m_controller.sendSysEx(Virus::SysEx(it, it + 267));
- sentData = true;
- }
- }
- }
- else if (ext == ".mid" || ext == ".midi")
- {
- juce::MemoryBlock data;
- if (!result.loadFileAsData(data))
- {
- return;
- }
- const uint8_t *ptr = (uint8_t *)data.getData();
- const auto end = ptr + data.getSize();
-
- for (auto it = ptr; it < end; it += 1)
- {
- if ((uint8_t)*it == (uint8_t)0xf0 && (it + 267) < end)
- {
- if ((uint8_t) * (it + 1) == (uint8_t)0x00)
- {
- auto syx = Virus::SysEx(it, it + 267);
- syx[7] = 0x01; // force to bank a
- syx[266] = 0xf7;
-
- m_controller.sendSysEx(syx);
-
- it += 266;
- }
- else // some midi files have two bytes after the 0xf0
- {
- auto syx = Virus::SysEx();
- syx.push_back(0xf0);
- for (auto i = it + 3; i < it + 3 + 266; i++)
- {
- syx.push_back((uint8_t)*i);
- }
- syx[7] = 0x01; // force to bank a
- syx[266] = 0xf7;
- m_controller.sendSysEx(syx);
- it += 266;
- }
-
- sentData = true;
- }
- }
- }
-
- if (sentData)
- m_controller.onStateLoaded();
+ juce::FileChooser chooser(
+ "Choose syx/midi banks to import",
+ m_previousPath.isEmpty()
+ ? juce::File::getSpecialLocation(juce::File::currentApplicationFile).getParentDirectory()
+ : m_previousPath,
+ "*.syx,*.mid,*.midi", true);
+
+ if (!chooser.browseForFileToOpen())
+ return;
+ bool sentData = false;
+ const auto result = chooser.getResult();
+ m_previousPath = result.getParentDirectory().getFullPathName();
+ const auto ext = result.getFileExtension().toLowerCase();
+ if (ext == ".syx")
+ {
+ juce::MemoryBlock data;
+ result.loadFileAsData(data);
+ if (data.getSize() % 267 != 0)
+ {
+ return;
+ }
+ for (auto it = data.begin(); it != data.end(); it += 267)
+ {
+ if ((it + 267) < data.end())
+ {
+ m_controller.sendSysEx(Virus::SysEx(it, it + 267));
+ sentData = true;
+ }
+ }
+ }
+ else if (ext == ".mid" || ext == ".midi")
+ {
+ juce::MemoryBlock data;
+ if (!result.loadFileAsData(data))
+ {
+ return;
+ }
+ const uint8_t *ptr = (uint8_t *)data.getData();
+ const auto end = ptr + data.getSize();
+
+ for (auto it = ptr; it < end; it += 1)
+ {
+ if ((uint8_t)*it == (uint8_t)0xf0 && (it + 267) < end)
+ {
+ if ((uint8_t) * (it + 1) == (uint8_t)0x00)
+ {
+ auto syx = Virus::SysEx(it, it + 267);
+ syx[7] = 0x01; // force to bank a
+ syx[266] = 0xf7;
+
+ m_controller.sendSysEx(syx);
+
+ it += 266;
+ }
+ else // some midi files have two bytes after the 0xf0
+ {
+ auto syx = Virus::SysEx();
+ syx.push_back(0xf0);
+ for (auto i = it + 3; i < it + 3 + 266; i++)
+ {
+ syx.push_back((uint8_t)*i);
+ }
+ syx[7] = 0x01; // force to bank a
+ syx[266] = 0xf7;
+ m_controller.sendSysEx(syx);
+ it += 266;
+ }
+
+ sentData = true;
+ }
+ }
+ }
+
+ if (sentData)
+ m_controller.onStateLoaded();
}
diff --git a/source/jucePlugin/ui/VirusEditor.h b/source/jucePlugin/ui/VirusEditor.h
@@ -17,19 +17,19 @@ public:
VirusEditor(VirusParameterBinding& _parameterBinding, Virus::Controller& _controller);
~VirusEditor() override;
void resized() override;
- void changePart(uint8_t _part);
- void updatePartsPresetNames();
- void loadFile();
+ void changePart(uint8_t _part);
+ void updatePartsPresetNames();
+ void loadFile();
private:
- void timerCallback() override;
+ void timerCallback() override;
- Buttons::PartSelectButton m_partSelect[16];
- juce::Label m_partLabels[16];
- juce::TextButton m_presetNames[16];
- juce::TextButton m_nextPatch[16];
- juce::TextButton m_prevPatch[16];
+ Buttons::PartSelectButton m_partSelect[16];
+ juce::Label m_partLabels[16];
+ juce::TextButton m_presetNames[16];
+ juce::TextButton m_nextPatch[16];
+ juce::TextButton m_prevPatch[16];
- static constexpr auto kPartGroupId = 0x3FBBA;
+ static constexpr auto kPartGroupId = 0x3FBBA;
struct MainButtons : juce::Component, juce::Value::Listener
{
MainButtons();
@@ -51,12 +51,12 @@ private:
} m_presetButtons;
struct PartButtons : juce::Component {
- PartButtons();
+ PartButtons();
};
void applyToSections(std::function<void(juce::Component *)>);
- VirusParameterBinding& m_parameterBinding;
- Virus::Controller& m_controller;
+ VirusParameterBinding& m_parameterBinding;
+ Virus::Controller& m_controller;
std::unique_ptr<OscEditor> m_oscEditor;
std::unique_ptr<LfoEditor> m_lfoEditor;
std::unique_ptr<FxEditor> m_fxEditor;
diff --git a/source/jucePlugin/ui/Virus_LfoEditor.cpp b/source/jucePlugin/ui/Virus_LfoEditor.cpp
@@ -35,21 +35,21 @@ LfoEditor::LfoBase::LfoBase(VirusParameterBinding& _parameterBinding, uint8_t _l
addAndMakeVisible(m_clock);
m_clock.setBounds(10, 80, 84, comboBoxHeight);
addAndMakeVisible(m_assignDest);
- const Virus::ParameterType rate[] = {Virus::Param_Lfo1Rate, Virus::Param_Lfo2Rate, Virus::Param_Lfo3Rate};
- const Virus::ParameterType keytrack[] = {Virus::Param_Lfo1Keyfollow, Virus::Param_Lfo2Keyfollow,
- Virus::Param_Lfo3Keyfollow};
- const Virus::ParameterType amount[] = {Virus::Param_Lfo1AssignAmount, Virus::Param_Lfo2AssignAmount,
- Virus::Param_OscLfo3Amount};
+ const Virus::ParameterType rate[] = {Virus::Param_Lfo1Rate, Virus::Param_Lfo2Rate, Virus::Param_Lfo3Rate};
+ const Virus::ParameterType keytrack[] = {Virus::Param_Lfo1Keyfollow, Virus::Param_Lfo2Keyfollow,
+ Virus::Param_Lfo3Keyfollow};
+ const Virus::ParameterType amount[] = {Virus::Param_Lfo1AssignAmount, Virus::Param_Lfo2AssignAmount,
+ Virus::Param_OscLfo3Amount};
const Virus::ParameterType shapes[] = {Virus::Param_Lfo1Shape, Virus::Param_Lfo2Shape, Virus::Param_Lfo3Shape};
- const Virus::ParameterType clock[] = {Virus::Param_Lfo1Clock, Virus::Param_Lfo2Clock, Virus::Param_Lfo3Clock};
- const Virus::ParameterType assignDest[] = {Virus::Param_Lfo1AssignDest, Virus::Param_Lfo2AssignDest,
- Virus::Param_Lfo3Destination};
- _parameterBinding.bind(m_rate, rate[_lfoIndex]);
- _parameterBinding.bind(m_keytrack, keytrack[_lfoIndex]);
- _parameterBinding.bind(m_amount, amount[_lfoIndex]);
- _parameterBinding.bind(m_shape, shapes[_lfoIndex]);
- _parameterBinding.bind(m_clock, clock[_lfoIndex]);
- _parameterBinding.bind(m_assignDest, assignDest[_lfoIndex]);
+ const Virus::ParameterType clock[] = {Virus::Param_Lfo1Clock, Virus::Param_Lfo2Clock, Virus::Param_Lfo3Clock};
+ const Virus::ParameterType assignDest[] = {Virus::Param_Lfo1AssignDest, Virus::Param_Lfo2AssignDest,
+ Virus::Param_Lfo3Destination};
+ _parameterBinding.bind(m_rate, rate[_lfoIndex]);
+ _parameterBinding.bind(m_keytrack, keytrack[_lfoIndex]);
+ _parameterBinding.bind(m_amount, amount[_lfoIndex]);
+ _parameterBinding.bind(m_shape, shapes[_lfoIndex]);
+ _parameterBinding.bind(m_clock, clock[_lfoIndex]);
+ _parameterBinding.bind(m_assignDest, assignDest[_lfoIndex]);
}
LfoEditor::LfoTwoOneShared::LfoTwoOneShared(VirusParameterBinding& _parameterBinding, uint8_t _lfoIndex) : LfoBase(_parameterBinding, _lfoIndex), m_link(false)
@@ -68,13 +68,13 @@ LfoEditor::LfoTwoOneShared::LfoTwoOneShared(VirusParameterBinding& _parameterBin
m_assignDest.setBounds(393, 122, comboBoxWidth, comboBoxHeight);
//_parameterBinding.bind(m_rate, Virus::Param_Lfo1Rate);
- //_parameterBinding.bind(m_keytrack, Virus::Param_Lfo1Keyfollow);
- _parameterBinding.bind(m_contour, _lfoIndex == 0 ? Virus::Param_Lfo1Symmetry : Virus::Param_Lfo2Symmetry);
- _parameterBinding.bind(m_phase, _lfoIndex == 0 ? Virus::Param_Lfo1KeyTrigger : Virus::Param_Lfo2Keytrigger);
- //parameterBinding.bind(m_amount, Virus::Param_Lfo1AssignAmount);
- _parameterBinding.bind(m_envMode, _lfoIndex == 0 ? Virus::Param_Lfo1EnvMode : Virus::Param_Lfo2EnvMode);
- _parameterBinding.bind(m_link, _lfoIndex == 0 ? Virus::Param_Lfo1Mode : Virus::Param_Lfo2Mode);
- //_parameterBinding.bind(m_assignDest, Virus::Param_Lfo1AssignDest);
+ //_parameterBinding.bind(m_keytrack, Virus::Param_Lfo1Keyfollow);
+ _parameterBinding.bind(m_contour, _lfoIndex == 0 ? Virus::Param_Lfo1Symmetry : Virus::Param_Lfo2Symmetry);
+ _parameterBinding.bind(m_phase, _lfoIndex == 0 ? Virus::Param_Lfo1KeyTrigger : Virus::Param_Lfo2Keytrigger);
+ //parameterBinding.bind(m_amount, Virus::Param_Lfo1AssignAmount);
+ _parameterBinding.bind(m_envMode, _lfoIndex == 0 ? Virus::Param_Lfo1EnvMode : Virus::Param_Lfo2EnvMode);
+ _parameterBinding.bind(m_link, _lfoIndex == 0 ? Virus::Param_Lfo1Mode : Virus::Param_Lfo2Mode);
+ //_parameterBinding.bind(m_assignDest, Virus::Param_Lfo1AssignDest);
}
LfoEditor::LfoOne::LfoOne(VirusParameterBinding& _parameterBinding) : LfoTwoOneShared(_parameterBinding, 0)
@@ -89,10 +89,10 @@ LfoEditor::LfoOne::LfoOne(VirusParameterBinding& _parameterBinding) : LfoTwoOneS
addAndMakeVisible(m_link); // add last to allow clicking over knobs area...
_parameterBinding.bind(m_osc1Pitch, Virus::Param_Osc1Lfo1Amount);
- _parameterBinding.bind(m_osc2Pitch, Virus::Param_Osc2Lfo1Amount);
- _parameterBinding.bind(m_filterGain, Virus::Param_FltGainLfo1Amount);
- _parameterBinding.bind(m_pw12, Virus::Param_PWLfo1Amount);
- _parameterBinding.bind(m_reso12, Virus::Param_ResoLfo1Amount);
+ _parameterBinding.bind(m_osc2Pitch, Virus::Param_Osc2Lfo1Amount);
+ _parameterBinding.bind(m_filterGain, Virus::Param_FltGainLfo1Amount);
+ _parameterBinding.bind(m_pw12, Virus::Param_PWLfo1Amount);
+ _parameterBinding.bind(m_reso12, Virus::Param_ResoLfo1Amount);
}
LfoEditor::LfoTwo::LfoTwo(VirusParameterBinding& _parameterBinding) : LfoTwoOneShared(_parameterBinding, 1)
@@ -107,10 +107,10 @@ LfoEditor::LfoTwo::LfoTwo(VirusParameterBinding& _parameterBinding) : LfoTwoOneS
addAndMakeVisible(m_link); // add last to allow clicking over knobs area...
_parameterBinding.bind(m_f1cutoff, Virus::Param_Cutoff1Lfo2Amount);
- _parameterBinding.bind(m_f2cutoff, Virus::Param_Cutoff2Lfo2Amount);
- _parameterBinding.bind(m_panning, Virus::Param_PanoramaLfo2Amount);
- _parameterBinding.bind(m_shape12, Virus::Param_OscShapeLfo2Amount);
- _parameterBinding.bind(m_fmAmount, Virus::Param_FmAmountLfo2Amount);
+ _parameterBinding.bind(m_f2cutoff, Virus::Param_Cutoff2Lfo2Amount);
+ _parameterBinding.bind(m_panning, Virus::Param_PanoramaLfo2Amount);
+ _parameterBinding.bind(m_shape12, Virus::Param_OscShapeLfo2Amount);
+ _parameterBinding.bind(m_fmAmount, Virus::Param_FmAmountLfo2Amount);
}
LfoEditor::LfoThree::LfoThree(VirusParameterBinding& _parameterBinding) : LfoBase(_parameterBinding, 2)
@@ -136,33 +136,33 @@ LfoEditor::ModMatrix::ModMatrix(VirusParameterBinding& _parameterBinding)
setupSlot(3, {{255, 214}}, {320, 190});
setupSlot(4, {{255, 338}}, {320, 314});
setupSlot(5, {{255, 462}}, {320, 439});
-
+
_parameterBinding.bind(m_modMatrix[0]->m_source, Virus::Param_Assign1Source);
- _parameterBinding.bind(m_modMatrix[1]->m_source, Virus::Param_Assign2Source);
- _parameterBinding.bind(m_modMatrix[2]->m_source, Virus::Param_Assign3Source);
- _parameterBinding.bind(m_modMatrix[3]->m_source, Virus::Param_Assign4Source);
- _parameterBinding.bind(m_modMatrix[4]->m_source, Virus::Param_Assign5Source);
- _parameterBinding.bind(m_modMatrix[5]->m_source, Virus::Param_Assign6Source);
+ _parameterBinding.bind(m_modMatrix[1]->m_source, Virus::Param_Assign2Source);
+ _parameterBinding.bind(m_modMatrix[2]->m_source, Virus::Param_Assign3Source);
+ _parameterBinding.bind(m_modMatrix[3]->m_source, Virus::Param_Assign4Source);
+ _parameterBinding.bind(m_modMatrix[4]->m_source, Virus::Param_Assign5Source);
+ _parameterBinding.bind(m_modMatrix[5]->m_source, Virus::Param_Assign6Source);
_parameterBinding.bind(m_modMatrix[0]->m_destinations[0]->m_amount, Virus::Param_Assign1Amount);
- _parameterBinding.bind(m_modMatrix[1]->m_destinations[0]->m_amount, Virus::Param_Assign2Amount1);
- //_parameterBinding.bind(m_modMatrix[1]->m_destinations[1]->m_amount, Virus::Param_Assign2Amount2);
- //_parameterBinding.bind(m_modMatrix[1]->m_destinations[2]->m_amount, Virus::Param_Assign2Amount3);
- _parameterBinding.bind(m_modMatrix[2]->m_destinations[0]->m_amount, Virus::Param_Assign3Amount1);
- //_parameterBinding.bind(m_modMatrix[2]->m_destinations[1]->m_amount, Virus::Param_Assign3Amount2);
- _parameterBinding.bind(m_modMatrix[3]->m_destinations[0]->m_amount, Virus::Param_Assign4Amount);
- _parameterBinding.bind(m_modMatrix[4]->m_destinations[0]->m_amount, Virus::Param_Assign5Amount);
- _parameterBinding.bind(m_modMatrix[5]->m_destinations[0]->m_amount, Virus::Param_Assign6Amount);
+ _parameterBinding.bind(m_modMatrix[1]->m_destinations[0]->m_amount, Virus::Param_Assign2Amount1);
+ //_parameterBinding.bind(m_modMatrix[1]->m_destinations[1]->m_amount, Virus::Param_Assign2Amount2);
+ //_parameterBinding.bind(m_modMatrix[1]->m_destinations[2]->m_amount, Virus::Param_Assign2Amount3);
+ _parameterBinding.bind(m_modMatrix[2]->m_destinations[0]->m_amount, Virus::Param_Assign3Amount1);
+ //_parameterBinding.bind(m_modMatrix[2]->m_destinations[1]->m_amount, Virus::Param_Assign3Amount2);
+ _parameterBinding.bind(m_modMatrix[3]->m_destinations[0]->m_amount, Virus::Param_Assign4Amount);
+ _parameterBinding.bind(m_modMatrix[4]->m_destinations[0]->m_amount, Virus::Param_Assign5Amount);
+ _parameterBinding.bind(m_modMatrix[5]->m_destinations[0]->m_amount, Virus::Param_Assign6Amount);
_parameterBinding.bind(m_modMatrix[0]->m_destinations[0]->m_dest, Virus::Param_Assign1Destination);
- _parameterBinding.bind(m_modMatrix[1]->m_destinations[0]->m_dest, Virus::Param_Assign2Destination1);
- //_parameterBinding.bind(m_modMatrix[1]->m_destinations[1]->m_dest, Virus::Param_Assign2Destination2);
- //_parameterBinding.bind(m_modMatrix[1]->m_destinations[2]->m_dest, Virus::Param_Assign2Destination3);
- _parameterBinding.bind(m_modMatrix[2]->m_destinations[0]->m_dest, Virus::Param_Assign3Destination1);
- //_parameterBinding.bind(m_modMatrix[2]->m_destinations[1]->m_dest, Virus::Param_Assign3Destination2);
- _parameterBinding.bind(m_modMatrix[3]->m_destinations[0]->m_dest, Virus::Param_Assign4Destination);
- _parameterBinding.bind(m_modMatrix[4]->m_destinations[0]->m_dest, Virus::Param_Assign5Destination);
- _parameterBinding.bind(m_modMatrix[5]->m_destinations[0]->m_dest, Virus::Param_Assign6Destination);
+ _parameterBinding.bind(m_modMatrix[1]->m_destinations[0]->m_dest, Virus::Param_Assign2Destination1);
+ //_parameterBinding.bind(m_modMatrix[1]->m_destinations[1]->m_dest, Virus::Param_Assign2Destination2);
+ //_parameterBinding.bind(m_modMatrix[1]->m_destinations[2]->m_dest, Virus::Param_Assign2Destination3);
+ _parameterBinding.bind(m_modMatrix[2]->m_destinations[0]->m_dest, Virus::Param_Assign3Destination1);
+ //_parameterBinding.bind(m_modMatrix[2]->m_destinations[1]->m_dest, Virus::Param_Assign3Destination2);
+ _parameterBinding.bind(m_modMatrix[3]->m_destinations[0]->m_dest, Virus::Param_Assign4Destination);
+ _parameterBinding.bind(m_modMatrix[4]->m_destinations[0]->m_dest, Virus::Param_Assign5Destination);
+ _parameterBinding.bind(m_modMatrix[5]->m_destinations[0]->m_dest, Virus::Param_Assign6Destination);
}
void LfoEditor::ModMatrix::setupSlot(int slotNum, std::initializer_list<juce::Point<int>> destsPos,