-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
midi : midi out only : using instrument as sequencer for external app #63
Comments
I think drum samplers don't care about note off messages
definitely
somewhere in editor window, between size and resolution combos |
I've been using Hydrogen to drive drums created by Yoshimi (Zynaddsubfx variant). The sequencing works OK, but unless I'm missing a setting somewhere, none of the controls actually change how the MIDI out note is being handled. No velocity. No cutoff. No use of mixer faders. Surely they should all alter the MIDI output ? Unless this all conflicts with Hydrogen design philosophy or approach in some way ? I would see adding this as an advantage for Hydrogen as using pure generated percussion sounds from Yoshimi (and the many other drum generators out there) sounds vastly superior to samples. |
I don't see connection between sample lengths and note lengths. When MIDI note is sent to external sampler, its most likely that samples played by external sampler have different length than smaples loaded into Hydrogen. Besides, drum samplers doesn't seem to care. I have created MIDI file with quarter, eighth, sixteenth ans 1/32 notes played, and both Addictive Drums and Steven Slate Drums (two samplers I have access to) play every note the same. I have included the same track played by synthesizer, to hear the difference: So I assume that using arbitrary note length (eg. a quaver), or just assuming that note ends when next note begins will be "good enough". |
I've tried to use H2 as a sequencer for synthesized drums. |
I looked in the MIDI 1.0 specification to see if there was a recommended way to handle note off events for one-shot sounds (such as drum hits), and couldn't find anything. But it did say that every note on should be followed by a note off. I think the only sensible way to handle this is for Hydrogen to emit a note off immediately following the note on, and assume the receiver will ignore the note off. Sending the note off when the internal sample finishes playing is simply wrong. It makes no sense, and according to rghvdberg can cause problems. (Actually, an exception to that is when a note is entered into the pattern with a MIDI keyboard, and has a duration. It shows up as a horizontal bar instead of a dot in the pattern. Then Hydrogen would send the note off at the end of the bar. Actually, this may be the best general way to handle it because notes entered with the mouse have a zero duration. I hope I got that right!) While figuring this stuff out, it occurred to me that simple bass/synth riffs could be handled by Hydrogen by adding an instrument for each note in the bass/synth riff and recording it from a MIDI keyboard. But for that to work, the MIDI note off events must be handled right, as I described in the above paragraph. In any case, I suggest that the subject of controlling MIDI devices from Hydrogen be written up in the manual. The way Hydrogen currently acts definitely needs to be documented there because it's very unintuitive, and without proper documentation, anyone who creates a new instrument with the sole purpose of sending MIDI to a synth will have problems. |
I had the same problem and opened a separate tracker issue (#533), elpescado redirected me here. With the code modified as posted under #533, I get a "note off - note on - note off" sequence in a very short time (some milliseconds) for each note in Hydrogen, and when connected to LinuxSampler, the notes are played as expected (i.e., "note off" messages are ignored). With unmodified Hydrogen-0.9.7, only "not off" messages are produced, which certainly don't trigger any sound output in LinuxSampler. BTW, not everyone agrees with a "note off" being required after each "note on". There is a MIDI tutorial (http://www.music-software-development.com/midi-tutorial.html) where percussion instruments are explicitly excluded from this rule. Why not simply create a checkbox "Generate note-off" near the checkbox "Ignore note-off" and let the user decide? Variable-length note are probably harder to implement, and not really useful in a drum machine. Markus |
@Yaoir : very interesting observation about the different behavior when recording the note using a midi device and entering it manually. @m-grabner : you are correct about not requiring a 'note off' for percussion instruments, and the option to simply not send any note off messages would indeed be a nice addition. But keep in mind that quite a few people (including me :-) use H2 not only for drums, but also as a synth sequencer. In that scenario the note off is obviously very relevant :-) |
Hi, i suppose that adding an "Omit NoteOff at end of sample" option should be easy to implement and would be helpful in such use cases. @thijz : This could be a nice method to define note length for empty samples.. I will have a look into this.. |
@thijz there are two kinds of notes in Hydrogen. "Dots", and "rectangles" which have defined duration. That option should affect only "dots". |
@elpescado : good observation, so a dot would be a 'percussion note' (=only note ON) and a rectangle would be the equivalent of the traditional midi notation in most DAWs like cubase/logic : a 'note on' at the beginning of the rectangle, and a 'note off' at the end. So this means that for the 'rectangle' the length of the sample should never affect the midi note on/off messages, right ? |
What's the idea behind sending note off when sample playback ends anyway? For me it doesn't make any sense, but I might be missing something. In my opinion, there are two cases to consider.
We should discuss whether this should be hardcoded or configurable, and in latter case, on what level (song vs application). I lean towards not sending note-off messages for "dot" notes. I think it's in line with MIDI spec (see @m-grabner comment above). |
+1 for dot=note ON only |
@thijz , @elpescado : Would you be willing to create a wiki page with the use cases and the description of the current situation concerning note off? This could be a help with the discussion for the moment and a good documentation for the future. Thijz, i remember that you also mentioned note off problems when using the Panic button. Another thing: I suppose the midi export has also to be considered. Maybe there it makes sense to embed also note off notes at sample end? Since we don't know to what machines/synths those midi tracks will be fed to.. |
@mauser : ok, will do |
wiki page : This wiki page is work in progress, feel free to add/comment |
My use case is using Hydrogen as pure sequencer in tandem with external sampler, so sound is generated solely by second application. In that case, I'd like to create a drumkit, assign MIDI notes to instruments but not load any sample sounds. However, Hydrogen refuses to play MIDI notes unless there's at leas one sample assigned to instrument. |
currently if you want to use a H2 instrument as a pure sequencer (ie the notes in the pattern are only sent out as MIDI notes. H2 does not generate any sound) you MUST still load a long empty wav file into that instrument.
if you do not do this the MIDI notes will have a duration of 0. as a consequence the external app will not play anything.
the best option would be that H2 always sends out MIDI notes regardless of the duration of the loaded WAV file
an alternative would be to add a 'MIDI out only' tickbox on the General tab of the Instrument editor that automatically loads a 'very long' empty WAV into that instrument
this second option however is only a quick workaround
comment by Chris Mennie :
The purpose of having an associated sound file (which admittedly is a huge hack) is to tell Hydrogen how long to hold the note before a note off message is sent. So it's not just a case of specifying a "very long" duration of sound file because different drum sounds require different play lengths.
As far as the code goes, I believe it'd be straight forward to define a default note length to use when there's no associated sound sample. However, this doesn't really solve the real issue (though it does go much farther than what's currently in place). I don't know how it should be presented, but the user needs to be able to specify the note length (via the UI? via midi input?).
The text was updated successfully, but these errors were encountered: