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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
024e14b
Beginnings of Performance Session View
seangoodvibes Nov 8, 2023
c3496ef
Reduced session view code to barebones
seangoodvibes Nov 8, 2023
918d897
Work In Progress
seangoodvibes Nov 9, 2023
1c77aa3
Working with bugs
seangoodvibes Nov 9, 2023
7457f75
More bug fixes + swapped params
seangoodvibes Nov 10, 2023
e8ad1bd
Fixed Stutter
seangoodvibes Nov 10, 2023
ec8e23c
Updated Rendering
seangoodvibes Nov 10, 2023
8d0a890
Implement value locks
seangoodvibes Nov 10, 2023
4042480
Updated keyboard button LED
seangoodvibes Nov 10, 2023
53ba20c
Fixed quick switching bugs
seangoodvibes Nov 10, 2023
509e7f6
Fixed frozen playback cursor bug
seangoodvibes Nov 10, 2023
5625a42
Stutter Bug Fix + Code Cleanup
seangoodvibes Nov 11, 2023
174eaa7
dbt format
seangoodvibes Nov 11, 2023
bcc9ef2
Additional code cleanup for display
seangoodvibes Nov 11, 2023
448ee7b
Fixed quantized stutter bug
seangoodvibes Nov 12, 2023
83d824b
Refactored padAction
seangoodvibes Nov 12, 2023
3797764
cleanup padAction
seangoodvibes Nov 12, 2023
104b7c1
added ability to clear changed values
seangoodvibes Nov 13, 2023
3b0e46a
Forgot a change
seangoodvibes Nov 13, 2023
c0f9eea
Added ability to clear stutter
seangoodvibes Nov 13, 2023
6d55803
Disable Stutter on Exit of Performance View
seangoodvibes Nov 13, 2023
c838464
Added ability to load and save defaults
seangoodvibes Nov 13, 2023
59fa8b9
Cleaned up the default writing/loading code
seangoodvibes Nov 13, 2023
6380dfb
dbt format
seangoodvibes Nov 13, 2023
b60ea02
Display updates & Editing mode setup
seangoodvibes Nov 13, 2023
3a1696f
Added Performance View Editing Mode
seangoodvibes Nov 14, 2023
fcde60e
Fixed <> + back clear bug
seangoodvibes Nov 14, 2023
a0545dd
Fixed issue with Select Encoder in Editing Mode
seangoodvibes Nov 14, 2023
882a9d2
Fixed stutter bug
seangoodvibes Nov 14, 2023
eb6b150
Changed editing mode shortcut
seangoodvibes Nov 14, 2023
03741d3
Revert "Changed editing mode shortcut"
seangoodvibes Nov 14, 2023
ca1bce2
Work in Progress - using SoundEditor
seangoodvibes Nov 14, 2023
232bde8
Some more improvements
seangoodvibes Nov 15, 2023
ab38442
Whole bunch of changes!
seangoodvibes Nov 15, 2023
0ac29bb
Merge branch 'community' into feature/performance-session-view
seangoodvibes Nov 15, 2023
c140c8e
Expanded Menu, Re-sorted MOD-FX
seangoodvibes Nov 15, 2023
8f3f4eb
Whole bunch of changes!
seangoodvibes Nov 16, 2023
f13a04a
Load & Write Param Name From To XML
seangoodvibes Nov 16, 2023
fdd3c0f
Updated value popup and view display calculation and logic
seangoodvibes Nov 17, 2023
270fb7b
Undid sticky shift changes
seangoodvibes Nov 17, 2023
c28b971
Undo changes to arranger view
seangoodvibes Nov 17, 2023
bd88134
Delete .vscode/settings.json
seangoodvibes Nov 17, 2023
168c3ea
Revert "Delete .vscode/settings.json"
seangoodvibes Nov 17, 2023
bff7f65
Updated shortcut to get into performance view
seangoodvibes Nov 17, 2023
f0574d2
Added menu shortcuts to performance view
seangoodvibes Nov 17, 2023
1d35570
dbt format
seangoodvibes Nov 17, 2023
6110cdc
Cleaned up mod encoder display popup code
seangoodvibes Nov 17, 2023
c458656
More refactored of mod encoder display popup
seangoodvibes Nov 17, 2023
5f8b08f
Fixed display bug
seangoodvibes Nov 17, 2023
3439f8c
Fixed quantized stutter bug
seangoodvibes Nov 17, 2023
8c28388
Draft - WIP Param Editor
seangoodvibes Nov 17, 2023
eac0b0e
Introducing Param Editing Mode + Other Bug Fixes
seangoodvibes Nov 18, 2023
e2a2685
Revert quantized stutter change
seangoodvibes Nov 18, 2023
d8d93f0
Fixed Quantized Stutter + Hold Press Time Adjustment
seangoodvibes Nov 18, 2023
c55df26
Mapped default colours to parameters
seangoodvibes Nov 19, 2023
e56709f
Merge branch 'community' into feature/performance-session-view
seangoodvibes Nov 19, 2023
f325ec5
Stutter Fix + Fix for Assigning FX
seangoodvibes Nov 19, 2023
f40ba4a
Added loading of hold status
seangoodvibes Nov 20, 2023
6e37be3
Added saving of held statuses
seangoodvibes Nov 20, 2023
7f5f137
Refactor XML strings + Re-enabled undo
seangoodvibes Nov 20, 2023
660cb38
Remove Stutter Hold + Other Hold Bug Fixes
seangoodvibes Nov 20, 2023
928e487
pad action refactoring
seangoodvibes Nov 20, 2023
3078047
More code cleanup and documentation
seangoodvibes Nov 20, 2023
39853f4
Refactoring of FX Column Press Variables
seangoodvibes Nov 21, 2023
e5600a2
Added Undo-Redo + Some Refactoring
seangoodvibes Nov 22, 2023
fe61202
Merge branch 'community' into feature/performance-session-view
seangoodvibes Nov 25, 2023
44ca12b
More WIP undo/redo/save changes
seangoodvibes Nov 25, 2023
64f355f
Merge branch 'feature/performance-session-view' of https://github.com…
seangoodvibes Nov 25, 2023
5172f1c
Bug fixes: change logging
seangoodvibes Nov 25, 2023
a793f03
Quick fix - not backing up layout for logging
seangoodvibes Nov 25, 2023
d4c954e
Updated editing mode menu
seangoodvibes Nov 25, 2023
e32d427
Added Volume and Pan to song level FX menu
seangoodvibes Nov 25, 2023
d5c3068
Stutter Bug Fix
seangoodvibes Nov 26, 2023
003a7e0
Stutter bug fix
seangoodvibes Nov 26, 2023
2f5d1ff
Undo/Redo bug fixes
seangoodvibes Nov 26, 2023
0be7634
Merge branch 'community' into feature/performance-session-view
seangoodvibes Nov 26, 2023
6f2fe35
Merged paramKind refactoring changes
seangoodvibes Nov 26, 2023
18a528e
Cleanup
seangoodvibes Nov 26, 2023
42eea7e
Align 7Seg Value Pop Up Right
seangoodvibes Nov 27, 2023
1173b9d
Added Performance View to Arranger View
seangoodvibes Nov 27, 2023
dda5300
Additional cleanup and bug fixes
seangoodvibes Nov 27, 2023
66b4611
Create performance_view.md
seangoodvibes Nov 27, 2023
15a83f8
Update community_features.md
seangoodvibes Nov 27, 2023
55d796e
More cleanup and documentation
seangoodvibes Nov 27, 2023
f1aafc2
Cleanup
seangoodvibes Nov 27, 2023
aa5f233
Updated documentation
seangoodvibes Nov 27, 2023
7e2b8c2
Update documentation
seangoodvibes Nov 27, 2023
c26018d
Adjust comments
seangoodvibes Nov 27, 2023
b246738
Fixed formatting of FXPress struct
seangoodvibes Nov 27, 2023
a4d69f5
Replaced goto with ||
seangoodvibes Nov 27, 2023
03af4d4
More cleanup
seangoodvibes Nov 27, 2023
31c9ecd
More code cleanup
seangoodvibes Nov 28, 2023
466313e
Fixed compile issue
seangoodvibes Nov 28, 2023
e2f6c59
Pass references instead of pointers
seangoodvibes Nov 28, 2023
2ec7aa3
Missed an initializer
seangoodvibes Nov 28, 2023
bb5d2b3
Fix loading of held status tags
seangoodvibes Nov 28, 2023
171ab09
Merge branch 'community' into feature/performance-session-view
seangoodvibes Nov 28, 2023
7e5e52e
Fix Strings
seangoodvibes Nov 28, 2023
c0d6a46
Update performance_view.md
seangoodvibes Nov 28, 2023
f8b48d6
Cleanup + Bug Fix
seangoodvibes Nov 28, 2023
ce28a87
Clean up code logic
seangoodvibes Nov 28, 2023
49aea65
isUIModeActive change
seangoodvibes Nov 28, 2023
ddf9f25
Convert editingMode menu constants
seangoodvibes Nov 28, 2023
68def86
Resolve action logger consequence warnings
seangoodvibes Nov 29, 2023
5fe1258
Reduce SD Card IO Operations
seangoodvibes Nov 29, 2023
9c0ee75
Cleanup const definitions
seangoodvibes Nov 29, 2023
ea069f0
Code cleanup
seangoodvibes Nov 29, 2023
824aac8
Beginnings of Midi Mapping Mode
seangoodvibes Nov 30, 2023
41e506b
WIP
seangoodvibes Nov 30, 2023
95fc3c4
WIP!
seangoodvibes Dec 1, 2023
b61eb4f
More improvements
seangoodvibes Dec 1, 2023
01350c7
Added support for Audio Clip's
seangoodvibes Dec 1, 2023
7454d2a
Clean up song view FX
seangoodvibes Dec 1, 2023
19837f6
Add support for synth clips
seangoodvibes Dec 1, 2023
6c8e070
Working for Kit Clips
seangoodvibes Dec 2, 2023
f9dac76
Added Defaults Menu
seangoodvibes Dec 2, 2023
565af13
Progress with saving/loading midi follow defaults
seangoodvibes Dec 2, 2023
e625f57
Bug fixes
seangoodvibes Dec 2, 2023
09c9e02
Code refactoring / cleanup
seangoodvibes Dec 2, 2023
ab531d7
More refactoring
seangoodvibes Dec 2, 2023
9ba7111
Refactored midi takeover mode
seangoodvibes Dec 2, 2023
aad5dda
Fixed value scaling + load of defaults
seangoodvibes Dec 2, 2023
effbd62
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 2, 2023
58698e9
Update change status
seangoodvibes Dec 2, 2023
d2df179
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 2, 2023
f4e08d4
Change Kit Root Note to C1 (36)
seangoodvibes Dec 2, 2023
3eca0bc
Add default menu for Kit Root Note
seangoodvibes Dec 3, 2023
57446ce
Fixed song view crash
seangoodvibes Dec 3, 2023
dbb422b
Add midi CC follow to instrument clips from arranger and song
seangoodvibes Dec 3, 2023
bf6b8a7
Improvements
seangoodvibes Dec 4, 2023
c402dad
Add support for playing clips from Arranger and Song
seangoodvibes Dec 4, 2023
42f56be
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 4, 2023
8a14a27
Dbt format
seangoodvibes Dec 4, 2023
6a278f0
Fixed arranger white clip bug
seangoodvibes Dec 4, 2023
fce588c
Cleanup
seangoodvibes Dec 4, 2023
536ae93
Added Midi Feedback (WIP)
seangoodvibes Dec 4, 2023
51bd448
Adjusted default value for delay amount
seangoodvibes Dec 4, 2023
d544fa2
Updated Performance View for Quantized Stutter
seangoodvibes Dec 4, 2023
6bd7499
Undo Changes to Quantized Stutter
seangoodvibes Dec 4, 2023
7735771
Resolve merge issues
seangoodvibes Dec 4, 2023
449009d
refactoring, disabled feedback for now, other
seangoodvibes Dec 6, 2023
947739d
Removed arranger view change
seangoodvibes Dec 6, 2023
05776ad
Cleanup + add blinking midi + learn
seangoodvibes Dec 7, 2023
044f21f
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 8, 2023
b555208
Midi Feedback WIP
seangoodvibes Dec 9, 2023
9b3acec
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 9, 2023
c0a1d46
dbt format
seangoodvibes Dec 9, 2023
110d6ea
Fixed arranger clip peeking not sending feedback
seangoodvibes Dec 10, 2023
83b19c0
Fixed bug with audition pad action in arranger
seangoodvibes Dec 10, 2023
3e8283e
Testing breaking midi feedback loop
seangoodvibes Dec 10, 2023
90260d2
Added automation feedback
seangoodvibes Dec 10, 2023
76f0ef8
Revert "Added automation feedback"
seangoodvibes Dec 10, 2023
eda34c3
Fix bug with "can't control param" popup
seangoodvibes Dec 10, 2023
57f254a
Separated midi follow channels for synth kit and params
seangoodvibes Dec 11, 2023
5ad5522
updated feedback when exiting clip into song
seangoodvibes Dec 11, 2023
8d93f16
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 11, 2023
81a5b78
Code cleanup
seangoodvibes Dec 11, 2023
cf0a9b2
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 13, 2023
224a496
Midi Feedback (WIP) - Crashing
seangoodvibes Dec 13, 2023
95d7a79
Testing audio sample timer
seangoodvibes Dec 13, 2023
a39047e
Plenty bug fixes!
seangoodvibes Dec 14, 2023
109325b
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 14, 2023
073635e
Minor adjustment
seangoodvibes Dec 14, 2023
cbe6323
Re-add mod encoder popup
seangoodvibes Dec 15, 2023
7779cec
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 15, 2023
70676e7
Cleanup code, add documentation
seangoodvibes Dec 15, 2023
ece8c53
Cleanup
seangoodvibes Dec 15, 2023
c1f34ae
Midi Feedback Updates for Automation + Other Fixes
seangoodvibes Dec 15, 2023
6fa61c5
Updated Automation Feedback Rate
seangoodvibes Dec 15, 2023
d9891dc
Make response filter toggable
seangoodvibes Dec 15, 2023
3c0db58
Updated toggle for feedback filter
seangoodvibes Dec 15, 2023
72b493e
Further tweaking to midi follow feedback filter
seangoodvibes Dec 15, 2023
4dd2d75
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 17, 2023
eb61a3c
A lot of changes - still work in progress
seangoodvibes Dec 18, 2023
122f7c0
Commit work in progress codespace changes
seangoodvibes Dec 18, 2023
bb604ba
Playing Synth and Kit notes works
seangoodvibes Dec 18, 2023
3c65a12
Refactored non MPE midi CC's received
seangoodvibes Dec 19, 2023
6f46e98
Additional cleanup
seangoodvibes Dec 19, 2023
8762163
Added offerReceivedCC support for Synths
seangoodvibes Dec 19, 2023
d958703
Added support for offering received after touch to synths
seangoodvibes Dec 19, 2023
5bb1c1b
Cleanup
seangoodvibes Dec 19, 2023
40749d2
Added support for offering bend range update
seangoodvibes Dec 19, 2023
45f3ebd
Added support for offering received pitch bend for synths
seangoodvibes Dec 19, 2023
9993491
cleanup
seangoodvibes Dec 19, 2023
ca3fed5
Added support for remaining KIT offer MPE functions
seangoodvibes Dec 19, 2023
0e1352d
Fixed bug with channel not saving
seangoodvibes Dec 19, 2023
73949e8
Cleanup
seangoodvibes Dec 19, 2023
f621ddc
Fixed logic
seangoodvibes Dec 19, 2023
3f866f0
Update flash storage
seangoodvibes Dec 19, 2023
5121760
Added pop up to display device loaded and saved
seangoodvibes Dec 19, 2023
ff3758c
Fix int definition
seangoodvibes Dec 19, 2023
494b20d
Show device name for device popup
seangoodvibes Dec 19, 2023
5a89be4
Fix kit root note int definition
seangoodvibes Dec 19, 2023
3aecd33
Merge branch 'community' into Midi-Mapping-View
seangoodvibes Dec 19, 2023
ce9434b
Remove device name popup
seangoodvibes Dec 19, 2023
79d196a
Updated documentation
seangoodvibes Dec 19, 2023
6341710
Updated midi follow channel menu display for OLED
seangoodvibes Dec 19, 2023
7aaae9e
dbt format
seangoodvibes Dec 19, 2023
cd621c1
Send note's and related cc's / pitch bend / MPE to active clip
seangoodvibes Dec 19, 2023
e022762
Refactored midi follow processing functions
seangoodvibes Dec 20, 2023
1b266cf
Added additional check for session view
seangoodvibes Dec 20, 2023
a01285e
Fine tuning
seangoodvibes Dec 20, 2023
58dd74f
Make kit root note learnable
seangoodvibes Dec 20, 2023
2aae696
Apply l10n patch to remove inlining
seangoodvibes Dec 22, 2023
10fa7f2
Create new toggle bool class to reduce menu impact
seangoodvibes Dec 22, 2023
f31308f
Cleanup
seangoodvibes Dec 22, 2023
423834d
Initialize view + Midi takeover tweak
seangoodvibes Dec 23, 2023
d68b7d9
Fix midi takeover for midi follow mode
seangoodvibes Dec 23, 2023
49942d5
Adjustment to midi takeover
seangoodvibes Dec 23, 2023
ccd3339
Further refinements to midi takeover
seangoodvibes Dec 23, 2023
155193f
Continue tweaking midi takeover
seangoodvibes Dec 23, 2023
e86a2c9
Minor string change
seangoodvibes Dec 24, 2023
fe7f6c2
Rename Midi Session to Midi Follow
seangoodvibes Dec 24, 2023
fc6b7c6
Cleanup
seangoodvibes Dec 24, 2023
3ff6032
Remove some param control from kits
seangoodvibes Dec 25, 2023
459c37f
Simplify getModelStackWithParam logic
seangoodvibes Dec 25, 2023
f102414
Simplify getModelStackWithParam code
seangoodvibes Dec 25, 2023
94aa0ed
Formatting
seangoodvibes Dec 25, 2023
757d1ef
Remove bend range update support
seangoodvibes Dec 27, 2023
4908cff
Remove bend range update support
seangoodvibes Dec 27, 2023
0f499d8
Write defaults to file if XML doesnt exist
seangoodvibes Dec 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Here is a list of general improvements that have been made, ordered from newest

#### 3.3 - MIDI
- ([#47]) Extra MIDI ports on the USB interface for MPE. Port 2 shows in the MIDI device menu, and improves the usability of MPE-capable devices through the USB interface by allowing MPE zones to be sent to port 2 and non-MPE to be sent to port 1 (or vice versa). A third port is added for future use such as a desktop/mobile companion app, DAW control or Mackie HUI emulation. When USB for MIDI is plugged into the Deluge, you can browse these settings in `SETTINGS > MIDI > DEVICES > UPSTREAM USB PORT 1` or `UPSTREAM USB PORT 2`.
- ([#781]) 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).
- 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.
- Settings related to MIDI Follow Mode can be found in `SETTINGS > MIDI > MIDI FOLLOW`.

#### 3.4 - Tempo
- ([#178]) New option (`FINE TEMPO` in the `COMMUNITY FEATURES` menu). Inverts the push+turn behavior of the `TEMPO` encoder. With this option enabled the tempo changes by 1 when unpushed and ~4 when pushed (vs ~4 unpushed and 1 pushed in the official firmware).
Expand Down Expand Up @@ -454,4 +458,5 @@ This list includes all preprocessor switches that can alter firmware behaviour a
[#681]: https://github.com/SynthstromAudible/DelugeFirmware/pull/681
[#683]: https://github.com/SynthstromAudible/DelugeFirmware/pull/683
[#711]: https://github.com/SynthstromAudible/DelugeFirmware/pull/711
[#781]: https://github.com/SynthstromAudible/DelugeFirmware/pull/781
[Automation View Documentation]: https://github.com/SynthstromAudible/DelugeFirmware/blob/release/1.0/docs/features/automation_view.md
144 changes: 144 additions & 0 deletions docs/features/midi_follow_mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Midi Follow Mode with Midi Feedback and Midi Learning View

<img width="835" alt="Screen Shot 2023-12-02 at 4 07 59 PM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/374fcf48-1316-4b21-9d7e-87e233f4057b">

## 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), 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.
- 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.

<img width="240" alt="Screen Shot 2023-12-02 at 7 13 16 PM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/f019b488-11e8-442d-a47b-cd95fbc45d9b">

### **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.

<img width="860" alt="Screen Shot 2023-12-02 at 4 25 29 PM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/b37afe61-6743-43d2-b175-48bbb4937aab">

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.

<img width="478" alt="Screen Shot 2023-12-02 at 4 34 59 PM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/674ace78-3b31-4a34-b3d0-15832b204b74">

#### 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.

<img width="170" alt="Screen Shot 2023-12-04 at 2 32 25 AM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/f4e8115c-c2af-4cfe-94cf-d2e117201cd5">

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".

<img width="191" alt="Screen Shot 2023-12-04 at 2 32 03 AM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/b2dcefb2-4f90-4b23-804c-3250bfd24862">

## 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
- Set the Midi Follow Channel for Kit Notes
- Set the Midi Follow Channel for Param CC's
- 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

2. 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
3. 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).
4. 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.
5. 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.
6. 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.
7. 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.
8. 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.

<img width="355" alt="Screen Shot 2023-12-02 at 5 00 28 PM" src="https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/4fdb5bb4-d364-4c2d-87f2-2c5f5676e408">

- 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](https://github.com/SynthstromAudible/DelugeFirmware/assets/138174805/6110b510-068f-4828-8c20-3a3a27351cac)

- 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
22 changes: 22 additions & 0 deletions src/definitions_cxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,15 @@ enum class PerformanceEditingMode : int32_t {
PARAM,
};

//Midi Follow Mode Feedback Automation Modes

enum class MIDIFollowFeedbackAutomationMode : uint8_t {
DISABLED,
LOW,
MEDIUM,
HIGH,
};

// Linear params have different sources multiplied together, then multiplied by the neutral value
// -- and "volume" ones get squared at the end

Expand Down Expand Up @@ -801,6 +810,13 @@ enum class MIDITakeoverMode : uint8_t {
constexpr auto kNumMIDITakeoverModes = util::to_underlying(MIDITakeoverMode::SCALE) + 1;
constexpr int32_t kMIDITakeoverKnobSyncThreshold = 5;

enum class MIDIFollowChannelType : uint8_t {
SYNTH,
KIT,
PARAM,
};
constexpr auto kNumMIDIFollowChannelTypes = util::to_underlying(MIDIFollowChannelType::PARAM) + 1;

constexpr int32_t kNumClustersLoadedAhead = 2;

enum class InputMonitoringMode : uint8_t {
Expand Down Expand Up @@ -863,6 +879,7 @@ enum CCNumber {
};
constexpr int32_t kNumCCNumbersIncludingFake = 124;
constexpr int32_t kNumRealCCNumbers = 120;
constexpr int32_t kMaxCCNumber = 127;

enum class InstrumentRemoval {
NONE,
Expand Down Expand Up @@ -1128,6 +1145,11 @@ constexpr uint32_t kShortPressTime = kSampleRate / 2;
/// Used in Performance View and with Sticky Shift
constexpr uint32_t kHoldTime = kSampleRate / 10;

/// Rate at which midi follow feedback for automation is sent
constexpr uint32_t kLowFeedbackAutomationRate = (kSampleRate / 1000) * 500; //500 ms
constexpr uint32_t kMediumFeedbackAutomationRate = (kSampleRate / 1000) * 150; //150 ms
constexpr uint32_t kHighFeedbackAutomationRate = (kSampleRate / 1000) * 40; //40 ms

enum KeyboardLayoutType : uint8_t {
KeyboardLayoutTypeIsomorphic,
KeyboardLayoutTypeInKey,
Expand Down
2 changes: 2 additions & 0 deletions src/deluge/deluge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "gui/views/audio_clip_view.h"
#include "gui/views/automation_instrument_clip_view.h"
#include "gui/views/instrument_clip_view.h"
#include "gui/views/midi_follow_view.h"
#include "gui/views/session_view.h"
#include "gui/views/view.h"
#include "gui/waveform/waveform_basic_navigator.h"
Expand Down Expand Up @@ -705,6 +706,7 @@ extern "C" int32_t deluge_main(void) {
// initialized yet. I think I sorta have that for host, but not for peripheral yet.

MIDIDeviceManager::readDevicesFromFile(); // Hopefully we can read this file now.
midiFollowView.readDefaultsFromFile();

setupBlankSong(); // Can only happen after settings, which includes default settings, have been read

Expand Down