hello
As you can see in the patch, with w10 & linux, I generate a note at note-out (normal) but also at note-of (not normal) : OM 6.12.1, what else ?
Cheers~
… jerome
midi-in.omp (19.5 KB)
hello
As you can see in the patch, with w10 & linux, I generate a note at note-out (normal) but also at note-of (not normal) : OM 6.12.1, what else ?
Cheers~
… jerome
midi-in.omp (19.5 KB)
sorry ! I meant
As you can see in the patch, with w10 & linux, I generate a note at NOTE-IN (normal) but also at note-of (not normal) : OM 6.12.1, what else ?
my bad…
Hi Jérôme.
Testing your patch here there’s only note-on’s passed through the #'preprocess filter as prescribed.
Perhaps the device you’re using sends keyoffs as keyons with vel=0?
You can check by putting a 'print object after the input in the “preprocess” lambda-patch.
Or just evaluate this in your listener/lisp
(defmethod test-Type :before ((self MidiEvent) type)
(print (ev-type self)))
Any of the approaches will print the midi-ev type coming in. Here it prints :keyon followed by :keyoff.
-anders
Hi Anders,
It is a strange thing because I didn’t have this problem with this patch with OM 6.10.(windows, osx, linux) with the same keyboard
(see attached) As you can see, I generate :keyon even when I make a :keyoff…
Perhaps the device you’re using sends keyoffs as keyons with vel=0? : Maybe… So why did it work with OM 6.10 ?
Any hint ?
Same behavior with Ubuntu and W10
… jerome
hi Anders,
I’ve just monitored my keyboard (a really simple digital piano) and It sends both :keyon and :keyoff
… jerome
Hi Jéröme. I’m not sure what you want here.
I've just monitored my keyboard (a really simple digital piano) and It sends both :keyon and :keyoff
The dump you sent shows only :keyon. (Using the :before method i sent you and your patch, any :keyoff events would be printed as such.)
You can add a check for velocity!=0 inside ‘preprocess’ if it’s just in this patch you want to filter out :keyons with vel=0.
If you want this behavior in all of OM you can hack something like this (which changes all :keyon’s created with vel=0 to :keyoff’s) and place it in a file inside your /user/ folder:
(defmethod initialize-instance :after ((self midievent) &rest l &key (mode 0))
(when (and (eql (ev-type self) :keyon)
(listp (ev-fields self))
(typep (second (ev-fields self)) '(real 0 0)))
(setf (ev-type self) :keyoff))
self)
But take care! This will make all :keyon events with zero velocity actually be :keyoffs in this workspace.
-anders
not really,
my bad…