hydrogen-music / hydrogen

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

Initial new instrument hardcoded to Key 36, is this still necessary? #1840

Open AVLinux opened 1 year ago

AVLinux commented 1 year ago

Hydrogen version * : 1.2.1 repository Package Operating system + version : Debian Bookworm | AV Linux 21.3 Audio driver + version : PulseAudio


When creating a new kit the initial first instrument is always hardcoded to Key 36, if you set the initial instrument to a different Key number (ie Key 35) then the next created instrument will try to be helpful and guess the next Key number for you but it is always based on the initial instrument using Key 36. If you start and manually set the first instrument at Key 35 then the next created instrument guesses it should be Key 37. Because of this behavior any kit NOT starting with Key 36 will need to be manually changed for every newly created instrument.

I completely understand in the ancient General MIDI past that the General MIDI Kick drum Key number was always 36 but many modern Drum libraries do not conform rigidly to the General MIDI standard. When I build kits whether in Hydrogen, SFZ, SF2 format or whatever I like to have a drum stick count-in sample on Key 35 and then go from there with the Kick on Key 36 as an example of why I have run into this issue.

I think it would be more intuitive to have the User set whatever key they want for the initial first instrument and then have H2 intelligently number up from there. This isn't really a bug and there is solid logic behind why it is like it is currently, I just find that if you want to start with a Key other than 36 then H2 will fight you the entire way and you better pay close attention to the Key number for each instrument.

theGreatWhiteShark commented 1 year ago

I agree, 36 is a magic number but there is an even more pressing reason for this behavior than General MIDI.

Traditionally, mapping of incoming MIDI notes to instrument was done in a fixed scheme based on the instrument order in Hydrogen. The first instrument is mapped to note 36, the second to 37 and so on. At some point the option "Use output note as input note" was added to the Preferences using which you can base the mapping on the output MIDI keys you specify in the instrument editor.

So, with this default choice the mapping of incoming MIDI notes is the same regardless whether the option is checked or not.