Skip to content

Processing/Getting Info on a MIDI File Before Saving #278

Answered by melanchall
dblondin asked this question in Q&A
Discussion options

You must be logged in to vote

Well, now I see the problem. Your device sends Note Off messages as Note On ones with zero velocity. It's a common practice. But DryWetMIDI receives events as is by default. But you can change this behavior.

Somewhere in your code you get InputDevice that is passed to the constructor of the Recording class. Just set SilentNoteOnPolicy property of the device to SilentNoteOnPolicy.NoteOff before recording started:

inputDevice.SilentNoteOnPolicy = SilentNoteOnPolicy.NoteOff;

That should fix your problem.

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@melanchall
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by melanchall
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants