brummer10 / Mamba

Virtual Midi keyboard and Midi Live Looper for Jack Audio Connection Kit
BSD Zero Clause License
76 stars 5 forks source link

keyboard map saved in NSM file, should it not be .config ? #20

Closed Houston4444 closed 3 years ago

Houston4444 commented 4 years ago

Under NSM, the used keyboard map (azerty, qwerty...) seems to be saved in the NSM path. It's quite annoying because user has to setup the keyboard each time (s)he adds Mamba to the Session. It's not a big problem in RaySession because user can easily set Mamba client as template and open its template instead of the default one, but we can't do that in new-session-manager.

I think that the keyboard map should be stored only in .config . It takes more sense, almost users rarely change their keyboard map, and if you share your session with a stranger, this stranger would be happy to keep his own keyboard map.

brummer10 commented 4 years ago

No it isn't. The keymap file is indeed saved under ~/.config not in the NSM path. Just, when you start a new session with NSM you need to select the custom keymap to be used, as that is part of the options saved under NSM. File name is Mamba.keymap and it is a binary file (only readable by hex)

Houston4444 commented 4 years ago

I was more talking about the keylayout value than about the custom keymap.

I say I disagree with the idea that this value has to be stored in the session, it takes more sense to me if this value is simply stored in ~/.config because it depends more on hardware (here the keyboard) than to something specific to a song. I don't think anyone will have one map for a song and another map for another one, but I may be wrong.

A simple compromise would be to load .config file at startup if NSM path doesn't already exists.

brummer10 commented 4 years ago

Ah, now I understand. Interesting idea. That would be a general solution for several issues I have with the separated configs for use cases with or without NSM control. May be a topic to discuss on irc LAD.

brummer10 commented 4 years ago

Okay, now Mamba will read the default config file when no one exist under the NSM folder. So on a fresh session it will start with your last used settings, as soon you've saved a NSM session it will use the config file from there.

Houston4444 commented 4 years ago

Ok, thanks. This is a solution. There is still a small inconvenience: Users who never use Mamba outside of NSM won't see the difference, but a simple line of documentation somewhere could explain that they just have to launch and setup Mamba one time outside of NSM.

I think that this solution works for Mamba because it's a little software (in terms of number of saved config values), I don't think that this solution could be generalized to bigger softs (I think to Guitarix), where it seems to me necessary to distinguish what is part of the configuration and what is part of the current project.