On December 21, 2015 12:23:51 PM Andrew Deryabin wrote:
> Hi guys,
> 
> While rewriting midi support code for lv2 I found some interesting moment:
> 
> There is a message ME_NOTEOFF which is a standard midi note off message
> width code 0x80. It's sent only when playing with midi keyboard as part
> of jack/alsa midi events.
> But when playing midi parts this message is not sent at all, even when
> transport is stopped.
> While digging I found _stuckNotes array which is used for sending note
> offs automatically (fix me). But due to small bug in code for adding
> stuck events to this array, instead of adding ME_NOTEOFF, ME_NOTEON was
> added. Some instruments handled this without any problem, but others
> (like Calf monosynth) continued to play last note after transport was
> stopped.
> 
> Hope the fix ( bd84479) will work (like in my case).
> Please check - if it works for you too?

Hm, this patch does not look correct.
It casts as boolean but the variable is an integer.

Are you sure something is wrong? Can you post a file?
I tested here with Calf Monosynth and all seemed OK.
I programmed several sequential and parallel notes, 
 at first leaving each note off velocity = 0, then I set 
 each off velocity to 35. Playing each note turned off OK.

Also I used -M and -m flags and watched the output with
 regular midi port output. Looked OK.

(Note: I have /not/ pulled your LV2 crash fix or this fix yet.
Could this problem be related to those fixes?)

Usually this problem concerns percussion and synths
 like say, SimpleSynth, where there are specific buttons
 to ignore the note-offs or not, depending on whether 
 your samples are percussive or not.

AFAIK everything's (mostly) cool so far with the midi engine.
I know there are some issues, some obscure, for example 
 with muting notes on stop.

My branch midi_fixes rewrites some note processing. 
Specifically, for the 'stuck notes' I moved the lists into 
 class Track, moved some stuff around and fixed muting 
 notes when stopped etc. All for the better.

It's fairly extensive but, as usual it is sandwiched in with 
some other fixes that are in progress but need more thought. 
Hard to avoid sometimes. (Full 14-bit controller support including 
 /input/ events, using a custom hardware midi event codec that 
 bypasses ALSA codec due to incomplete (N)RPN 14-bit support.)

The branch /is/ up to date, as of last week. 
Hope to merge near future.

I know the current midi engine seems a bit of a dog's breakfast,
 mostly because of simultaneous ALSA and Jack midi support. 
I was reviewing last week and I'm itching to rewrite again.
With configurable ALSA and so on.

Tim.


------------------------------------------------------------------------------
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to