-
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
LMMS currently stores its configuration in an XML file. This is technically human-readable, but it's not fun to do so. An alternative configuration file format could be beneficial.
There are several options to choose from:
INI-like
The most common config format (many .conf files are just this). Dead simple. Maybe too simple for configurations with nested options or arrays (not sure how to handle recentfiles or favoriteitems!) Requires no dependencies as writing this from scratch is trivial.
# Example INI config version = 1.3.0-alpha.1.956+f5688e9 configversion = 3 language = en sololegacybehavior = false openlastproject = false loopmarkermode = dual configured = true disablebackup = false nanhandler = true nommpz = false # No clear way to handle recentfiles or favoriteitems...? [audioengine] samplerate = 44100 framesperaudiobuffer = 256 audiodev = SDL (Simple DirectMedia Layer) mididev = ALSA-Sequencer (Advanced Linux Sound Architecture) # ...TOML
This format has become pretty popular lately and has a lot in common with INI, but with support for nested options and arrays. I've used it a few times and it's pretty nice. However, there are several ways to represent nested options, which is unfortunate (probably won't be a problem for us though).
# Example TOML config version = "1.3.0-alpha.1.956+f5688e9" configversion = 3 language = "en" sololegacybehavior = false openlastproject = false loopmarkermode = "dual" configured = true disablebackup = false nanhandler = true nommpz = false recentfiles = [ "data:/projects/templates/default.mpt", "data:/projects/second_file.mmpz" ] [audioengine] samplerate = 44100 framesperaudiobuffer = 256 audiodev = "SDL (Simple DirectMedia Layer)" mididev = "ALSA-Sequencer (Advanced Linux Sound Architecture)" # ...YAML
This format is widely used and I am including it here because I know in my heart it is relevant to this discussion, but I can't stand it. It's better than XML, I guess.
# Example YAML config version: 1.3.0-alpha.1.956+f5688e9 configversion: 3 language: en sololegacybehavior: false openlastproject: false loopmarkermode: dual configured: true disablebackup: false nanhandler: true nommpz: false recentfiles: - data:/projects/templates/default.mpt - data:/projects/second_file.mmpz audioengine: samplerate: 44100 framesperaudiobuffer: 256 audiodev: SDL (Simple DirectMedia Layer) mididev: ALSA-Sequencer (Advanced Linux Sound Architecture) # ...KDL
This format isn't as widely used as the others, but I personally think it's neat.
// Example KDL config version "1.3.0-alpha.1.956+f5688e9" configversion 3 language en sololegacybehavior #false openlastproject #false loopmarkermode dual configured #true disablebackup #false nanhandler #true nommpz #false recentfiles "data:/projects/templates/default.mpt" "data:/projects/second_file.mmpz" audioengine { samplerate 44100 framesperaudiobuffer 256 audiodev "SDL (Simple DirectMedia Layer)" mididev "ALSA-Sequencer (Advanced Linux Sound Architecture)" } // ...Thoughts?