RtMidi.Net 1.3.0

dotnet add package RtMidi.Net --version 1.3.0
NuGet\Install-Package RtMidi.Net -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RtMidi.Net" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RtMidi.Net --version 1.3.0
#r "nuget: RtMidi.Net, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

Quality Gate Lines of Code Bugs Coverage Maintainability Rating

Branch Build Deployment
main Build Build Status Nuget package
develop Build Build Status 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last updated
1.3.0 195 9/6/2023
1.2.0 128 9/6/2023
1.1.0 121 9/6/2023
1.0.0 694 11/20/2021