Skip to content
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

H2 sends 2 note off midi messages when entering note length #464

Closed
thijz opened this issue Jan 10, 2017 · 6 comments
Closed

H2 sends 2 note off midi messages when entering note length #464

thijz opened this issue Jan 10, 2017 · 6 comments
Labels

Comments

@thijz
Copy link
Member

thijz commented Jan 10, 2017

to reproduce :

  • connect a midi monitor to the MIDI out of H2
  • set tempo low (50 bpm works fine)
  • using the GMkit, create a pattern and put 1 note on the 'crash jazz' instrument (any instrument will do, but a long sample makes it easier to demonstrate, hence using the 'crash jazz')
  • loop the pattern and the midi monitor will show a 'note on' when the sample starts and a 'note off' when the sample is completely played

so far so good :-)

  • now right-drag the note to the right (=define the note length) : the dot changes into a black bar that defines the note length
  • make sure that the note length is shorter than the actual sample (!)
  • loop the pattern
  • H2 sends a 'note on' at the start of the black bar and a 'note off' at the end of the bar > this is normal
    however ... H2 also sends out a second 'note off' when the pattern loops

this is what the pattern and the midi output looks like :
image

in theorie this should not be a problem, but some softsynths (like Calf Monosynth) dont seem to like that very much and it's also not very clean :-)

i'm running a version (git) that is 2 weeks old or so)

@mauser mauser added the bug label Jan 10, 2017
@thijz
Copy link
Member Author

thijz commented Jan 11, 2017

related to #63
(the last comment in this ticket also mentions on/off overlap, maybe this is the same issue ?)

@thijz
Copy link
Member Author

thijz commented Jan 11, 2017

ok, did some more testing and found out 2 things :

  1. when i connect the output of H2 to midimon and click the stop button in the H2 gui, H2 sends out a 'note off' midi message for each instrument that has midi out enabled. I guess this could makes sense (that way you stop all playing notes when you stop H2 transport) but what does not make sense is that this note off message is for 'octave 2' iso 'octave 0' (the actual instrument note) :
    image

  2. i also created this very simple pattern (see pic) and if i hit play, let it run a couple of times and then hit stop i see several note off messages (1 is the 'stop' note described above) :
    image

if i add a second instrument i see double the number of note off messages :
image

@thijz
Copy link
Member Author

thijz commented Jan 12, 2017

did some more digging on the 'note off' that H2 sends when you hit the 'stop' button :

when you stop H2 transport (hit Stop) H2 now sends out a rather useless note off message
it would be much more efficient to send a midi CC 'all notes off' message to the midi channel of all instruments that have midi out enabled

on this page : http://nickfever.com/music/midi-cc-list
you can see that there is a CC 120 (and also 123, not quite sure what would be best)

@thijz
Copy link
Member Author

thijz commented Jan 12, 2017

fyi: seems that hitting F12 (the H2 'panic' button) also sends out the same note off as when you hit 'stop'

CC 120 test :
i made a test setup where i connected VMPK (virtual midi keyboard that can also send out CC messages) to a softsynth. On VMPK i created a button that sends out 'CC 120' and when i hit that button all sound of the softsynth is muted immediately. I also tested with 123 but i didnt see any difference

Looks like this would be a good option to replace the 'note off'

@thijz
Copy link
Member Author

thijz commented Jan 12, 2017

update:
when you use the PC keyboard to trigger sounds in H2, or if you simply click on the instrument name in the pattern editor you also see 3 midi messages :

  1. 'note off' immediately followed by a 'note on' when you hit the key on the keyboard
  2. a second 'note off' when the sample stops playing

@thijz
Copy link
Member Author

thijz commented Mar 5, 2018

closing since all MIDI related stuff will be gathered here :
#63
https://github.com/hydrogen-music/hydrogen/wiki/MIDI-implementation

@thijz thijz closed this as completed Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants