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
Midi Takeover Mode #170
Midi Takeover Mode #170
Conversation
Midi Pickup Mode enables the Deluge to ignore Midi CC Values from Controllers that are out of Sync with the Deluge. For example, if an External Midi Controller is sending a Midi CC Value of 0 to the Deluge for a Parameter on the Deluge that is currently set to an equivalent Midi CC Value of 127, then the devices are out of sync. The Deluge will ignore Midi CC Values from the Midi Controller until the Midi Controller has been "reset" / matches the current Parameter Value on the Deluge. It does this by comparing the incoming Midi CC Value with the Deluge's internal Knob Position (which is derived from the Current Parameter Value). The Deluge Internal Knob Position can be converted to a Midi CC Value and Vice Versa by subtracting 64 from the Midi CC Value or adding 64 to the Deluge's Knob Position. If the difference between the Deluge's Internal Knob Position and the Midi CC Value is greater than +/- 1, then the Midi CC Value is ignored the Parameter's Value will not be changed. The feature can be disabled using the Community Features menu in Settings. on the Deluge.
Could value scaling be added to this, similar to Ableton Live and many other MIDI controllable devices? From the Ableton Live docs:
Or maybe as a future enhancement? |
Hey absolutely that is possible. I would make it selectable. So you would have Midi Pickup Mode with or without scaling I would just need to understand the intended behaviour. If we take an example, could you please describe how you would expect the Deluge to react? ————- Example #1 Let’s say the Deluge Parameter Value is 50 and the Midi Parameter Value is 0. So Deluge’s Knob Position is all the way right and the MIDI Knob Position is all the way left. When I turn the MIDI Knob right, how should the Deluge Parameter Value change? Would for example the Deluge Value decrease until 25 when the knobs are in the same position and then they move together after that? ————— Example #2 Deluge Value is 25 so midi knob is further right than deluge knob When I turn Midi Knob right, what happens to the Deluge Value? when I turn MIDI Knob left, what happens to the Deluge Value? Thanks! |
While I'm sure there are 'proper' algorithms for this value scaling behavior this would be my two cents: Example 1 (knob turns towards the current Deluge value) Yes, exactly what you described. As the knob turns right the same value difference is deducted from the Deluge value, bringing the two values towards each other. Knob moves 0 to 2 👉 Deluge value moves 50 to 48 Example 2 (knob turns away from current Deluge value) Here I think we use a multiple that takes into account how far is left to the end of the scale for each value. Deluge value = 25 Knob moves 40 to 42 👉 Deluge moves 25 to 30 (knob change 2 = Deluge change 2 x 2.5 = 5) Of course this wouldn't be implemented in steps of 0-50 because the Deluge doesn't work at that resolution internally (I don't think?) so the full scale of vales would be used. Although both of these examples will produce potentially unexpected behavior - example 1 would initially turn down a filter cutoff as you turn the knob up - in a live or performance situation I would still prefer this than an abrupt jump in value. This boils down to 2 points on a line. When point A moves how should point B move in order to smoothly meet point A. The only two states are point A is moving towards point B or it's moving away from point B. We could always do some tests in Ableton Live and adopt their approach. This will likely not only be a dependable and considered function but also one already familiar to the huge amount of Live users. |
Perfect thanks for the explanations Dan! @weavermedia this should be relatively simple for me to implement. I’ll be back home Sunday so I’ll start tackling it then :) Cheers |
Changing this PR to draft as I'm working to incorporate the changes Dan requested above. |
I don't think the scaling describes above is correct - increasing the a MIDI value should always increase the deluge value. Dans suggested approach would cause the deluge value to drop while the knob is increased and that's almost certainly worse than the current behaviour. What you want to do is scale the ranges E.g. Deluge value at 25 Behaviour should be that the 10% (13/127) change in position brings the value 10% closer, leaving it at 27.5 (25+.1*(50-25)) With this behaviour the pot direction and parameter direction always match, and their values match at either end. Once their values match they will always stay in sync |
Thanks for your input Mark @m-m-adams :)! I’m going to double check how ableton does it one more time and I will post the results here. I’ll test a bunch of different scenarios. keep in mind that deluge’s equivalent for the midi controller values of 0 to 127 is -64 to +64) The actual parameter value of 0-50 is determined using a function that converts the deluge’s knob values to a parameter value. cheers |
Ableton Value Scaling Scenarios: @m-m-adams @weavermedia Scenario #1: Increase Midi Value to 127 (from 126) when Ableton Value is 0 Current Values:
New Values:
Scenario #2: Decrease Midi Value to 64 (from 126) when Ableton Value is 0 Current Values:
New Values:
Scenario #3: Increase Midi Value to 70 (from 64) when Ableton Value is 0 Current Values:
New Values:
Scenario #4: Decrease Midi Value to 64 (from 70) when Ableton Value is 12 Current Values:
New Values:
Scenario #5: Decrease Midi Value to 10 (from 64) when Ableton Value is 11 Current Values:
New Values:
Scenario #6: Increase Midi Value to 64 (from 10) when Ableton Value is 1 Current Values:
New Values:
|
If the Ableton implementation is not the desired "method" let me know. Maybe we can improve upon it? Or we implement Ableton's method and then add a second "value scaling" method to offer users more choice? |
Agreed, the value scaling method used in Ableton Live is better than my initial thoughts. The only issue I have with it is if the Deluge value is close to one end of the scale and the MIDI controller is close to the other end, the movement of the MIDI control might seem to have no effect on the value until they match. That would bug me but it's the behavior known to all the Live (and likely other DAW) user out there. |
Awesome work @seangoodvibes! I think the ableton behaviour looks good, that description seems to match the hydrasynth as well which is the only synth I've used midi scaling with |
Documenting the different naming conventions and feature sets for Midi Takeover Mode across multiple Daw's and Device's. Goal is to align the Deluge's naming with something standard that users will recognize and also ensure that the functionality works as expected. Ableton
Bitwig
Korg Minilogue
Elektron Analog Heat
Novation Summit
Hydrasynth
Behringer BCR-2000
Sequential Prophet 10
Eventide
|
Updated the code to: - Move Midi Takeover Mode settings from Community Menu to Midi Menu - Add Value Scaling mode - Save Midi Takeover Settings to Midi XML file - Load Midi Takeover Settings from Midi XML file
Replaced file with latest version from community
Hi :) I've updated the description for this commit above. It's ready to be tested and merged I think! @weavermedia @m-m-adams @litui @trappar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and I appreciate the clear commenting, left a style suggestion and I think the big description should be moved to community feature
Note - untested in practice since I have no MIDI knobs this week
Per m-m-adams feedback, I have made the following changes: 1) moved takeover mode description to community features.md 2) replaced * 1000000 multiplication with << 20 3) replaced / 1000000 division with >> 20
Please fix format issues and I will merge this one in. |
The fix may have not made it all the way to
#170. Or at least
that is what the "pre merge check" thinks.
…On Thu, Jul 13, 2023 at 12:20 PM seangoodvibes ***@***.***> wrote:
Please fix format issues and I will merge this one in.
I fixed it last night :)
—
Reply to this email directly, view it on GitHub
<#170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACDOGKWQ7WLFTV3DR63S6ETXQAU4FANCNFSM6AAAAAA2BMJFEI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You may need to deconflict this one too as github thinks there are
conflicts too.
…On Thu, Jul 13, 2023 at 12:42 PM Jamie Fenton ***@***.***> wrote:
The fix may have not made it all the way to
#170. Or at least
that is what the "pre merge check" thinks.
On Thu, Jul 13, 2023 at 12:20 PM seangoodvibes ***@***.***>
wrote:
> Please fix format issues and I will merge this one in.
>
> I fixed it last night :)
>
> —
> Reply to this email directly, view it on GitHub
> <#170 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACDOGKWQ7WLFTV3DR63S6ETXQAU4FANCNFSM6AAAAAA2BMJFEI>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Corrected formatting issues identified by clang-format style check
reformatted.txt Apologies for all the trouble here. Its possible some of our test scripting is wrong. |
Hopefully this works!
No worries, let's try again! |
Ok now I think I've got it! Let's try this :)! I ran the clang format script this time.
@jamiefaye I think we're good to merge now! |
1124f4a
Midi Takeover Mode
A new item has been added to the Midi menu: Takeover
The Takeover menu consists of three modes that can be selected from:
Summary of changes to Deluge's code:
Expanded MidiKnob class to include previous position info:
Added code for Pickup and Takeover Modes
Defined Takeover menu values and number of modes
Added Takeover Modes to Midi Engine (to store Takeover Mode selection from Midi menu)
Defined Takeover Menu
Added Midi Takeover submenu
Added read/write to save Midi Takeover Settings to XML file