From 96e06f986e5070fb6a45fad6d4bd392d2dc73fea Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Fri, 22 Sep 2023 06:48:26 +0200 Subject: [PATCH 01/41] do not build standalone --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c81feb2..0d42377 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(COMMON_PLUGIN_SETTINGS # EDITOR_WANTS_KEYBOARD_FOCUS TRUE/FALSE # Does the editor need keyboard focus? # COPY_PLUGIN_AFTER_BUILD TRUE/FALSE # Should the plugin be installed to a default location after building? PLUGIN_MANUFACTURER_CODE "ICST" # A four-character manufacturer id with at least one upper-case character - FORMATS AU VST3 Standalone LV2 # The formats to build. Other valid formats are: AAX Unity VST AU AUv3 + FORMATS AU VST3 LV2 # The formats to build. Other valid formats are: AAX Unity VST AU AUv3 AU_MAIN_TYPE kAudioUnitType_Effect NEEDS_WEB_BROWSER TRUE ) From bcb6268a96c1c256a29b0f0059aefc27ec2af1d9 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Mon, 9 Oct 2023 09:46:56 +0200 Subject: [PATCH 02/41] multi activation fixed --- Common/MultiActivationDialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/MultiActivationDialog.h b/Common/MultiActivationDialog.h index f5ca225..d7942a6 100644 --- a/Common/MultiActivationDialog.h +++ b/Common/MultiActivationDialog.h @@ -338,7 +338,7 @@ class MultiActivationDialog : public Component, ComboBox::Listener, Button::List { if(localDataSet->get(i)->getGroup() == localDataSet->getGroup(0)) { - auto pt = p.getPointAlongPath(totalLength / (float(pointCount * groupPointIndex))); + auto pt = p.getPointAlongPath(totalLength / float(pointCount) * float(groupPointIndex)); localDataSet->get(i)->getRawPoint()->setXY(pt.getX(), pt.getY()); groupPointIndex++; } From 7be39345d5057fb6f56c582b8c053cac158477a3 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Mon, 9 Oct 2023 09:47:44 +0200 Subject: [PATCH 03/41] limit processblock to number of channels in buffer --- Encoder/Source/PluginProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Encoder/Source/PluginProcessor.cpp b/Encoder/Source/PluginProcessor.cpp index 40c74e6..26b9d21 100644 --- a/Encoder/Source/PluginProcessor.cpp +++ b/Encoder/Source/PluginProcessor.cpp @@ -228,7 +228,7 @@ void AmbisonicEncoderAudioProcessor::processBlock (AudioSampleBuffer& buffer, Mi { // Audio handling const float masterGainFactor = float(Decibels::decibelsToGain(sources->getMasterGain())); - const int totalNumInputChannels = jmin(getTotalNumInputChannels(), sources->size()); + const int totalNumInputChannels = jmin(getTotalNumInputChannels(), sources->size(), buffer.getNumChannels()); const int totalUsedOutputChannels = jmin(getTotalNumOutputChannels(), encoderSettings.getAmbiChannelCount(), buffer.getNumChannels()); double currentCoefficients[64]; float* outputBufferPointers[64]; From 2226a3b1a5c273a07dc1f23d7eca038d2d0a032c Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Mon, 9 Oct 2023 09:48:40 +0200 Subject: [PATCH 04/41] ignore all kind of build folders --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d896927..eb7fb9d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ Encoder/Builds/ Encoder/JuceLibraryCode/ bin/ packages/ -build/ +build*/ *AutoGen.jucer From 9a3c5907951dcdbe5d451226a7323f29aabf3704 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Tue, 10 Oct 2023 12:48:42 +0200 Subject: [PATCH 05/41] editable field for point count --- Common/MultiActivationDialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/MultiActivationDialog.h b/Common/MultiActivationDialog.h index d7942a6..fcf865a 100644 --- a/Common/MultiActivationDialog.h +++ b/Common/MultiActivationDialog.h @@ -59,7 +59,7 @@ class MultiActivationDialog : public Component, ComboBox::Listener, Button::List int max = _pRadarOptions->maxNumberEditablePoints - pData->getEnabledCount(); sliderPointCount->setRange(Range(0, max), 1.0); sliderPointCount->setValue(max, sendNotificationAsync); - sliderPointCount->setTextBoxStyle(Slider::TextEntryBoxPosition::TextBoxRight, true, 40, 24); + sliderPointCount->setTextBoxStyle(Slider::TextEntryBoxPosition::TextBoxRight, false, 40, 24); sliderPointCount->addListener(this); addAndMakeVisible(sliderPointCount.get()); From 6a32365c79f639f714d91f0c692b14c1c21b2bc8 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Wed, 11 Oct 2023 21:23:03 +0200 Subject: [PATCH 06/41] always use group mode --- Common/AmbiDataSet.cpp | 26 +--------------------- Common/AmbiDataSet.h | 4 +--- Common/AmbiSourceSet.cpp | 11 --------- Common/AmbiSourceSet.h | 2 +- Common/AmbiSpeakerSet.h | 2 +- Encoder/Source/SourceDefinitionComponent.h | 1 - 6 files changed, 4 insertions(+), 42 deletions(-) diff --git a/Common/AmbiDataSet.cpp b/Common/AmbiDataSet.cpp index 0a45b77..8ba844a 100644 --- a/Common/AmbiDataSet.cpp +++ b/Common/AmbiDataSet.cpp @@ -21,7 +21,7 @@ #include "AmbiDataSet.h" -AmbiDataSet::AmbiDataSet(ScalingInfo* pScaling) : pScalingInfo(pScaling), groupModeFlag(DEFAULT_GROUP_MODE_FLAG) +AmbiDataSet::AmbiDataSet(ScalingInfo* pScaling, bool _groupModeFlag) : pScalingInfo(pScaling), groupModeFlag(_groupModeFlag) { } @@ -784,30 +784,6 @@ bool AmbiDataSet::getGroupModeFlag() const return groupModeFlag; } -void AmbiDataSet::setGroupModeFlag(bool en) -{ - std::map> origPos; - - if(groupModeFlag != en) - { - // rearrange all source positions - for(int i = 0; i < size(); i++) - { - auto p = get(i); - if(p != nullptr) - { - origPos[i] = getAbsSourcePoint(i); - } - } - } - - groupModeFlag = en; - - for(auto& p : origPos) - setAbsSourcePoint(p.first, p.second); -} - - Vector3D AmbiDataSet::getAbsSourcePoint(int index) const { const ScopedLock lock(cs); diff --git a/Common/AmbiDataSet.h b/Common/AmbiDataSet.h index 753935d..d46cdad 100644 --- a/Common/AmbiDataSet.h +++ b/Common/AmbiDataSet.h @@ -23,14 +23,13 @@ #include "AmbiPoint.h" #include "AmbiGroup.h" -#define DEFAULT_GROUP_MODE_FLAG false #define XML_TAG_GROUPS "Groups" #define XML_TAG_GROUP "Group" class AmbiDataSet { public: - AmbiDataSet(ScalingInfo* pScaling); + AmbiDataSet(ScalingInfo* pScaling, bool _groupModeFlag); virtual ~AmbiDataSet(); virtual int size() const = 0; @@ -101,7 +100,6 @@ class AmbiDataSet void setAbsSourcePoint(int index, Vector3D absPoint); bool getGroupModeFlag() const; - void setGroupModeFlag(bool en); private: bool nameExists(String name) const; diff --git a/Common/AmbiSourceSet.cpp b/Common/AmbiSourceSet.cpp index 06fcf84..8f656d0 100644 --- a/Common/AmbiSourceSet.cpp +++ b/Common/AmbiSourceSet.cpp @@ -151,12 +151,6 @@ void AmbiSourceSet::addNew(String id, Point3D point, String name, Colour void AmbiSourceSet::loadFromXml(XmlElement* xmlElement, AudioParams* pAudioParams) { - XmlElement* groupMode = xmlElement->getChildByName(XML_TAG_GROUP_MODE); - if(groupMode != nullptr) - { - groupModeFlag = groupMode->getBoolAttribute(XML_ATTRIBUTE_ENABLE, DEFAULT_GROUP_MODE_FLAG); - } - XmlElement* distanceScalerXml = xmlElement->getChildByName(XML_TAG_DISTANCE_SCALER); if (distanceScalerXml != nullptr) { @@ -233,11 +227,6 @@ void AmbiSourceSet::loadFromXml(XmlElement* xmlElement, AudioParams* pAudioParam void AmbiSourceSet::writeToXmlElement(XmlElement* xml) const { - // group mode flag - XmlElement* groupMode = new XmlElement(XML_TAG_GROUP_MODE); - groupMode->setAttribute(XML_ATTRIBUTE_ENABLE, groupModeFlag); - xml->addChildElement(groupMode); - XmlElement* distanceScalerXml = new XmlElement(XML_TAG_DISTANCE_SCALER); distanceScalerXml->setAttribute(XML_ATTRIBUTE_FACTOR, getDistanceScaler()); xml->addChildElement(distanceScalerXml); diff --git a/Common/AmbiSourceSet.h b/Common/AmbiSourceSet.h index ec6c831..2387cb2 100644 --- a/Common/AmbiSourceSet.h +++ b/Common/AmbiSourceSet.h @@ -39,7 +39,7 @@ class AmbiSourceSet : public AmbiDataSet, public AudioProcessorParameter::Listener, public ChangeBroadcaster { public: - AmbiSourceSet(ScalingInfo* pScaling) : AmbiDataSet(pScaling), distanceScaler(DEFAULT_DISTANCE_SCALER), masterGain(nullptr), localMasterGain(DEFAULT_MASTER_GAIN) + AmbiSourceSet(ScalingInfo* pScaling) : AmbiDataSet(pScaling, true), distanceScaler(DEFAULT_DISTANCE_SCALER), masterGain(nullptr), localMasterGain(DEFAULT_MASTER_GAIN) {} void initialize(AudioProcessor* pProcessor); diff --git a/Common/AmbiSpeakerSet.h b/Common/AmbiSpeakerSet.h index ec14057..8f5d8f2 100644 --- a/Common/AmbiSpeakerSet.h +++ b/Common/AmbiSpeakerSet.h @@ -29,7 +29,7 @@ class AmbiSpeakerSet : public AmbiDataSet { public: - AmbiSpeakerSet(ScalingInfo* pScaling) : AmbiDataSet(pScaling) {} + AmbiSpeakerSet(ScalingInfo* pScaling) : AmbiDataSet(pScaling, false) {} AmbiSpeaker* get(int index) const override; void add(AmbiSpeaker* pt); diff --git a/Encoder/Source/SourceDefinitionComponent.h b/Encoder/Source/SourceDefinitionComponent.h index 87c8b68..e164b66 100644 --- a/Encoder/Source/SourceDefinitionComponent.h +++ b/Encoder/Source/SourceDefinitionComponent.h @@ -105,7 +105,6 @@ class SourceDefinitionComponent : public Component, std::unique_ptr toggleInfiniteDistance; std::unique_ptr labelMasterGain; std::unique_ptr sliderMasterGain; - std::unique_ptr toggleGroupMode; std::unique_ptr comboBoxPresets; std::unique_ptr labelPresets; std::unique_ptr buttonSave; From 449b6e40c4eb226caaf54204a11622ef1c7165e3 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Wed, 11 Oct 2023 21:24:17 +0200 Subject: [PATCH 07/41] avoid negative delays --- Common/DelayHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/DelayHelper.cpp b/Common/DelayHelper.cpp index e2090bf..eb58c29 100644 --- a/Common/DelayHelper.cpp +++ b/Common/DelayHelper.cpp @@ -35,9 +35,9 @@ double DelayHelper::getDelayCompensationMs(double distance, double maxNormalized int DelayHelper::getDelayCompensationSamples(double distance, double maxNormalizedDistance, double samplingRate) { - return int((maxNormalizedDistance - distance) + return jmax(0, int((maxNormalizedDistance - distance) * SOUND_SPEED_S_PER_M - * samplingRate); + * samplingRate)); } float DelayHelper::getDelaySamples(double distance, double samplingRate) From bca56617b9397b1c162440667f760f6e782c6d71 Mon Sep 17 00:00:00 2001 From: Christian Schweizer Date: Wed, 11 Oct 2023 21:25:50 +0200 Subject: [PATCH 08/41] grouping improved --- Common/PointInfoControl.cpp | 6 +- Common/Radar2D.cpp | 49 ++++----- Common/RadarOptions.cpp | 2 + Common/RadarOptions.h | 2 + Decoder/Source/PluginProcessor.cpp | 2 + Encoder/Source/PluginProcessor.cpp | 2 + Encoder/Source/SourceDefinitionComponent.cpp | 102 ++++++++----------- 7 files changed, 77 insertions(+), 88 deletions(-) diff --git a/Common/PointInfoControl.cpp b/Common/PointInfoControl.cpp index 23e1a39..986a31e 100644 --- a/Common/PointInfoControl.cpp +++ b/Common/PointInfoControl.cpp @@ -420,10 +420,10 @@ void PointInfoControl::updateSelectedPoint(String exceptField) textD->setText("-"); } - bool enGroup = pPointSelection->getSelectionMode() == PointSelection::Point && pPointSelection->getSelectedIndices().size() > 1 + bool enGroup = pRadarOptions->allowGroup && pPointSelection->getSelectionMode() == PointSelection::Point && pPointSelection->getSelectedIndices().size() > 1 && ( pRadarOptions->audioParams == nullptr || pEditablePoints->activeGroupCount() < pRadarOptions->audioParams->groupParams.size()); - bool enUngroup = pPointSelection->getSelectionMode() == PointSelection::Group && pPointSelection->getSelectedIndices().size() == 1; - bool enDelete = pPointSelection->getSelectedIndices().size() > 0; + bool enUngroup = pRadarOptions->allowGroup && pPointSelection->getSelectionMode() == PointSelection::Group && pPointSelection->getSelectedIndices().size() == 1; + bool enDelete = pRadarOptions->allowDelete && pPointSelection->getSelectedIndices().size() > 0; btnGroup->setEnabled(enGroup); btnUngroup->setEnabled(enUngroup); btnDelete->setEnabled(enDelete); diff --git a/Common/Radar2D.cpp b/Common/Radar2D.cpp index 4733a2e..473efb4 100644 --- a/Common/Radar2D.cpp +++ b/Common/Radar2D.cpp @@ -576,7 +576,7 @@ bool Radar2D::keyPressed(const KeyPress& key) for(auto i : selection) pEditablePoints->setSolo(i, anyNotSolo); } - else if(key.isKeyCode(KeyPress::backspaceKey)) + else if(pRadarOptions->allowDelete && (key.isKeyCode(KeyPress::deleteKey) || key.isKeyCode(KeyPress::backspaceKey))) { for(auto i : selection) { @@ -1088,31 +1088,32 @@ void Radar2D::mouseDoubleClick(const MouseEvent& e) if (pRadarOptions->maxNumberEditablePoints > 0 && pEditablePoints->getEnabledCount() >= pRadarOptions->maxNumberEditablePoints) return; - if (pEditablePoints->size() < pRadarOptions->maxNumberEditablePoints) - { - // add new point if capacity allows it - Uuid newId = Uuid(); - int index = pEditablePoints->size(); - switch (radarMode) { - case XY: - pEditablePoints->addNew(newId.toString(), Point3D(valuePoint.getX(), valuePoint.getY(), 0.0, pRadarOptions->getAudioParamForIndex(index, false)), pEditablePoints->getNewUniqueName(), TrackColors::getColor(index + 1)); - break; - case XZ_Half: - case XZ_Full: - pEditablePoints->addNew(newId.toString(), Point3D(valuePoint.getX(), 0.0, valuePoint.getY(), pRadarOptions->getAudioParamForIndex(index, false)), pEditablePoints->getNewUniqueName(), TrackColors::getColor(index + 1)); - break; - } - - // select point - pPointSelection->selectPoint(pEditablePoints->size() - 1); - } - else - { - if(e.mods.isShiftDown()) + if(e.mods.isShiftDown() && pRadarOptions->allowGroup) + { + CallOutBox::launchAsynchronously(std::make_unique(pEditablePoints, valuePoint, pRadarOptions, radarMode == XY), Rectangle(e.getPosition().translated(3, 3), e.getPosition().translated(3, 3)), this); + } + else + { + if (pEditablePoints->size() < pRadarOptions->maxNumberEditablePoints) { - CallOutBox::launchAsynchronously(std::make_unique(pEditablePoints, valuePoint, pRadarOptions, radarMode == XY), Rectangle(e.getPosition().translated(3, 3), e.getPosition().translated(3, 3)), this); + // add new point if capacity allows it + Uuid newId = Uuid(); + int index = pEditablePoints->size(); + switch (radarMode) { + case XY: + pEditablePoints->addNew(newId.toString(), Point3D(valuePoint.getX(), valuePoint.getY(), 0.0, pRadarOptions->getAudioParamForIndex(index, false)), pEditablePoints->getNewUniqueName(), TrackColors::getColor(index + 1)); + break; + case XZ_Half: + case XZ_Full: + pEditablePoints->addNew(newId.toString(), Point3D(valuePoint.getX(), 0.0, valuePoint.getY(), pRadarOptions->getAudioParamForIndex(index, false)), pEditablePoints->getNewUniqueName(), TrackColors::getColor(index + 1)); + break; + } + + // select point + pPointSelection->selectPoint(pEditablePoints->size() - 1); } - else { + else + { // otherwise enable a disabled point CallOutBox::launchAsynchronously(std::make_unique(pEditablePoints, valuePoint, radarMode == XY), Rectangle(e.getPosition(), e.getPosition().translated(3, 3)), this); } diff --git a/Common/RadarOptions.cpp b/Common/RadarOptions.cpp index 0e79b05..193792b 100644 --- a/Common/RadarOptions.cpp +++ b/Common/RadarOptions.cpp @@ -32,6 +32,8 @@ RadarOptions::RadarOptions() dawParameter = nullptr; setTrackColorAccordingToName = true; checkNameFieldEditable = false; + allowGroup = true; + allowDelete = true; } AudioParameterSet RadarOptions::getAudioParamForIndex(int index, bool isGroup) const diff --git a/Common/RadarOptions.h b/Common/RadarOptions.h index 81216f7..c3b8120 100644 --- a/Common/RadarOptions.h +++ b/Common/RadarOptions.h @@ -40,6 +40,8 @@ class RadarOptions bool showDisplayOnlyPoints; bool setTrackColorAccordingToName; bool checkNameFieldEditable; + bool allowGroup; + bool allowDelete; AudioParams* audioParams; DawParameter* dawParameter; diff --git a/Decoder/Source/PluginProcessor.cpp b/Decoder/Source/PluginProcessor.cpp index c6c7442..7d30d44 100644 --- a/Decoder/Source/PluginProcessor.cpp +++ b/Decoder/Source/PluginProcessor.cpp @@ -51,6 +51,8 @@ AmbisonicsDecoderAudioProcessor::AmbisonicsDecoderAudioProcessor() radarOptions.editablePointsAsSquare = true; radarOptions.scalingInfo = getScalingInfo(); radarOptions.zoomSettings = getZoomSettingsPointer(); + radarOptions.allowGroup = false; + radarOptions.allowDelete = false; } AmbisonicsDecoderAudioProcessor::~AmbisonicsDecoderAudioProcessor() diff --git a/Encoder/Source/PluginProcessor.cpp b/Encoder/Source/PluginProcessor.cpp index 26b9d21..f6ff107 100644 --- a/Encoder/Source/PluginProcessor.cpp +++ b/Encoder/Source/PluginProcessor.cpp @@ -85,6 +85,8 @@ AmbisonicEncoderAudioProcessor::AmbisonicEncoderAudioProcessor() radarOptions.scalingInfo = getScalingInfo(); radarOptions.zoomSettings = getZoomSettingsPointer(); radarOptions.checkNameFieldEditable = !MULTI_ENCODER_MODE; + radarOptions.allowGroup = MULTI_ENCODER_MODE; + radarOptions.allowDelete = MULTI_ENCODER_MODE; } AmbisonicEncoderAudioProcessor::~AmbisonicEncoderAudioProcessor() diff --git a/Encoder/Source/SourceDefinitionComponent.cpp b/Encoder/Source/SourceDefinitionComponent.cpp index 2c919b9..e461b7c 100644 --- a/Encoder/Source/SourceDefinitionComponent.cpp +++ b/Encoder/Source/SourceDefinitionComponent.cpp @@ -118,7 +118,7 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr labelDistanceScaler->setColour (juce::TextEditor::textColourId, juce::Colours::black); labelDistanceScaler->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000)); - labelDistanceScaler->setBounds (6, 39, 109, 24); + labelDistanceScaler->setBounds (312, 8, 109, 24); toggleInfiniteDistance.reset (new juce::ToggleButton ("toggleInfiniteDistance")); addAndMakeVisible (toggleInfiniteDistance.get()); @@ -134,7 +134,7 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr labelMasterGain->setColour (juce::TextEditor::textColourId, juce::Colours::black); labelMasterGain->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000)); - labelMasterGain->setBounds (6, 69, 109, 24); + labelMasterGain->setBounds (8, 40, 109, 24); sliderMasterGain.reset (new juce::Slider ("sliderMasterGain")); addAndMakeVisible (sliderMasterGain.get()); @@ -143,13 +143,6 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr sliderMasterGain->setTextBoxStyle (juce::Slider::TextBoxRight, false, 80, 20); sliderMasterGain->addListener (this); - toggleGroupMode.reset (new juce::ToggleButton ("toggleGroupMode")); - addAndMakeVisible (toggleGroupMode.get()); - toggleGroupMode->setButtonText (TRANS("Group Mode")); - toggleGroupMode->addListener (this); - - toggleGroupMode->setBounds (8, 8, 199, 24); - comboBoxPresets.reset (new juce::ComboBox ("comboBoxPresets")); addAndMakeVisible (comboBoxPresets.get()); comboBoxPresets->setEditableText (false); @@ -190,19 +183,21 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr labelAmbiOrder->setColour (juce::TextEditor::textColourId, juce::Colours::black); labelAmbiOrder->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000)); + labelAmbiOrder->setBounds (6, 8, 136, 24); + comboAmbiOrder.reset (new juce::ComboBox ("comboAmbiOrder")); addAndMakeVisible (comboAmbiOrder.get()); comboAmbiOrder->setEditableText (false); comboAmbiOrder->setJustificationType (juce::Justification::centredLeft); comboAmbiOrder->setTextWhenNothingSelected (juce::String()); comboAmbiOrder->setTextWhenNoChoicesAvailable (TRANS("(no choices)")); - comboAmbiOrder->addItem (TRANS("1st (4ch)"), 1); - comboAmbiOrder->addItem (TRANS("2nd (9ch)"), 2); - comboAmbiOrder->addItem (TRANS("3rd (16ch)"), 3); - comboAmbiOrder->addItem (TRANS("4th (25ch)"), 4); - comboAmbiOrder->addItem (TRANS("5th (36ch)"), 5); - comboAmbiOrder->addItem (TRANS("6th (49ch)"), 6); - comboAmbiOrder->addItem (TRANS("7th (64ch)"), 7); + comboAmbiOrder->addItem (TRANS("1st (4 ch)"), 1); + comboAmbiOrder->addItem (TRANS("2nd (9 ch)"), 2); + comboAmbiOrder->addItem (TRANS("3rd (16 ch)"), 3); + comboAmbiOrder->addItem (TRANS("4th (25 ch)"), 4); + comboAmbiOrder->addItem (TRANS("5th (36 ch)"), 5); + comboAmbiOrder->addItem (TRANS("6th (49 ch)"), 6); + comboAmbiOrder->addItem (TRANS("7th (64 ch)"), 7); comboAmbiOrder->addListener (this); @@ -225,7 +220,6 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr buttonRemoveGroup->setVisible(MULTI_ENCODER_MODE); buttonMoveGroupUp->setVisible(MULTI_ENCODER_MODE); buttonMoveGroupDown->setVisible(MULTI_ENCODER_MODE); - toggleGroupMode->setVisible(MULTI_ENCODER_MODE); sourceModel->initTable(sourceList.get()); groupModel->initTable(groupList.get()); @@ -250,13 +244,13 @@ SourceDefinitionComponent::SourceDefinitionComponent (EncoderSettingsComponentAr m_args.pSourceSet->addChangeListener(this); handleAmbiOrders(); - + initializePresets(); sourceList->addMouseListener(this, true); groupList->addMouseListener(this, true); m_args.pChannelLayout->addActionListener(this); - + controlDimming(); //[/Constructor] } @@ -287,7 +281,6 @@ SourceDefinitionComponent::~SourceDefinitionComponent() toggleInfiniteDistance = nullptr; labelMasterGain = nullptr; sliderMasterGain = nullptr; - toggleGroupMode = nullptr; comboBoxPresets = nullptr; labelPresets = nullptr; buttonSave = nullptr; @@ -319,28 +312,27 @@ void SourceDefinitionComponent::resized() //[UserPreResize] Add your own custom resize code here.. //[/UserPreResize] - groupGroups->setBounds (0, 96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f)), getWidth() - 0, juce::roundToInt ((getHeight() - 134) * 0.4343f)); - groupList->setBounds (0 + 16, (96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f))) + 19, (getWidth() - 0) - 31, (juce::roundToInt ((getHeight() - 134) * 0.4343f)) - 67); - buttonAddGroup->setBounds (0 + 17, (96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f))) + (juce::roundToInt ((getHeight() - 134) * 0.4343f)) - 40, 64, 24); - buttonRemoveGroup->setBounds (0 + 89, (96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f))) + (juce::roundToInt ((getHeight() - 134) * 0.4343f)) - 40, 64, 24); - groupSources->setBounds (0, 96 + 0, getWidth() - 0, juce::roundToInt ((getHeight() - 134) * 0.5657f)); - sourceList->setBounds (0 + 16, (96 + 0) + 19, (getWidth() - 0) - 31, (juce::roundToInt ((getHeight() - 134) * 0.5657f)) - 67); - buttonAdd->setBounds (0 + 17, (96 + 0) + (juce::roundToInt ((getHeight() - 134) * 0.5657f)) - 40, 64, 24); - buttonRemove->setBounds (0 + 89, (96 + 0) + (juce::roundToInt ((getHeight() - 134) * 0.5657f)) - 40, 64, 24); - buttonMoveDown->setBounds (0 + (getWidth() - 0) - 80, (96 + 0) + (juce::roundToInt ((getHeight() - 134) * 0.5657f)) - 40, 64, 24); - buttonMoveUp->setBounds (0 + (getWidth() - 0) - 152, (96 + 0) + (juce::roundToInt ((getHeight() - 134) * 0.5657f)) - 40, 64, 24); - buttonMoveGroupDown->setBounds (0 + (getWidth() - 0) - 80, (96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f))) + (juce::roundToInt ((getHeight() - 134) * 0.4343f)) - 40, 64, 24); - buttonMoveGroupUp->setBounds (0 + (getWidth() - 0) - 152, (96 + (getHeight() - 134) - (juce::roundToInt ((getHeight() - 134) * 0.4343f))) + (juce::roundToInt ((getHeight() - 134) * 0.4343f)) - 40, 64, 24); - sliderDistanceScaler->setBounds (getWidth() - 98 - (getWidth() - 301), 39, getWidth() - 301, 24); - toggleInfiniteDistance->setBounds (getWidth() - 90, 39, 72, 24); - sliderMasterGain->setBounds (getWidth() - 98 - (getWidth() - 301), 69, getWidth() - 301, 24); + groupGroups->setBounds (0, 72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f)), getWidth() - 0, juce::roundToInt ((getHeight() - 110) * 0.4349f)); + groupList->setBounds (0 + 16, (72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f))) + 19, (getWidth() - 0) - 31, (juce::roundToInt ((getHeight() - 110) * 0.4349f)) - 67); + buttonAddGroup->setBounds (0 + 17, (72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f))) + (juce::roundToInt ((getHeight() - 110) * 0.4349f)) - 40, 64, 24); + buttonRemoveGroup->setBounds (0 + 89, (72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f))) + (juce::roundToInt ((getHeight() - 110) * 0.4349f)) - 40, 64, 24); + groupSources->setBounds (0, 72 + 0, getWidth() - 0, juce::roundToInt ((getHeight() - 110) * 0.5651f)); + sourceList->setBounds (0 + 16, (72 + 0) + 19, (getWidth() - 0) - 31, (juce::roundToInt ((getHeight() - 110) * 0.5651f)) - 67); + buttonAdd->setBounds (0 + 17, (72 + 0) + (juce::roundToInt ((getHeight() - 110) * 0.5651f)) - 40, 64, 24); + buttonRemove->setBounds (0 + 89, (72 + 0) + (juce::roundToInt ((getHeight() - 110) * 0.5651f)) - 40, 64, 24); + buttonMoveDown->setBounds (0 + (getWidth() - 0) - 80, (72 + 0) + (juce::roundToInt ((getHeight() - 110) * 0.5651f)) - 40, 64, 24); + buttonMoveUp->setBounds (0 + (getWidth() - 0) - 152, (72 + 0) + (juce::roundToInt ((getHeight() - 110) * 0.5651f)) - 40, 64, 24); + buttonMoveGroupDown->setBounds (0 + (getWidth() - 0) - 80, (72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f))) + (juce::roundToInt ((getHeight() - 110) * 0.4349f)) - 40, 64, 24); + buttonMoveGroupUp->setBounds (0 + (getWidth() - 0) - 152, (72 + (getHeight() - 110) - (juce::roundToInt ((getHeight() - 110) * 0.4349f))) + (juce::roundToInt ((getHeight() - 110) * 0.4349f)) - 40, 64, 24); + sliderDistanceScaler->setBounds (getWidth() - 93 - (getWidth() - 525), 8, getWidth() - 525, 24); + toggleInfiniteDistance->setBounds (getWidth() - 81, 8, 72, 24); + sliderMasterGain->setBounds (getWidth() - 5 - (getWidth() - 141), 40, getWidth() - 141, 24); comboBoxPresets->setBounds (83, getHeight() - 8 - 24, getWidth() - 290, 24); labelPresets->setBounds (8, getHeight() - 8 - 24, 64, 24); buttonSave->setBounds (getWidth() - 110 - 90, getHeight() - 8 - 24, 90, 24); buttonManagePresets->setBounds (getWidth() - 8 - 90, getHeight() - 8 - 24, 90, 24); - dummyHeight->setBounds (0, 96, 24, getHeight() - 134); - labelAmbiOrder->setBounds (getWidth() - 285, 8, 136, 24); - comboAmbiOrder->setBounds (getWidth() - 149, 8, 142, 24); + dummyHeight->setBounds (0, 72, 24, getHeight() - 110); + comboAmbiOrder->setBounds (280 - 144, 8, 144, 24); //[UserResized] Add your own custom resize handling here.. //[/UserResized] } @@ -476,13 +468,6 @@ void SourceDefinitionComponent::buttonClicked (juce::Button* buttonThatWasClicke updateEncodingUiElements(); //[/UserButtonCode_toggleInfiniteDistance] } - else if (buttonThatWasClicked == toggleGroupMode.get()) - { - //[UserButtonCode_toggleGroupMode] -- add your button handler code here.. - m_args.pSourceSet->setGroupModeFlag(toggleGroupMode->getToggleState()); - refresh(); - //[/UserButtonCode_toggleGroupMode] - } else if (buttonThatWasClicked == buttonSave.get()) { //[UserButtonCode_buttonSave] -- add your button handler code here.. @@ -615,7 +600,6 @@ void SourceDefinitionComponent::refresh() const void SourceDefinitionComponent::updateEncodingUiElements() { - toggleGroupMode->setToggleState(m_args.pSourceSet->getGroupModeFlag(), dontSendNotification); toggleInfiniteDistance->setToggleState(exactlyEqual(m_args.pSourceSet->getDistanceScaler(), ScalingInfo::Infinite), dontSendNotification); labelDistanceScaler->setEnabled(!toggleInfiniteDistance->getToggleState()); sliderDistanceScaler->setEnabled(!toggleInfiniteDistance->getToggleState()); @@ -902,7 +886,7 @@ BEGIN_JUCER_METADATA fixedSize="0" initialWidth="600" initialHeight="400"> @@ -919,7 +903,7 @@ BEGIN_JUCER_METADATA posRelativeY="983b0a3b2c5c945a" buttonText="remove" connectedEdges="0" needsCallback="1" radioGroupId="0"/>