Hi! My name is Markus, I've been using Hydrogen with the "built in" drum kits for some small project in the past - thanks for this great piece of software! Now I found some very interesting drum kits in the sfz format, but I came across several issues when trying to use them with Hydrogen. According to the "14 ways to contribute to Hydrogen" :-), I can offer the following:
1.) some ideas (or, more precisely, the issues I experienced and some suggestions to resolve them) 2.) some development time (I'm a C++ software developer in my daytime job) 3.) at least one of my songs where nobody else contributed (i.e., I don't have to ask anyone for permission), but since I am a guitarist, there is nothing special about the drums in my recordings, so I leave this point out for now The first thing I noticed is that Hydrogen only sends "note off" MIDI messages when using a drum kit which has MIDI notes defined, but no samples (which are not strictly necessary if only an external sampler is used, e.g., LinuxSampler, which natively supports the sfz format). I already fixed this (see https://github.com/hydrogen-music/hydrogen/issues/533). Then I compared the timing accuracy of Hydrogen's internal sampler with an external one (LinuxSampler connected via Jack MIDI). I created an artificial drum sample consisting of a single pulse and recorded the generated output with Ardour such that the timing can be evaluated with frame-accuracy when maximally zooming into the wave form view. With a sampling rate of 48kHz and a tempo of 108bpm, the samples had a distance of either 26666 or 26667 frames, i.e., the error was less than a frame, which is optimal. However, repeating the same experiment with LinuxSampler, the individual samples were spaced either 26624 or 26880 samples from each other, which are both integer multiples of 256. I choose quite conservative settings for jack when recording (4 periods of 256 frames) since latency (21.3ms with these settings) can easily be compensated, while a single xrun can spoil the greatest take. So timing seems to be accurate only to periods, but not to single frames when using an external sampler via MIDI. The error caused by this issue is in the order of the range a note can be shifted by the lead/lag feature, i.e., not immediatetly noticeable when listening casually, but too large to be totally ignored in my option. To verify whether this is an problem with Hydrogen or LinuxSampler, I did two more experiments: using LinuxSampler as an Ardour LV2 plugin internally connected to an Ardour MIDI track, and using LinuxSampler as an external application connected to Ardour via MIDI. Both gave frame-accurate results. So let me summarize: *) Ardour + Hydrogen with its internal sampler produce frame-accurate output *) Ardour + LinuxSampler as an LV2 plugin produce frame-accurate output *) Ardour + LinuxSampler connected to Ardour via MIDI produce frame-accurate output *) Ardour + Hydrogen + LinuxSampler connected to Hydrogen via MIDI don't produce frame-accurate output I believe that the problem is in or near the method JackMidiDriver::JackMidiRead(), though I didn't spot any obvious mistake there. While I think that this issue deserves some attention (i.e., fix) by itself, it also raises another question. What about adding support for LV2 instrument plugins to Hydrogen? (I read some forum posts of users who asked for LV2 effect plugins, which is a different thing, but having LV2 instrument plugins will make LV2 effect plugins easier to implement, and vice versa.) On the GUI, there could be an additional tab in the preferences dialog, maybe with a checkbox "use external sampler" and a combobox listing appropriate plugins installed on the system. I guess that LV2 support takes quite some work to implement, but would definitely be a valuable extension to Hydrogen. Last but not least, an interesting feature in the Salamander drum kit is a dedicated MIDI controller to gradually select a sound between open and closed hihat. I couldn't find a feature in Hydrogen which provides such a control (I would have expected it in the same region where velocity, pan etc. can be adjusted per note). Thanks for reading down here :-) My message boils down to two bug reports and two feature requests: *) Hydrogen can't drive an external sampler via MIDI unless samples are defined in the drum kit, even if the output of the internal sampler is not used *) when Hydrogen drives an external sampler via MIDI, the generated sound is not frame-accurate *) Hydrogen should be able to optionally use LV2 plugins for sound generation *) Hydrogen should allow to create custom MIDI controller messages associated with each note So far I was working with Hydrogen-0.9.7. If any of the above issues is already fixed in the current development version, please let me know and otherwise ignore my request :-) Aside from the simple bug fix proposal I already posted, I think it is not useful to dive deeper into the code without advice from more experienced team members. So I would like to discuss these proposals such that we can agree on a road map to implement this stuff or decide that it can't be done with reasonable effort. Note that I'm on vacation next week, but I'm happy to start/continue the discussion when I'm back! Kind regards, Markus ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Hydrogen-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
