micdah / RtMidi.Core

RtMidi for .Net Standard
https://rtmidicore.micdah.dk/
Other
36 stars 12 forks source link

how to use? #25

Closed datadreamersllc closed 1 year ago

datadreamersllc commented 3 years ago

Hey man, I have been playing around with your RtMidi.Core, it looks great and have gotten it compile. My goal is to be able to listen for and print out the MIDI note on and off events as they arrive.

I am rather unfamiliar with C and have been racking my brain trying to figure out how to add code to your Program.cs sample so that I can register an event handler for MIDI notes and print Channel/Key/Velocity to console. Do you have any sort of example code that shows how you would do that?

smoothdeveloper commented 3 years ago

You may look at how the midi input is tested: https://github.com/micdah/RtMidi.Core/blob/92d501b782e8a544bffbcd1833c32cb3ad623ee7/RtMidi.Core.Tests/MidiInputDeviceTests.cs#L34-L46

you basically need to register to the NoteOn/NoteOff and few more events according to your needs.

micdah commented 1 year ago

Thanks @smoothdeveloper for helping out here, sounds like your guidance was sufficient so I am closing the issue.