[Feature] format XML file in order you map MIDI functions

Bug #1674883 reported by Wihola IT
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Undecided
Unassigned

Bug Description

Why Mixxx rearrange XML file lines in ~/.mixxx/controllers

My eyes gets used to a certain look of XML file I am editing, but mixxx would like to format it its own messy way.

I started my mapping from scratch because after auto-mapping the entries in the xml file has random order and I can not find anything or jumping all around, even 80 and 90 (press\release key) lines of one button are far away from each other.

Also I need to use DIFF app to keep my mappings the way I want, and not let mixxx overwrite them.

Is there any workaround? Or maybe I can help to fix this, just tell where to look.

Be (be.ing)
Changed in mixxx:
status: New → Confirmed
Revision history for this message
Be (be.ing) wrote :

You can avoid this by renaming your XML file that you are working on and loading from that file in the preferences instead of the autogenerated one. If you would like to contribute your mapping to be included in Mixxx, please follow the naming convention:
http://mixxx.org/wiki/doku.php/contributing_mappings#file_naming_convention

I presume Mixxx scrambles the autogenerated XML file because the mapping objects are stored in an unordered hash table in memory, so when Mixxx iterates over the hash to save them to the XML file the order is unpredictable. I presume a hash table is used for performance reasons so lookups are very fast when receiving MIDI input. It could be possible to have a QHash and a duplicate QList that both contain the mapping objects, use the QHash for fast lookups when receiving MIDI input, and only use the QList for saving the autogenerated XML file.

Revision history for this message
ronso0 (ronso0) wrote :

I noticed this again lately when implementing components-js.
Sometimes its just quicker to adjust the mapping directly in the xml than in the mapping window.

It would indeed be awesome if the mapping list was saved with the last
sort order, i.e. sorted by note, keyword or connected control.

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8835

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.