RtMidi.Net
1.3.0
dotnet add package RtMidi.Net --version 1.3.0
NuGet\Install-Package RtMidi.Net -Version 1.3.0
<PackageReference Include="RtMidi.Net" Version="1.3.0" />
paket add RtMidi.Net --version 1.3.0
#r "nuget: RtMidi.Net, 1.3.0"
// Install RtMidi.Net as a Cake Addin #addin nuget:?package=RtMidi.Net&version=1.3.0 // Install RtMidi.Net as a Cake Tool #tool nuget:?package=RtMidi.Net&version=1.3.0
Status
Branch | Build | Deployment |
---|---|---|
main | ||
develop | N/A |
What is it?
This project is a .NET wrapper for the RtMidi project.
I have created it to use it in an own project in RaspberryPi with a very basic utility as it is the reading of the notes, nevertheless I have done it thinking of being able to use all the options of the MIDI protocol, although I have not come to test them all.
If you find any error or have any improvement do not hesitate to make a PR.
How to use?
To connect to a device you can use the MidiInputClient
and MidiOutputClient
classes, MidiManager
has useful methods to know the environment.
There is a project (WorkerTest) to test the key reading but it really receives any kind of MIDI message so don't hesitate to extend it if you need it.
If you subscribe to the OnMessageReceived
event of the MidiInputClient
don't forget to use ActivateMessageReceivedEvent
for this event to work, this is because RtMidi includes a queue to store the events and later you can read the events with GetMessage
, if you need to stop reading the events in real time you can use DeactivateMessageReceivedEvent
to deactivate the event.
uint devicePort = 0;
var device = MidiManager.GetDeviceInfo(devicePort, RtMidi.Net.Enums.MidiDeviceType.Input);
MidiInputClient midiInputClient = new MidiInputClient(device);
midiInputClient.OnMessageReceived += MidiClient_OnMessageReceived;
midiInputClient.ActivateMessageReceivedEvent();
midiInputClient.Open();
//...wait or do something...
midiInputClient.Close();
midiInputClient.Dispose();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.