Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Feature: Midi Follow Mode with Midi Feedback and Midi Learning View #781

Closed

Conversation

seangoodvibes
Copy link
Collaborator

@seangoodvibes seangoodvibes commented Dec 2, 2023

Midi Follow Mode with Midi Feedback and Midi Learning View

Screen Shot 2023-12-02 at 4 07 59 PM

Description:

Master midi follow mode whereby after enabling the mode, you set a master midi follow channel for synth clips, kit clips, and for parameters and all midi (notes + cc’s) received on the channel relevant for the active context will be directed to control the active view (e.g. arranger view, song view, audio clip view, instrument clip view).

  • For example, Midi Notes received on the Synth Channel will send notes to the active Synth clip. Midi CC's received on the Param Channel will send cc's to control the params of the active view.

Comes with a midi feedback mode to send updated parameter values on the midi follow channel for learned midi cc's. Feedback is sent whenever you change context on the deluge and whenever parameter values for the active context are changed.

Comes with a midi learning view to make learning and managing your midi cc's to the deluge's parameters a breeze.

Simple summary: Set your channel(s), set your Midi Controller(s) to the same channel(s), set a root note for your kits, learn your Midi CC's once and play and control the deluge instruments and parameters with ease!

No more re-learning your Midi controllers every time you start a new song, add new clips or change instrument presets.

  • Note: Your existing midi learnings will remain untouched and can be used together with the master midi follow mode.

**Turn Follow Mode On, Set Master Midi Follow Channel(s) and Learn Devices, Set Kit Root Note, Enable/Disable Pop-ups and Enable/Disable Midi Feedback **

To turn configure the various Midi Follow Mode settings, enter the settings menu and go to the sub menu for Midi -> Midi-Follow

  • In the Midi-Follow > Follow submenu, set this feature to Enabled or Disabled
  • In the Midi-Follow > Channel submenu, set the channel between 1 and 16 for Synths, Kits and Params.
    • For each midi follow channel type (Synth, Kit, Midi), you can use the learn button to learn a device to that channel type and set the channel. E.g. for a synth, hold learn and press a key on your midi controller to learn the device and set the channel. That channel type will be restricted to that device and channel combination if you have input differentiation enabled.
  • In the Midi-Follow > Kit Root Note submenu, set the root note for kits between 1 and 127 in order to map Midi Notes received to Kit rows. The root note corresponds to the bottom row in a Kit.
  • In the Midi-Follow > Display Param submenu, enable or disable param pop-ups
  • In the Midi-Follow > Feedback > Feedback submenu, enable or disable midi follow feedback
  • In the Midi-Follow > Feedback > Automation Feedback submenu, enabled or disable midi follow feedback for automated parameters and set the rate at which feedback for automated parameters is sent
  • In the Midi-Follow > Feedback > Filter Responses submenu, enable or disable filtering of responses received within 1 second of sending a midi feedback value update.
Screen Shot 2023-12-02 at 7 13 16 PM

Notes:

For notes, the functionality is simple: notes received on the master midi channel will play the instrument in the active clip (e.g. a synth, or all kit rows).

  • Note 1: You can play a synth or kit clip without entering the clip from arranger or song view. Simply press and hold the clip in arranger or song view to preview the clip (as you would to change the parameters of that clip with the gold encoders) and then send notes from your midi controller.

  • Note 2: For Kit's, the bottom Kit row is mapped by default to the root note C1 (note # 36). All kit rows above are mapped to note's incrementally (e.g. 36, 37, 38, etc.). This kit root note # is configurable (from 0 to 127) through the Kit Root Note submenu.

CC's:

For CC's, you need to learn your midi CC's to the parameters you want to control. You do this by entering a Midi Learning View accessible from the Song View by pressing Learn + Midi. You also exit this view by pressing Learn + Midi.

In the Midi Learning View, the shortcut pads for all the Parameters that can be controlled on the deluge are illuminated. By default, no CC's are learned and all shortcut pads are illuminated dimly.

In order to learn a Midi CC to a Parameter, press and hold on the shortcut pad for the parameter and send a Midi CC with your controller (e.g. turn knob, move fader up/down). The shortcut pad will now be illuminated white indicating that that parameter has been learned. The display will also indicate the midi CC that the parameter has been learned to.

A parameter can only be learned to one midi CC. Conversely, a midi CC can be learned to multiple parameters.

You can get an overview of what parameters a midi CC has been mapped to by holding the Midi button and turning Midi CC on your controller. The parameter shortcuts mapped to that midi CC will be illuminated green.

Screen Shot 2023-12-02 at 4 25 29 PM

After you have finished learning your Midi CC's, simply exit Midi Learning View (with Learn + Midi) and your midi CC's will now control the parameters you have learned. The parameters are controlled only in the current context.

  • So if you learn filter for example, while in song view it will only control the song’s filter. If you enter a specific synth clip, it will only control that synths filter, if you are in a kit clip it will either control the entire kit or a specific row in that clip (depending on whether you have affect entire enabled or not)
  • In other words it checks what context you’re in and controls the parameters of that context.

Note: You can control the parameters of a synth or kit clip without entering the clip from arranger or song view. Simply press and hold the clip in arranger or song view to preview the clip (as you would to change the parameters of that clip with the gold encoders) and then send midi cc's from your midi controller.

Unlearn Parameters

You can unlearn all parameters by pressing down on the Horizontal encoder (<>) and pressing the back button

You can unlearn a single parameter by pressing down on Learn and then pressing on a parameter shortcut pad

Save your Midi CC mappings

You can save your Midi CC mappings for Midi Follow Mode while in Midi Learning View by pressing the save button. Likewise, pressing the load button will load your saved Midi CC mappings.

The save button will blink red whenever there are unsaved changes (as compared to the previous loaded defaults from MIDIFollow.XML

Midi CC mappings for Midi Follow Mode are saved to the root of your SD card in an XML file called MIDIFollow.XML

Within MIDIFollow.XML, all Parameters that can mapped to a Midi CC are listed. The Midi CC value is enclosed between a Parameter XML tag - e.g. <lpfFrequency>49</lpfFrequency> indicates that Midi CC is mapped to the LPF Frequency parameter. Conversely when a value of 255 is entered (e.g. <hpfFrequency>255</hpfFrequency>) it indicates that no Midi CC value has been learned to that parameter as part of Midi Learning View.

You can manually edit the MIDIFollow.XML to enter your Midi CC mappings to each Parameter.

The defaults from MIDIFollow.XML are loaded automatically when you start the Deluge so you can begin controlling the deluge with your MIDI controller right away without any need to enter a menu or Midi Learning View.

Screen Shot 2023-12-02 at 4 34 59 PM

Display Parameter Names and Values on Screen

Note: Midi pop-up's can be disabled in the Midi Follow Display Param submenu.

For learned Midi CC's, I have added a pop-up on the display whenever Midi CC's are received to indicate the name of the parameter that is being controlled by that Midi CC and the current value being set for that parameter.

Screen Shot 2023-12-04 at 2 32 25 AM

Note: if the Midi CC being received for a Parameter that cannot be controlled in the current context (e.g. trying to control Attack while in Song View), the pop-up message will say "Can't Control: <Parameter Name".

Screen Shot 2023-12-04 at 2 32 03 AM

Re-cap of functionality

  1. Added new Midi submenu for Midi-Follow where you can:
  • Enable or Disable Midi Follow Mode
  • Set the Midi Follow Channel for Synth Notes and Learn Device
  • Set the Midi Follow Channel for Kit Notes and Learn Device
  • Set the Midi Follow Channel for Param CC's and Learn Device
  • Set the Midi Follow Root Note for Kits
  • Enable or Disable Midi Follow Param Pop-up's
  • Enable or Disable Midi Follow Feedback
  • Enable or Disable Midi Follow Feedback for Automated Parameters and set the Midi Feedback Update Rate
  • Enable or Disable Midi Follow Feedback Filtering of Midi CC responses received within 1 second of sending feedback
  1. Added new Midi Learning View accessible with Learn + Midi from Song View where you can learn Midi CC's to control Parameters on the deluge
  2. When Midi Follow Mode is enabled, a Midi Follow Channel has been set, and you have learned your Midi CC's, your external controller's Notes and Midi CC's will be automatically directed to control the Notes of the Active Instrument (e.g. Synth, Kit, Midi, CV) or the Parameters of the Active View (e.g. Song View, Arranger View, Audio Clip View, Instrument Clip View).
    • For each midi follow channel type (Synth, Kit, Midi), you can use the learn button to learn a device to that channel type and set the channel. E.g. for a synth, hold learn and press a key on your midi controller to learn the device and set the channel. That channel type will be restricted to that device and channel combination if you have input differentiation enabled.
  3. By default, the root note for kit's is C1 for the bottom kit row but this can be configured in the Midi Follow menu.
  4. Pop-up's are shown on the display for learned Midi CC's to show the name of the parameter being controlled and value being set for the parameter. This can be disabled in the menu.
  5. Midi feedback is sent for learned CC's when the active context changes or you change the value of a learned parameter on the deluge (e.g. using mod encoders or select encoder if you're int he menu). Midi feedback can be disabled in the menu.
  6. Midi feedback for automated parameters can also be sent and can be enabled or disabled in the midi feedback sub menu. When enabled, you choose between 3 speeds at which to send feedback for automated parameters: Low (500 ms), Medium (150 ms), High (40 ms). Sending automated parameter feedback can be taxing on the deluge midi output system, so depending on the amount of automation you do, you may want to adjust the speed (e.g. slow it down) to not affect the performance of the Deluge.
  7. Midi feedback can cause an undesirable result with certain applications when the application responds back to the Deluge after the Deluge has sent it an updated value (Loopy Pro and Drambo on iPad are known to do this). This can cause lag in the deluge and potential feedback loops. To handle this, a toggable filter was added which ignores messages received for the same ccNumber within 1 second of sending a midi feedback update. If the application receiving the midi feedback update does not send responses back to the Deluge, then this setting should be set to Disabled in the Midi Feedback Filter Responses sub menu.

Midi Learning View shortcuts

  • In Song View, Midi + Learn to enter Midi Learning View

In Midi Learning View:

  • Midi + Learn to exit Midi Learning View

  • Press down on Select Encoder to enter the Midi-Follow settings menu to enable/disable Midi Follow Mode and/or set the Master Follow Channel. This menu is also accessible as a Midi submenu through the regular Shift + Select Encoder settings menu.

  • Press down on a parameter shortcut pad to see the name on the parameter and its learning status. On OLED you will see the parameter name, whether it has been learned and to which MIDI CC it has been learned to.

Screen Shot 2023-12-02 at 5 00 28 PM
  • Press down on a parameter shortcut pad and send Midi CC to learn Midi CC to that parameter. Note: Midi CC must be received on the Master Follow Channel in order to be learned. If it is not on the Master Follow Channel, a pop-up message will indicate an error that it cannot be learned and tell you what channel it is on.

IMG_7246

  • Hold Midi + send CC's from learned control to see the parameters that CC has been learned to highlighted green

  • <> + back to clear all learned Midi CC's from parameters

  • Learn + parameter shortcut pad to unlearn Midi CC from that specific parameter

  • Load to load saved defaults from MIDIFollow.XML

  • Save to save defaults to MIDIFollow.XML

Reduced performance session view code to barebones components of session view so that the view could be built up from there
- Assigned params to each column on the grid
- Pressing a pad in a column changes the value and releasing and releasing the pad sets the value back to previous value before pad was pressed
- Rendered colours on the grid
- Rendered pressed pad a blur colour
- Updated param assignments to column

- Assigned colours to columns (but the blur and full colour aren't exactly right) - tail colour is good

- Some bugs with values - I think it's accidentally changing the original value in some cases

- Pitch and Portamento don't work (should probably remove / replace - maybe added EQ instead)

- Need to get stutter trigger working from pad press
- Fixed bug that accidentally changed original param value
- Fixed bug that de-selected column if you pressed more than one pad
- Shifted LPF and HPF left and inserted EQ Bass and Treble in place of Pitch and Portamento
- Attempted to get stutter working (not working yet)
- Fixed colour shading of pressed pad (changed it from blur colour to white)
- Removed blurColour constant array definition
Stutter is working now!
- Updated rendering of pads when entering performance view
- Updated affect entire selection when entering performance view
- Updated display to render "Performance Mode" when entering performance view
- Removed other functions that remained from session view that are not needed
- Distinguished between short and long presses in order to enable locking FX
- Add tracking of what pads are locked
- Updated pad rendering to not be lit "bright" when column is locked and not currently being held

Some bugs identified (to be fixed):
- can't quickly switch performance mode locks
- need to make sure to exit stuttering if stuttering lock is enabled and you are leaving the performance view
Activated keyboard button LED when in performance mode

bug to fix:
- disabling locks when exiting performance mode
- Fixed bug which wouldnt allow quick switching of held fx pads in a column.

- Fixed bug which wouldnt allow quick toggling of a single fx pad in a column
Fixed bug where if playback cursor is running in session view and you switch to performance view that the cursor gets stuck on the grid.

Simple fix is to just clear the playhead.
- Fixed a bug where stutter didn't disable and re-enable properly if you were doing quick stutter switches in the stutter column
- Cleaned up the code.
 - Removed excess functions and variables not used.
 - Re-ordered functions to group them together in a more meaningful order
 - Removed unnecessary includes
Refactored some of the display code to have less duplication

Renamed display functions to be more descriptive.

Added some code documentation.
Fixed a bug whereby stutter was going back to previous value when you were using the quantized stutter community feature
Broke padAction into two sub-functions: padPressAction and padReleaseAction
clean up of padPressAction and padReleaseAction functions so that they can be called to reset/erase grid.
- Added press <> + back combo to clear changed values and reset them back to original values before changes were made
- Renamed "Performance Mode" to "Performance View" on the display
Just a quick function name change reference that was forgotten
<> + back now clears stutter also
Added code to enable you to leave performance view when stutter is enabled by first disabling stutter
Added ability to load and save default FX values for each column and row in the deluge grid by using the Load and Save buttons.

Still work to do to clean up the code and load defaults at run-time.

Also considering a UX for setting defaults directly on the deluge.
Refactoring of code to read/write default FX values from PerformanceView.XML

Implemented changes to XML structure per advice from dev team.
- Some updates to rendering of display

- Started work on editing mode for performance view
- Added editing mode so you can edit default values assigned to each pad on the grid
- Enter/Exit Editing mode by pressing Select encoder
- In Editing Mode, press and hold a pad or select the pad (white) and turn select encoder to adjust value
- When changes have been made, the Save button will flash to indicate unsaved changes.
- Pressing Load/Save will stop save button from flashing
- Load button loads defaults previously saved
- Save button saves your changes
- Defaults are loaded when the view is opened

- Also disabled Horizontal and Vertical encoder button actions
- Also disabled Back button action as undo doesn't work well in this view (at the moment)
Accidentally removed ability to clear performance effects using the horizontal encoder button and back button in previous commit

This commit fixes that
Fixed issue where select encoder might reduce knobPos < 0 or increase knobPos > 128
Fixed bug where you couldn't disable stutter after triggering it with stutter pads
Changed editing mode shortcut from pressing on select encoder to learn / input button
Menu for follow channel's now shows:

- Differentiation status in the form of guidance as to whether you can use any device or should use the specific device learnt

- The name of the device learnt

- The follow channel
Allow midi follow and related mpe info (cc's, pitch bend, after touch) to keep sending notes to the last selected clip
Moved the processing code out of playback handler and song.cpp and into dedicated functions inside midiSessionView
Just to make sure we're targetting the right context
Reduce bin size by consolidating menu classes of the same toggle bool type
Update param description from phase width to pulse width
- Disable control of Portamento in Kit Rows
- Disable control of Portamento and Arp Gate in Kit Affect Entire
Added two functions to modelStackWithThreeMainThings class:

1) getUnpatchedAutoParamFromId
2) getPatchedAutoParamFromId

This enabled me to factor our some duplicate code logic
@seangoodvibes seangoodvibes deleted the Midi-Mapping-View branch February 22, 2024 23:25
@seangoodvibes seangoodvibes restored the Midi-Mapping-View branch February 22, 2024 23:25
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.

None yet

5 participants