linux-show-player icon indicating copy to clipboard operation
linux-show-player copied to clipboard

MIDI note_off issue

Open moonshaadow opened this issue 2 years ago • 4 comments

Describe the bug New midi features are really nice. But a strange behavior is always here. When I send a note_off message, LiSP read it as a note_on.

Then if I try to manually set a note_off message, this is not working as expected.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Edit Cue > Cue Control > Midi Controls
  2. Click on capture
  3. send a midi note_on then a midi_note_off
  4. See that both two messages are set to "NOTE_ON"

OR:

  1. Add manually a note_on midi control and set it to START (not DEFAULT)
  2. Add manually a note_off midi control with same datas and set it to STOP (not DEFAULT)
  3. test the behavior of the midi note and see that note_on action is ok but note_off action does nothing

Expected behavior NOTE_OFF should be correctly recognized and should trigger action .

Screenshots Capture d’écran du 2022-03-02 23-55-09

Linux Show Player version: built from development branch

OS Version Debian Testing

moonshaadow avatar Mar 02 '22 23:03 moonshaadow

I'm unable to reproduce the behavior. Can you tell me how did you send the midi messages?

MIDI is mostly handled via an external library (mido), maybe it's related to this https://github.com/mido/mido/issues/130 ?

FrancescoCeruti avatar Mar 03 '22 00:03 FrancescoCeruti

I send the messages with a midi keyboard, I could try with others tools if you want. But I trust the output of Gmidimonitor, which is good for this task. I've tried with another monitor as well.

moonshaadow avatar Mar 11 '22 10:03 moonshaadow

I'm testing using https://vmpk.sourceforge.io/ and monitoring with Gmidimonitor or https://kmidimon.sourceforge.io/ I get the same readings of the application.

The only exception is the one mentioned before in the link (note_on with 0 velocity might be interpreted differently).

I might try to build a VM to test on Debian :thinking:

FrancescoCeruti avatar Mar 11 '22 19:03 FrancescoCeruti

I reproduce the bug using material (ProdipeMIDIlilo). So I try to test with VMPK but it doesn't produce the bug. It seems the it need a midi device.

Tested OS :

  • Xubuntu 20.04 x64 (both material & VMPK)
  • Manjaro Aarch64 (material only)

Tested application versions :

  • 0.5.1 (Xubuntu)
  • master (Xubuntu)
  • 0.5.3 (Manjaro)

Material :

  • Midi to USB interface : ProdipeMIDIlilo
  • A very old Keyboard (buy in 1989) : Bontempi AZ 8000

I have try to log the message in MIDIInput.__new_message(). Followin are messages I received when I press a note of my keyboard and release it :

01:42:39.062 INFO:: note_on channel=0 note=36 velocity=64 time=0
01:42:41.770 INFO:: note_on channel=0 note=36 velocity=0 time=0

Note that if I trace using aseqdump -p 32, I see :

 32:0   Note on                 0, note 36, velocity 64
 32:0   Note off                0, note 36

As we can see in aseqdump source code and in gmidimonitor source code, velocity=0 is translated to Note off. The bug of mido, you have quoted, don't.

Stav88 avatar Aug 28 '22 23:08 Stav88