Skip to content

Feature / Automation View for Arranger#1039

Merged
m-m-adams merged 12 commits intoSynthstromAudible:communityfrom
seangoodvibes:Feature-/-Automation-View-for-Arranger
Jan 28, 2024
Merged

Feature / Automation View for Arranger#1039
m-m-adams merged 12 commits intoSynthstromAudible:communityfrom
seangoodvibes:Feature-/-Automation-View-for-Arranger

Conversation

@seangoodvibes
Copy link
Copy Markdown
Collaborator

@seangoodvibes seangoodvibes commented Jan 23, 2024

Automation Arranger View

Shortcuts

  • to get into Arranger Automation View: Shift + Song (while in Arranger View)
  • to get back to Arranger: Song
  • to get back to Automation Overview: Affect Entire
  • to activate/de-activate Automatic Scrolling: Cross Screen

Some things to note:

  • The automation view community features menu was removed and replaced with a new defaults menu under Settings/Defaults/UI/Automation/ - You will need to setup the defaults again. By default each option should be set to "Enabled" - unfortunately with the nightly builds this is not being done automatically.
  • You can use the arranger clip status pad in automation overview and automation editor
  • You can use the arranger clip audition pad in automation overview only (this is because holding the audition pad changes the parameter context - and the automation editor is for arranger parameters only
  • You can't enter automation view if you're holding an arranger row pad or audition pad
  • You can't enter automation editor from automation overview if you're holding an audition pad

Codebase changes from this PR:

  • Update documentation

Song Class Changes:

  • Add Automation Arranger View variables + Added reading/writing of these variables to the Song XML
lastSelectedParamID
lastSelectedParamKind
lastSelectedParamShortcutX
lastSelectedParamShortcutY
lastSelectedParamArrayPosition

Automation View Class Changes:

  • Rename Automation Clip View class to Automation View
  • Add AutomationView::onArrangerView variable to inform the Automation View about whether it is the Arranger View version or the Clip View version.
    • Integrated onArrangerView variable through the Automation View so that you only perform Arranger View relevant actions. This includes:
      • Getting the modelStackWithParam for the song
      • Using currentSong to read/write from the Automation View specific variables (e.g. lastSelectedParamID)
      • Enabling cross-screen scrolling
      • Rendering the sidebar and handling sidebar actions from the Arranger View class
      • Using the graphicsRoutine from the Arranger View class
      • Determining the parameters that relevant for arranger view
      • De-activating certain button actions
      • Using the Song button to return to Arranger View
  • Add SONG button shortcut to AutomationView::ButtonAction to exit back to Arranger
  • Add AutomationView::renderUndefinedArea function to be able to render grey the section of the arrangement that cannot currently be automated
  • Bugfix - Clearing of all Audio Clip automation was not working in Automation View
  • Refactor - Broke down AutomationView::ButtonAction into several sub-functions:
    • AutomationView::handleScaleButtonAction
    • AutomationView::handleSessionButtonAction
    • AutomationView::handleKeyboardButtonAction
    • AutomationView::handleClipButtonAction
    • AutomationView::handleCrossScreenButtonAction
    • AutomationView::handleKitButtonAction
    • AutomationView::handleSynthButtonAction
    • AutomationView::handleMidiButtonAction
    • AutomationView::handleCVButtonAction
    • AutomationView::handleHorizontalEncoderButtonAction
    • AutomationView::handleBackAndHorizontalEncoderButtonComboAction
    • AutomationView::handleSelectEncoderButtonAction
  • Refactor - Broke down AutomationView::PadAction into several sub-functions:
    • AutomationView::handleMutePadAction
    • AutomationView::handleAuditionPadAction
    • AutomationView::handleEditPadAction
  • Updated the globalParamsForAutomation to only use Param::Kind UNPATCHED_GLOBAL
  • Added a few functions to handle the Zooming In/Out while in Automation View, ensuring that the navigation context (CLIP vs ARRANGEMENT) is taken into account:
    • AutomationView::getMaxLength
    • AutomationView::getMaxZoom
    • AutomationView::getNavSysId
  • Updated a number of functions to pass relevant variables around, as opposed to re-generating those variables. The relevant variables include:
    • modelStackWithTimelineCounter
    • modelStackWithThreeMainThings
    • modelStackWithParam
    • output
    • outputType
    • xScroll
    • xZoom
  • Added xScroll and xZoom as variables that are passed to getPosFromSquare so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.
  • Refactored AutomationView::handleSinglePadPress into two sub-functions:
    • AutomationView::handleParameterSelection
    • AutomationView::handleParameterAutomationChange

Arranger View Class Changes:

  • Add SHIFT + SONG button shortcut to ArrangerView::ButtonAction to enter into Automation View
  • Refactor - Broke down ArrangerView::PadAction into several sub-functions so that they could be called from AutomationView:
    • ArrangerView::handleStatusPadAction
    • ArrangerView::handleAuditionPadAction
    • ArrangerView::handleEditPadAction
  • In ArrangerView::ClearArrangement, Disable clearing of Automation while in Arranger View if FlashStorage::automationClear is enabled
  • In ArrangerView::HorizontalEncoderAction, Disable shifting of Automation horizontally while in Arranger View if FlashStorage::automationShift is enabled
  • Add UI* ui parameter to ArrangerView::handleAuditionPadAction, ArrangerView::auditionPadAction, ArrangerView::graphicsRoutine, and ArrangerView::handleStatusPadAction so that these functions could be called from AutomationView and be able to re-render the AutomationView UI.

Instrument Clip View Class Changes

  • Adjust InstrumentClipView::copyAutomation and InstrumentClipView::pasteAutomation so that these functions are able to handle copying / pasting automation in the Arranger Automation Overview. To do so, the navSysId parameter was added to these two functions so that xScroll and xZoom could be derived for the appropriate context (e.g. Clip vs Arrangement). xScroll and xZoom are then passed as parameters to getPosFromSquare so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.

View Class Changes

  • Update View::setModLedStates() and the itsTheSong boolean variable so that it correctly detects Automation Arranger View and Performance View as "song" UI's.
  • Update View::setModLedStates() to only blink the Clip button when it's in the Automation Clip View and not the Automation Arranger View.
  • Update View::setModLedStates() to continue blinking the Song button when it's in the Automation Arranger View
  • Update View::drawOutputNameFromDetails() to not render the Automation View display when the Arrangement Audition Pad is pressed in the Automation Overview. This ensures that the Preset Name and Clip Type of the Clip being auditioned is rendered on the display.
  • Refactor View::setModLedStates() to make the code much more legible by replacing complex if / else if / else logic with switches to check what the active UI Type is.

UI Class Changes

  • Added new virtual function getUIType to the Virtual class and added corresponding function to all the inheriting classes to return the appropriate UIType for that specific UI class.

Definitions_CXX Changes

  • Created a new enum UIType to define the various UI's used in the Deluge.

Midi Follow Class Changes

  • Update getSelectedClip to add Automation Arranger View to the list of UI's that are excluded from returning a Clip (e.g. to identify Automation Arranger View as a Song UI which should return Clip* clip as nullptr). This ensures that MIDI Follow is able to refresh the Automation Arranger View grid for parameters when in the Automation Editor.
  • Update MidiFollow::getModelStackWithParam to add Automation Arranger View to the list of Session UI's.
  • Update MidiFollow::getModelStackWithParamWithoutClip to only use the unpatchedGlobalParamShortcuts[xDisplay][yDisplay] array. Due to the refactoring of Param::Kind's to only associate UNPATCHED_GLOBAL with Global param contexts, this array no longer should be used: unpatchedNonGlobalParamShortcuts[xDisplay][yDisplay].
  • Update MidiFollow::getModelStackWithParamForKitClip to only use unpatchedGlobalParamShortcuts[xDisplay][yDisplay] array in the Kit Affect Entire context (for the reason explained above).
  • Update MidiFollow::getModelStackWithParamForAudioClip to only use unpatchedGlobalParamShortcuts[xDisplay][yDisplay] array in the Audio Clip context (for the reason explained above).
  • Update MidiFollow::midiCCReceived to not offer CC received for MIDI and CV clip types to ModControllableAudio::receivedCCFromMidiFollow

Mod Controllable Audio Class Changes:

  • Update ModControllableAudio::possiblyRefreshAutomationEditorGrid to add compatibility with the new Automation Arranger View
  • Update ModControllableAudio::receivedCCFromMidiFollow to remove check for MIDI or CV clip type as Midi Follow will no longer offer cc's to this function is the clip type is MIDI or CV

Param Class Changes

  • Add missing paramID's from the unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight] array to the unpatchedGlobalParamShortcuts[kDisplayWidth][kDisplayHeight] array, thus removing the need to reference the unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight] array when in a global param context (Song, Arranger, Audio Clip, Kit Affect Entire)

Menu Changes:

  • Refactor - Moved Automation Community Features submenu to Defaults under SETTINGS > DEFAULTS > UI > AUTOMATION
  • Refactor - Moved Automation Community Features boolean variables to FlashStorage::
    • FlashStorage::automationInterpolate
    • FlashStorage::automationClear
    • FlashStorage::automationShift
    • FlashStorage::automationNudgeNote
    • FlashStorage::automationDisableAuditionPadShortcuts
  • Rename Defaults Clear Clip and Shift Clip to just Clear and Shift respectively.

Performance View Class Changes:

  • Update Param::Kind used in Performance View to only use UNPATCHED_GLOBAL. UNPATCHED_SOUND was used erroneously previously. In the Performance View Song Context, only the UNPATCHED_GLOBAL param kind is relevant.

@seangoodvibes seangoodvibes marked this pull request as draft January 23, 2024 03:13
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch from 5036ede to e6ed4a0 Compare January 23, 2024 03:14
@seangoodvibes seangoodvibes added this to the Release 1.1 milestone Jan 23, 2024
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch 7 times, most recently from e381320 to 5bf4631 Compare January 23, 2024 05:14
@soymonitus
Copy link
Copy Markdown
Collaborator

BUzz sound crash when holding and turning <> inside automation view to change zoom level

@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch 7 times, most recently from 121634c to 8726993 Compare January 24, 2024 18:05
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch 11 times, most recently from 25ac46a to a8a6047 Compare January 25, 2024 02:14
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch 2 times, most recently from b660718 to 714dad6 Compare January 26, 2024 05:35
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch from dc8ce76 to 9d951df Compare January 26, 2024 21:25
@seangoodvibes seangoodvibes changed the title Feature / Automation View for Arranger [Ready For Review] Feature / Automation View for Arranger Jan 26, 2024
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch from 9d951df to f0aeef1 Compare January 26, 2024 22:52
@seangoodvibes seangoodvibes changed the title [Ready For Review] Feature / Automation View for Arranger Feature / Automation View for Arranger Jan 26, 2024
@seangoodvibes
Copy link
Copy Markdown
Collaborator Author

seangoodvibes commented Jan 27, 2024

This closes issue #997 and #530

@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch 2 times, most recently from a408141 to 58d262a Compare January 28, 2024 01:05
Copy link
Copy Markdown
Collaborator

@m-m-adams m-m-adams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just minor stuff left

Comment thread src/deluge/gui/ui/menus.cpp Outdated
Comment thread src/definitions_cxx.hpp Outdated
Comment thread src/deluge/gui/views/view.cpp Outdated
Codebase changes from this PR:
- [x] Update documentation

_Song Class Changes:_
- [x] Add Automation Arranger View variables + Added reading/writing of these variables to the Song XML
```
lastSelectedParamID
lastSelectedParamKind
lastSelectedParamShortcutX
lastSelectedParamShortcutY
lastSelectedParamArrayPosition
```

_Automation View Class Changes:_
- [x] Rename `Automation Clip View` class to `Automation View`
- [x] Add `AutomationView::onArrangerView` variable to inform the Automation View about whether it is the Arranger View version or the Clip View version.
  - Integrated `onArrangerView` variable through the Automation View so that you only perform Arranger View relevant actions. This includes:
    - Getting the modelStackWithParam for the song
    - Using currentSong to read/write from the Automation View specific variables (e.g. lastSelectedParamID)
    - Enabling cross-screen scrolling
    - Rendering the sidebar and handling sidebar actions from the Arranger View class
    - Using the graphicsRoutine from the Arranger View class
    - Determining the parameters that relevant for arranger view
    - De-activating certain button actions
    - Using the Song button to return to Arranger View
- [x] Add `SONG` button shortcut to AutomationView::ButtonAction to exit back to Arranger
- [x] Add `AutomationView::renderUndefinedArea` function to be able to render grey the section of the arrangement that cannot currently be automated
- [x] Bugfix - Clearing of all Audio Clip automation was not working in Automation View
- [x] Refactor - Broke down `AutomationView::ButtonAction` into several sub-functions:
  - `AutomationView::handleScaleButtonAction`
  - `AutomationView::handleSessionButtonAction`
  - `AutomationView::handleKeyboardButtonAction`
  - `AutomationView::handleClipButtonAction`
  - `AutomationView::handleCrossScreenButtonAction`
  - `AutomationView::handleKitButtonAction`
  - `AutomationView::handleSynthButtonAction`
  - `AutomationView::handleMidiButtonAction`
  - `AutomationView::handleCVButtonAction`
  - `AutomationView::handleHorizontalEncoderButtonAction`
  - `AutomationView::handleBackAndHorizontalEncoderButtonComboAction`
  - `AutomationView::handleSelectEncoderButtonAction`
- [x] Refactor - Broke down `AutomationView::PadAction` into several sub-functions:
  - `AutomationView::handleMutePadAction`
  - `AutomationView::handleAuditionPadAction`
  - `AutomationView::handleEditPadAction`
- [x] Updated the `globalParamsForAutomation` to only use Param::Kind `UNPATCHED_GLOBAL`
- [x] Added a few functions to handle the Zooming In/Out while in Automation View, ensuring that the navigation context (CLIP vs ARRANGEMENT) is taken into account:
  - `AutomationView::getMaxLength`
  - `AutomationView::getMaxZoom`
  - `AutomationView::getNavSysId`
- [x] Updated a number of functions to pass relevant variables around, as opposed to re-generating those variables. The relevant variables include:
  - `modelStackWithTimelineCounter`
  - `modelStackWithThreeMainThings`
  - `modelStackWithParam`
  - `output`
  - `outputType`
  - `xScroll`
  - `xZoom`
- [x] Added `xScroll` and `xZoom` as variables that are passed to `getPosFromSquare` so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.
- [x] Refactored `AutomationView::handleSinglePadPress` into two sub-functions:
  - `AutomationView::handleParameterSelection`
  - `AutomationView::handleParameterAutomationChange`

_Arranger View Class Changes:_
- [x] Add `SHIFT + SONG` button shortcut to ArrangerView::ButtonAction to enter into Automation View
- [x] Refactor - Broke down `ArrangerView::PadAction` into several sub-functions so that they could be called from AutomationView:
  - `ArrangerView::handleStatusPadAction`
  - `ArrangerView::handleAuditionPadAction`
  - `ArrangerView::handleEditPadAction`
- [x] In `ArrangerView::ClearArrangement`, Disable clearing of Automation while in Arranger View if `FlashStorage::automationClear` is enabled
- [x] In `ArrangerView::HorizontalEncoderAction`, Disable shifting of Automation horizontally while in Arranger View if `FlashStorage::automationShift` is enabled
- [x] Add `UI* ui` parameter to `ArrangerView::handleAuditionPadAction`, `ArrangerView::auditionPadAction`, `ArrangerView::graphicsRoutine`, and `ArrangerView::handleStatusPadAction` so that these functions could be called from AutomationView and be able to re-render the AutomationView UI.

_Instrument Clip View Class Changes_
- [x] Adjust `InstrumentClipView::copyAutomation` and `InstrumentClipView::pasteAutomation` so that these functions are able to handle copying / pasting automation in the Arranger Automation Overview. To do so, the `navSysId` parameter was added to these two functions so that `xScroll` and `xZoom` could be derived for the appropriate context (e.g. Clip vs Arrangement). xScroll and xZoom are then passed as parameters to `getPosFromSquare` so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.

_View Class Changes_
- [x] Update `View::setModLedStates()` and the `itsTheSong` boolean variable so that it correctly detects Automation Arranger View and Performance View as "song" UI's.
- [x] Update `View::setModLedStates()` to only blink the Clip button when it's in the Automation Clip View and not the Automation Arranger View.
- [x] Update `View::setModLedStates()` to continue blinking the Song button when it's in the Automation Arranger View
- [x] Update `View::drawOutputNameFromDetails()` to not render the Automation View display when the Arrangement Audition Pad is pressed in the Automation Overview. This ensures that the Preset Name and Clip Type of the Clip being auditioned is rendered on the display.

_Midi Follow Class Changes_
- [x] Update `getSelectedClip` to add Automation Arranger View to the list of UI's that are excluded from returning a Clip (e.g. to identify Automation Arranger View as a Song UI which should return Clip* clip as nullptr). This ensures that MIDI Follow is able to refresh the Automation Arranger View grid for parameters when in the Automation Editor.
- [x] Update `MidiFollow::getModelStackWithParam` to add Automation Arranger View to the list of Session UI's.
- [x] Update `MidiFollow::getModelStackWithParamWithoutClip` to only use the `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array. Due to the refactoring of Param::Kind's to only associate UNPATCHED_GLOBAL with Global param contexts, this array no longer should be used: `unpatchedNonGlobalParamShortcuts[xDisplay][yDisplay].`
- [x] Update `MidiFollow::getModelStackWithParamForKitClip` to only use `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array in the Kit Affect Entire context (for the reason explained above).
- [x] Update `MidiFollow::getModelStackWithParamForAudioClip` to only use `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array in the Audio Clip context (for the reason explained above).

_Mod Controllable Audio Class Changes:_
- [x] Update `ModControllableAudio::possiblyRefreshAutomationEditorGrid` to add compatibility with the new Automation Arranger View
- [x] Bugfix - Update `ModControllableAudio::receivedCCFromMidiFollow` to only check for MIDI or CV clip type of the Clip pointer is non-null

_Param Class Changes_
- [x] Add missing paramID's from the `unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array to the `unpatchedGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array, thus removing the need to reference the `unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array when in a global param context (Song, Arranger, Audio Clip, Kit Affect Entire)

_Menu Changes:_
- [x] Refactor - Moved Automation Community Features submenu to Defaults under `SETTINGS > DEFAULTS > UI > AUTOMATION`
- [x] Refactor - Moved Automation Community Features boolean variables to `FlashStorage::`
   - `FlashStorage::automationInterpolate`
   - `FlashStorage::automationClear`
   - `FlashStorage::automationShift`
   - `FlashStorage::automationNudgeNote`
   - `FlashStorage::automationDisableAuditionPadShortcuts`
- [x] Rename Defaults `Clear Clip` and `Shift Clip` to just `Clear` and `Shift` respectively.

_Performance View Class Changes:_
- [x] Update `Param::Kind` used in Performance View to only use `UNPATCHED_GLOBAL`. `UNPATCHED_SOUND` was used erroneously previously. In the Performance View Song Context, only the `UNPATCHED_GLOBAL` param kind is relevant.
Update MidiFollow::midiCCReceived
Update ModControllable::receivedCCFromMidiFollow

Don't offer CC to ModControllable::receivedCCFromMidiFollow if clip type is MIDI or CV

Remove check for MIDI or CV clip from ModControllable::receivedCCFromMidiFollow as it's no longer required
Refactored this function to make the code much more legible by replacing complex if / else if / else logic with switches to check what the active UI Type is.

Created a new enum UIType to define the various UI's used in the Deluge.

Added new virtual function getUIType to the Virtual class and added corresponding function to all the inheriting classes to return the appropriate UIType for that specific UI class.
Updated UIType to consolidate the three Automation UI Types into just UIType::AUTOMATION_VIEW

Added UISubType to be used with UIType::AUTOMATION_VIEW to identify the type of Automation View we're in

New function added to Automation View class - getUISubType to return the correct UISubType.

Refactored getSelectedClip in midi_follow.cpp to break the code into switch logic so that it is easier to follow
… Type where appropriate

Restricted automation view class usage based on context - e.g. for Kit class, midi drum, and non audio drum, it should only be involving the automation view class if the UI Sub Type is INSTRUMENT

in ModControllableAudio::offerCCToLearnedParams, I excluded the Automation View from refreshing if the View Type is Arranger.
@seangoodvibes seangoodvibes force-pushed the Feature-/-Automation-View-for-Arranger branch from 58d262a to a22edce Compare January 28, 2024 17:56
Change UISubType to AutomationSubType
Moved Automation Menu out from the UI Menu to a Top Level Menu
Updated menu path for new automation default menu
@m-m-adams m-m-adams added this pull request to the merge queue Jan 28, 2024
Merged via the queue into SynthstromAudible:community with commit 646b8c8 Jan 28, 2024
tastycode pushed a commit to tastycode/DelugeFirmware that referenced this pull request Jul 3, 2024
* Automation Arranger View

Codebase changes from this PR:
- [x] Update documentation

_Song Class Changes:_
- [x] Add Automation Arranger View variables + Added reading/writing of these variables to the Song XML
```
lastSelectedParamID
lastSelectedParamKind
lastSelectedParamShortcutX
lastSelectedParamShortcutY
lastSelectedParamArrayPosition
```

_Automation View Class Changes:_
- [x] Rename `Automation Clip View` class to `Automation View`
- [x] Add `AutomationView::onArrangerView` variable to inform the Automation View about whether it is the Arranger View version or the Clip View version.
  - Integrated `onArrangerView` variable through the Automation View so that you only perform Arranger View relevant actions. This includes:
    - Getting the modelStackWithParam for the song
    - Using currentSong to read/write from the Automation View specific variables (e.g. lastSelectedParamID)
    - Enabling cross-screen scrolling
    - Rendering the sidebar and handling sidebar actions from the Arranger View class
    - Using the graphicsRoutine from the Arranger View class
    - Determining the parameters that relevant for arranger view
    - De-activating certain button actions
    - Using the Song button to return to Arranger View
- [x] Add `SONG` button shortcut to AutomationView::ButtonAction to exit back to Arranger
- [x] Add `AutomationView::renderUndefinedArea` function to be able to render grey the section of the arrangement that cannot currently be automated
- [x] Bugfix - Clearing of all Audio Clip automation was not working in Automation View
- [x] Refactor - Broke down `AutomationView::ButtonAction` into several sub-functions:
  - `AutomationView::handleScaleButtonAction`
  - `AutomationView::handleSessionButtonAction`
  - `AutomationView::handleKeyboardButtonAction`
  - `AutomationView::handleClipButtonAction`
  - `AutomationView::handleCrossScreenButtonAction`
  - `AutomationView::handleKitButtonAction`
  - `AutomationView::handleSynthButtonAction`
  - `AutomationView::handleMidiButtonAction`
  - `AutomationView::handleCVButtonAction`
  - `AutomationView::handleHorizontalEncoderButtonAction`
  - `AutomationView::handleBackAndHorizontalEncoderButtonComboAction`
  - `AutomationView::handleSelectEncoderButtonAction`
- [x] Refactor - Broke down `AutomationView::PadAction` into several sub-functions:
  - `AutomationView::handleMutePadAction`
  - `AutomationView::handleAuditionPadAction`
  - `AutomationView::handleEditPadAction`
- [x] Updated the `globalParamsForAutomation` to only use Param::Kind `UNPATCHED_GLOBAL`
- [x] Added a few functions to handle the Zooming In/Out while in Automation View, ensuring that the navigation context (CLIP vs ARRANGEMENT) is taken into account:
  - `AutomationView::getMaxLength`
  - `AutomationView::getMaxZoom`
  - `AutomationView::getNavSysId`
- [x] Updated a number of functions to pass relevant variables around, as opposed to re-generating those variables. The relevant variables include:
  - `modelStackWithTimelineCounter`
  - `modelStackWithThreeMainThings`
  - `modelStackWithParam`
  - `output`
  - `outputType`
  - `xScroll`
  - `xZoom`
- [x] Added `xScroll` and `xZoom` as variables that are passed to `getPosFromSquare` so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.
- [x] Refactored `AutomationView::handleSinglePadPress` into two sub-functions:
  - `AutomationView::handleParameterSelection`
  - `AutomationView::handleParameterAutomationChange`

_Arranger View Class Changes:_
- [x] Add `SHIFT + SONG` button shortcut to ArrangerView::ButtonAction to enter into Automation View
- [x] Refactor - Broke down `ArrangerView::PadAction` into several sub-functions so that they could be called from AutomationView:
  - `ArrangerView::handleStatusPadAction`
  - `ArrangerView::handleAuditionPadAction`
  - `ArrangerView::handleEditPadAction`
- [x] In `ArrangerView::ClearArrangement`, Disable clearing of Automation while in Arranger View if `FlashStorage::automationClear` is enabled
- [x] In `ArrangerView::HorizontalEncoderAction`, Disable shifting of Automation horizontally while in Arranger View if `FlashStorage::automationShift` is enabled
- [x] Add `UI* ui` parameter to `ArrangerView::handleAuditionPadAction`, `ArrangerView::auditionPadAction`, `ArrangerView::graphicsRoutine`, and `ArrangerView::handleStatusPadAction` so that these functions could be called from AutomationView and be able to re-render the AutomationView UI.

_Instrument Clip View Class Changes_
- [x] Adjust `InstrumentClipView::copyAutomation` and `InstrumentClipView::pasteAutomation` so that these functions are able to handle copying / pasting automation in the Arranger Automation Overview. To do so, the `navSysId` parameter was added to these two functions so that `xScroll` and `xZoom` could be derived for the appropriate context (e.g. Clip vs Arrangement). xScroll and xZoom are then passed as parameters to `getPosFromSquare` so that you can get the accurate node position for automation purposes based on the view's current scroll and zoom values.

_View Class Changes_
- [x] Update `View::setModLedStates()` and the `itsTheSong` boolean variable so that it correctly detects Automation Arranger View and Performance View as "song" UI's.
- [x] Update `View::setModLedStates()` to only blink the Clip button when it's in the Automation Clip View and not the Automation Arranger View.
- [x] Update `View::setModLedStates()` to continue blinking the Song button when it's in the Automation Arranger View
- [x] Update `View::drawOutputNameFromDetails()` to not render the Automation View display when the Arrangement Audition Pad is pressed in the Automation Overview. This ensures that the Preset Name and Clip Type of the Clip being auditioned is rendered on the display.

_Midi Follow Class Changes_
- [x] Update `getSelectedClip` to add Automation Arranger View to the list of UI's that are excluded from returning a Clip (e.g. to identify Automation Arranger View as a Song UI which should return Clip* clip as nullptr). This ensures that MIDI Follow is able to refresh the Automation Arranger View grid for parameters when in the Automation Editor.
- [x] Update `MidiFollow::getModelStackWithParam` to add Automation Arranger View to the list of Session UI's.
- [x] Update `MidiFollow::getModelStackWithParamWithoutClip` to only use the `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array. Due to the refactoring of Param::Kind's to only associate UNPATCHED_GLOBAL with Global param contexts, this array no longer should be used: `unpatchedNonGlobalParamShortcuts[xDisplay][yDisplay].`
- [x] Update `MidiFollow::getModelStackWithParamForKitClip` to only use `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array in the Kit Affect Entire context (for the reason explained above).
- [x] Update `MidiFollow::getModelStackWithParamForAudioClip` to only use `unpatchedGlobalParamShortcuts[xDisplay][yDisplay]` array in the Audio Clip context (for the reason explained above).

_Mod Controllable Audio Class Changes:_
- [x] Update `ModControllableAudio::possiblyRefreshAutomationEditorGrid` to add compatibility with the new Automation Arranger View
- [x] Bugfix - Update `ModControllableAudio::receivedCCFromMidiFollow` to only check for MIDI or CV clip type of the Clip pointer is non-null

_Param Class Changes_
- [x] Add missing paramID's from the `unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array to the `unpatchedGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array, thus removing the need to reference the `unpatchedNonGlobalParamShortcuts[kDisplayWidth][kDisplayHeight]` array when in a global param context (Song, Arranger, Audio Clip, Kit Affect Entire)

_Menu Changes:_
- [x] Refactor - Moved Automation Community Features submenu to Defaults under `SETTINGS > DEFAULTS > UI > AUTOMATION`
- [x] Refactor - Moved Automation Community Features boolean variables to `FlashStorage::`
   - `FlashStorage::automationInterpolate`
   - `FlashStorage::automationClear`
   - `FlashStorage::automationShift`
   - `FlashStorage::automationNudgeNote`
   - `FlashStorage::automationDisableAuditionPadShortcuts`
- [x] Rename Defaults `Clear Clip` and `Shift Clip` to just `Clear` and `Shift` respectively.

_Performance View Class Changes:_
- [x] Update `Param::Kind` used in Performance View to only use `UNPATCHED_GLOBAL`. `UNPATCHED_SOUND` was used erroneously previously. In the Performance View Song Context, only the `UNPATCHED_GLOBAL` param kind is relevant.

* Update MidiFollow CC handling for MIDI and CV

Update MidiFollow::midiCCReceived
Update ModControllable::receivedCCFromMidiFollow

Don't offer CC to ModControllable::receivedCCFromMidiFollow if clip type is MIDI or CV

Remove check for MIDI or CV clip from ModControllable::receivedCCFromMidiFollow as it's no longer required

* Refactor View::setModLedStates

Refactored this function to make the code much more legible by replacing complex if / else if / else logic with switches to check what the active UI Type is.

Created a new enum UIType to define the various UI's used in the Deluge.

Added new virtual function getUIType to the Virtual class and added corresponding function to all the inheriting classes to return the appropriate UIType for that specific UI class.

* Update UIType, Add UISubType, Refactor getSelectedClip

Updated UIType to consolidate the three Automation UI Types into just UIType::AUTOMATION_VIEW

Added UISubType to be used with UIType::AUTOMATION_VIEW to identify the type of Automation View we're in

New function added to Automation View class - getUISubType to return the correct UISubType.

Refactored getSelectedClip in midi_follow.cpp to break the code into switch logic so that it is easier to follow

* Address feedback - Restrict automation view class usage to Instrument Type where appropriate

Restricted automation view class usage based on context - e.g. for Kit class, midi drum, and non audio drum, it should only be involving the automation view class if the UI Sub Type is INSTRUMENT

in ModControllableAudio::offerCCToLearnedParams, I excluded the Automation View from refreshing if the View Type is Arranger.

* Minor corrections

* Update per feedback

Change UISubType to AutomationSubType

* Change Default Automation Menu to Top Level Default Menu

Moved Automation Menu out from the UI Menu to a Top Level Menu

* Fix merge conflict error

* Fix merger error

* Update documentation

Updated menu path for new automation default menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants