Skip to content

Add Lumi Keys sysex message support#812

Merged
litui merged 8 commits into
SynthstromAudible:communityfrom
litui:feature/lumikeys
Dec 22, 2023
Merged

Add Lumi Keys sysex message support#812
litui merged 8 commits into
SynthstromAudible:communityfrom
litui:feature/lumikeys

Conversation

@litui
Copy link
Copy Markdown
Collaborator

@litui litui commented Dec 12, 2023

Fleshing out an idea for adding sysex message support for the Lumi Keys Studio Edition when the Deluge is acting as a USB Host.

Everything I'm hoping to do may not be possible but in the process I'm hoping to add a reusable structure for hooking calls (sysex or otherwise) to specific usb devices.

Ideally supported for first attempt:

  • pushing key
  • pushing scale
  • pushing MPE lower / upper setting (on the Lumi, limited to one or the other, not both)
  • pushing colours on Lumi device connection / colour reconfiguration
    • copies the onscreen colours while in clip view
  • updating Lumi key and scale when changed on the Deluge
  • virtual/override hooks for easily adding support for other similar devices

@litui litui added the enhancement New feature or request label Dec 12, 2023
@litui litui self-assigned this Dec 12, 2023
@m-m-adams
Copy link
Copy Markdown
Collaborator

Awesome! Checkout the support for the synthstrom midi foot controller for inspo, it does some matching with sysex (or maybe usb device ID)

@litui litui force-pushed the feature/lumikeys branch 3 times, most recently from 32dc30e to 892fcb7 Compare December 18, 2023 18:40
@litui litui force-pushed the feature/lumikeys branch 2 times, most recently from e3fae79 to a3e195d Compare December 19, 2023 21:25
@litui
Copy link
Copy Markdown
Collaborator Author

litui commented Dec 19, 2023

While a lot more hook points and functionality could be added, I think I'll stop there. Open to reviews.

@litui litui marked this pull request as ready for review December 19, 2023 21:34
- .clang-format needed changing to align with requirements imposed by github's clang-format

One-liner formatting fix.
Further adjustments.

Virtual functions are working, now just a matter of finding places to insert hooks
and the right way to find the MIDIDeviceUSBHosted from the MIDIDevice.
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.

Code looks good! It adds 1.5k of bin size though, left some comments on places I think that can be reduced

Comment thread src/deluge/io/midi/midi_device.h
Comment thread src/deluge/gui/menu_item/midi/device_specific/lumi_keys.h Outdated
Comment thread src/deluge/gui/menu_item/midi/device_specific/lumi_keys.cpp Outdated
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h Outdated
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h Outdated
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h Outdated
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.h
Comment thread src/deluge/io/midi/device_specific/midi_device_lumi_keys.cpp
@litui
Copy link
Copy Markdown
Collaborator Author

litui commented Dec 21, 2023

Code looks good! It adds 1.5k of bin size though, left some comments on places I think that can be reduced

The changes I put in this morning (just had time to test this evening and pushed now) should remove the need for some of the lookup tables... I figured out the tables were just mapped to int32_t in 7-bit sysex.

@litui
Copy link
Copy Markdown
Collaborator Author

litui commented Dec 21, 2023

Code looks good! It adds 1.5k of bin size though, left some comments on places I think that can be reduced

The changes I put in this morning (just had time to test this evening and pushed now) should remove the need for some of the lookup tables... I figured out the tables were just mapped to int32_t in 7-bit sysex.

Resulted in minor decreases in the dev build size, no decrease in the release build size. Haha oh well.

feature/lumikeys:

   text	   data	    bss	    dec	    hex	filename
1415972	  21756	 328108	1765836	 1af1cc	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.elf
1437772 20 Dec 21:35 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.bin

   text	   data	    bss	    dec	    hex	filename
1319852	  20016	 318968	1658836	 194fd4	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.elf
1339904 20 Dec 21:35 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.bin

Feature/lumikeys @ 595c35bb

   text	   data	    bss	    dec	    hex	filename
1416028	  21756	 328108	1765892	 1af204	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.elf
1437804 20 Dec 21:39 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.bin

   text	   data	    bss	    dec	    hex	filename
1319860	  20016	 318968	1658844	 194fdc	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.elf
1339904 20 Dec 21:40 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.bin

community:

   text	   data	    bss	    dec	    hex	filename
1413276	  21756	 328108	1763140	 1ae744	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.elf
1435052 20 Dec 21:30 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Debug/deluge.bin

   text	   data	    bss	    dec	    hex	filename
1317510	  20016	 318968	1656494	 1946ae	/Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.elf
1337568 20 Dec 21:30 /Users/litui/dev/deluge/DelugeFirmware-litui/build/Release/deluge.bin

- Using bit array comparison instead.
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.

I'm good with this. The bin size increase is slightly undesireable but it's mostly reusable code that can be used for other devices in future, such as supporting MCU compatible mixer controllers or ableton session view controllers

@litui litui added this pull request to the merge queue Dec 22, 2023
Merged via the queue into SynthstromAudible:community with commit 4252a87 Dec 22, 2023
@litui litui deleted the feature/lumikeys branch December 22, 2023 18:16
@soymonitus
Copy link
Copy Markdown
Collaborator

Please @litui post a video so we can see this in action!

@litui
Copy link
Copy Markdown
Collaborator Author

litui commented Jan 30, 2024

@soymonitus There's a short reel on my insta https://www.instagram.com/reel/C1DWDk2NPjY/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants