Open mendomusic opened 7 years ago
Hi!
In general, i'm also thinking that there is the need for a more user-friendly midi handling in hydrogen.
But coming to your use-case, i don't think that re-interpreting the values from the drumkit xml is a good idea. First of all, the value "-1" has a special meaning: "do not output anything". This is sth. of course different to channel 9.. So re-interpreting this value in hydrogen seems to be not a good thing to me. It is questionable if it is a good default value to turn off the midi output by default (by setting the channel to -1), but on the other hand, there are many people who do not use the midi output at all and who want to minimize overhead and turn off the generation of midi out notes. In addition, it is quite easy for people to set their own values - just adjust the channels of your favourite drumkit and save that drumkit.
About your second point: Midi Note 60 "seems" to be the standard note, but if you look at the MIDI table which you referenced in your link, then Midi Note 36 is listed as the first note. (see also http://computermusicresource.com/GM.Percussion.KeyMap.html). The fact that all instruments were mapped to note 60 was a bug and was not intended. If you're building a fresh version of hydrogen from our git repository, you will see that the default song (empty song) is now consistent with the GM Kit note values (those which are set in Hydrogen's own GMKit drumkit). In my opinion this is a good starting point and does not need any re-interpretation.
Hi, I've been thinking about the same issue lately.
Problem with your solution is that note 60 is a legitimate note value. In General MIDI spec note 60 maps to Hi Bongo drum, so changing this may upset some Cuban musicians:)
Instead, I proposed pull request that assigns default note values when all instruments use the same MIDI note.
Under Pattern Editor Drumkit there is the table with the default incoming MIDI routings by instrument position.
I would like to suggest the following improvement to enable quick set-up of midi routing to external programs:
drumkit.xml
for am instrument is set to<midiOutChannel>-1</midiOutChannel>
hydrogen could automatically set this to<midiOutChannel>9</midiOutChannel>
which will provide the user MIDI out on the standard channel 10<midiOutNote>60</midiOutNote>
(seems to be the standard note), change this to the positional note. For GMkit the instrument id 7, the position 8, (Tom Mid) would then be assigned to<midiOutNote>73</midiOutNote>
or even better to the respective note value of general midi standards.Since MIDI out channel & MIDI out note are hard-coded in the drumkit XML file, this change would require to recode all drumkit XML. But instead, hydrogen could run the two checks on top when reading the drumkits. Maybe enabled/disabled by a setting.
Unfortunately, I do not understand cpp files.
but some pseudo code would come in here: https://github.com/hydrogen-music/hydrogen/blob/master/src/core/src/basics/instrument.cpp#L250
I think this small change would improve the midi setup. Thanks for considering.