-
Notifications
You must be signed in to change notification settings - Fork 3
LMMS file parsing
Current formats RMMS should be able to import:
- mmp(z)
- xpt(z)
- lmmsrc
It would be a good idea to make the structs version agnostic so that it makes importing/exporting to different versions easier.
For example, lmms 1.2.2
uses "patterns" and the latest alpha uses "clips" instead.
We can do the same approach and do upgrade routines.
planned supported versions:
- 1.2.2
- 1.3.0-alpha.1
- Next stable version
The current implementation can be found here.
As we are dealing with highly flexible data, we first need to load the xml data as a tree in memory. Then, we need to access specific nodes and map them manually to our version agnostic structs.
Going the other way is, theoretically speaking, is less of a hassle. Thanks to quick-xml
's high level writing api, it shouldn't be of a hassle.
Quesions: Should we be able to modify the tree in memory when de-serializing them?
Current hurdles:
- Creating a tree data structure without
rc
andRefCell
. Working with them can be really clunky. Before I commit to fully mapping xml nodes to Rust structs. I need a better workflow. - How would different versions work? I guess I could follow LMMS' "upgrade routines" where the xml nodes are renamed.
Minor Inconveniences:
- It's a really arduous task mapping xml nodes