Open Olfried2 opened 3 years ago
Questions:
Why a separate config for 'midi mode' and 'type mode'?
Didn't know that this is possible.
Do you expect that each key will be able to light up its own LED, or just one LED somewhere on the board?
The LED's should be lightened independently. For example if you send the midi-code for play the LED's could show a "triangle" when you record the LED's could blink red and so on. (just ideas what to do with the LED's) For me, the LED's are only a goodie, not a must.
Why are you so keen to tear down the entire world just to change what a key does?
My motivations are a usable Keybow. So the easiest way in my opinion is: restart the program, read the config, work. Restarting the python program shouldn't take a noticeable time ? (will check it with the actual njak.py DONE) -> It's less than 2 seconds.
I must admit, changing only one key has it's charme, especially now that I learned that the program can do "actions". Which leads to a more complex program (if not already implied) and of course a different config.
How will the program know that there is a new config?
_(I'll edit the specs to add the 'actions' topic)_DONE
continued from issue 2 I did some research and made some notes. Here's the result.
The device should be able to:
Configuration
I'm sorry that I couldn't describe my earlier idea about the config process precisly. So here's my second attempt. As this gadged is only used local, I would prevent a big API. Everything is on board of the raspi The config file will be written by the "frontend-webserver" and saved (copied) at the arranged place. So if there's any new paragraph in the config file, the "frontend-webpage(s)" could be easily enhanced. It could be possible to store older configs somewhere to use them again. The frontend stops(kills) the actual python program and starts it again, the new config will be read and used. This could also be used as a layer-switch. The frontend could be used to show informations about the config.* and let the user choose. This would be close to switch layer. The python program reads the text-config.** in an array and prepares and sends the content when the associated key is pressed.
If we are in midi-mode the configuration files looks similar except that the commands are different and the config is called midi-config.**. (meaningful Midi commands are to be investigated)
Configuration files
I found a webpage where the author shows several types of config files https://martin-thoma.com/configuration-files-in-python/ My favourite is the xml-like config (I have a web background) which looks like
Also possible JSON
just my 5 cents on config files Another problem of the keypad would be different languages and different keyboards see issue#4