hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.07k stars 172 forks source link

Drop `DrumkitComponent` #2021

Closed theGreatWhiteShark closed 2 months ago

theGreatWhiteShark commented 3 months ago

Final breaking XML changes for 2.0 which require adjusting our XSD files.

Since version 0.9.7 new drumkits and drumkit.xml files do contain components. They are split into InstrumentComponents and DrumkitComponents. The former allows to have independent sets of layers within an Instrument that are played back in parallell. The latter serves as an aux bus for all components of a specific ID (represented by a mixer line). But due to the DrumkitComponent concept InstrumentComponents are only independent within an instrument but strongly correlated to all other InstrumentComponents of other instruments holding the same ID. Adding/deleting a component in one instrument will add/delete an InstrumentComponent is all other instruments as well.

This conceptual complexity as well as the poor UI/UX integration seems to have resulting in the components to almost never being used. At least I haven't seen a single issue/artifact indicating its usage and a lot of open bug in their handling I found myself when finally trying to use this feature.

In an effort to make components more accessible and to integrate them better into Hydrogen, I decided to do some breaking changes and to significantly simply their design

This also makes everything required to render a Note reside within its linked Instrument and again allows to smoothly switch/delete instruments and drumkits.

Instrument undo/redo actions do now store a proper object with its samples unloaded (like we already do when switching Drumkits). No editing is lost anymore and undo+redo.

But there is a huge drawback: updated drumkits will make Hydrogen <=1.2.3 segfault during startup and the won't be a way to heal this other than to discard the user drumkit folder. That's not nice at all. But I think it is okay as starting with the upcoming 1.2.4 release there will be forward compatibility. User will always have the option to go back to the latest 1.2.X patch release in case they do not like 2.0.

See https://github.com/hydrogen-music/hydrogen/commit/650fd34924c5969a74ceeb3b7d4433f3cfbe9a2b for details


I also change Note position in the corresponding XSD file into float.

This will not break anything within Hydrogen (but maybe cause problems when positions are edited by hand in XML files). For v2.0 we touched this file anyway. So, now seems a good time to lay the basis of a potential tuplet support. I have no plans implementing it at the moment. But when one of us goes for it, she could do so without break pattern validity.


Fixes #1903. Addresses #1901