gethiox / HIDI

flexible HID to MIDI translation layer
GNU General Public License v3.0
29 stars 1 forks source link

Is it possible to send on multiple midi channels at once? #5

Closed zuggamasta closed 11 months ago

zuggamasta commented 11 months ago

First of all, thank you for doing and maintaining this project. I had this up and running in no time, just works and the documentation is straight forward and easy to understand.

Is there a way to send notes from one controller/config to multiple in one mapping? In my case I might want to send channel 1 (modular/bass synth), but also midi notes and midi cc to channel 5 (sampler) in my setup. Moving the midi channels on the devices is not possible as the notes would clash and I would trigger

I'm not sure if this is a super specific case, but at least in my setups it's quite common to do things at multiple channels.

gethiox commented 11 months ago

Happy to know that my software works well. First of all let's distinguish what do you exactly mean, is it just sending all midi events to more than one channel simultaneously or do you need some kind of split-keyboard feature where different segments/keys of keyboard are sending midi events to their respective channel?

First case should be relatively easy to implement where second one adds quite the complexity.

So if I understand you correctly you want to simultaneously trigger both devices that are listing on different channels as layered synthesis, is that correct?

zuggamasta commented 11 months ago

It’s the latter of the two. A split keyboard hits my issue the it best.

if it’s a lot of work - no worries - I was mostly curious if I missed something in the config.

Thank you for the quick reply

zuggamasta commented 11 months ago

For further explanation I added a quick test I did last night: I’d love to do this pitch bend thing + some fun on the left stick, and then trigger samples on the right side of the controller. But my setup requires this to be on multiple midi channels. (Mostly hardware synths)

https://merveilles.town/@zuggamasta/111614538880278971

gethiox commented 11 months ago

Alright, so it is split-keyboard kind of thing. This is software, everything is possible. There is no such feature for now, I was pondering how to implement that without drastic complexity increase and optional, user-defined channel offset for notes comes to my mind. So for example channel offset could be defined after a comma like so:

  [mapping.keys]
    BTN_A = "0,5"
    BTN_B = "1,5"
    BTN_X = "c1,5"
    BTN_Y = "c#1,5"

I'm calling it offset because it will react to channel changes as well (1 and 5, channel up, 2 and 6, etc.) I can't promise anything but I could try to implement it, I agree it would be useful for device to sent keys on different channels, especially in the gamepad controller case.

zuggamasta commented 11 months ago

Yes, offsets 😍 I was also wondering if it's possible to do this via offsets, too as this would keep the channel shifting still intact and super powerful, too!

gethiox commented 11 months ago

Channel offsets has been implemented, see hidi-config/user/README.md for details. If you face some issues let me know, from what I tested it worked properly so far. To update simply replace binary with a new one. New binaries are available on the release page.

zuggamasta commented 11 months ago

Thank you very much, I’m back at my setup again and will test it thoroughly!