![]() |
VOOZH | about |
dotnet add package Melanchall.DryWetMidi --version 8.0.3
NuGet\Install-Package Melanchall.DryWetMidi -Version 8.0.3
<PackageReference Include="Melanchall.DryWetMidi" Version="8.0.3" />
<PackageVersion Include="Melanchall.DryWetMidi" Version="8.0.3" />Directory.Packages.props
<PackageReference Include="Melanchall.DryWetMidi" />Project file
paket add Melanchall.DryWetMidi --version 8.0.3
#r "nuget: Melanchall.DryWetMidi, 8.0.3"
#:package Melanchall.DryWetMidi@8.0.3
#addin nuget:?package=Melanchall.DryWetMidi&version=8.0.3Install as a Cake Addin
#tool nuget:?package=Melanchall.DryWetMidi&version=8.0.3Install as a Cake Tool
👁 NuGet (full)
👁 NuGet (nativeless)
👁 Unity asset (full)
👁 Unity asset (nativeless)
You can help to make the library better! Please take a quick survey.
DryWetMIDI is the .NET library to work with MIDI data and MIDI devices. It allows:
Please see Getting started section below for quick jump into the library.
If you want to create an issue or a discussion, read this article first – Support.
Here the list of noticeable projects that use the library:
If you find that DryWetMIDI has been useful for your project, please put a link to the library in your project's About section or something like that.
Let's see small examples of what you can do with the library.
It's possible to read a MIDI file, then collect all notes from it and print their time and length in the metric (hours, minutes, second, ...) format:
var midiFile = MidiFile.Read("MyFile.mid");
var tempoMap = midiFile.GetTempoMap();
foreach (var note in midiFile.GetNotes())
{
var time = note.TimeAs<MetricTimeSpan>(tempoMap);
var length = note.LengthAs<MetricTimeSpan>(tempoMap);
Console.WriteLine($"{note} at {time} with length of {length}");
}
Or maybe you want to record data from a MIDI device, then quantize recorded events by the grid with step of 1/8, and play the data via the default Windows synth:
var inputDevice = InputDevice.GetByName("MyMidiKeyboard");
inputDevice.StartEventsListening();
var recording = new Recording(TempoMap.Default, inputDevice);
recording.Start();
// ...
recording.Stop();
inputDevice.Dispose();
var recordedFile = recording.ToFile();
recording.Dispose();
recordedFile.QuantizeObjects(
ObjectType.TimedEvent,
new SteppedGrid(MusicalTimeSpan.Eighth));
var outputDevice = OutputDevice.GetByName("Microsoft GS Wavetable Synth");
var playback = recordedFile.GetPlayback(outputDevice);
playback.Start();
// ...
playback.Dispose();
outputDevice.Dispose();
You can even build a musical composition:
var pattern = new PatternBuilder()
// Insert a pause of 5 seconds
.StepForward(new MetricTimeSpan(0, 0, 5))
// Insert an eighth C# note of the 4th octave
.Note(Octave.Get(4).CSharp, MusicalTimeSpan.Eighth)
// Set default note length to triplet eighth and default octave to 5
.SetNoteLength(MusicalTimeSpan.Eighth.Triplet())
.SetOctave(Octave.Get(5))
// Now we can add triplet eighth notes of the 5th octave in a simple way
.Note(NoteName.A)
.Note(NoteName.B)
.Note(NoteName.GSharp)
// Insert a simple drum pattern
.PianoRoll(@"
F#2 ||||||||
D2 --|---|-
C2 |---|---")
.Repeat(9)
// Get pattern
.Build();
var midiFile = pattern.ToFile(TempoMap.Create(Tempo.FromBeatsPerMinute(240)));
midiFile.Write("DrumPattern.mid");
Also you can check out sample applications from CIRCE-EYES (see the profile, VB.NET is used)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net45 net45 is compatible. net451 net451 was computed. net452 net452 was computed. net46 net46 was computed. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Melanchall.DryWetMidi:
| Package | Downloads |
|---|---|
|
Carbon.Feature.Media
Provides various document and media processing functions. |
|
|
launchpad-dot-net
An extension of iUltimateLP's Launchpad DotNet library that adds support for the Launchpad Mini Mk3 and enables SysEx support. Ported to dotnet standard by pstaszko. |
|
|
BehringerXTouchExtender
Send and receive events with a Behringer X-Touch Extender DAW MIDI control surface over USB. |
|
|
Sonora
.NET Audio Framework for audio and MIDI playback, editing, and plugin integration. |
|
|
Aura.NET
.NET Audio Framework for audio and MIDI playback, editing, and plugin integration. |
Showing the top 12 popular GitHub repositories that depend on Melanchall.DryWetMidi:
| Repository | Stars |
|---|---|
|
QL-Win/QuickLook
Bring macOS “Quick Look” feature to Windows
|
|
|
openutau/OpenUtau
Open singing synthesis platform / Open source UTAU successor
|
|
|
SciSharp/Keras.NET
Keras.NET is a high-level neural networks API for C# and F#, with Python Binding and capable of running on top of TensorFlow, CNTK, or Theano.
|
|
|
xunkong/KeqingNiuza
刻记牛杂店
|
|
|
sabihoshi/GenshinLyreMidiPlayer
Genshin Impact Windsong Lyre, Floral Zither, & Vintage Lyre MIDI auto player in Modern Mica UI. Supports MIDI instruments & Playlist controls.
|
|
|
vocoder712/OpenUtauMobile
OpenUtau Mobile 是一个面向移动端的开源免费歌声合成软件; OpenUtau Mobile is a free and open-source singing voice synthesis software for mobile devices.
|
|
|
ImAxel0/Openthesia
Customizable midi visualization software kinda like Synthesia for Windows (Wine-compatible on Linux)
|
|
|
AmanoTooko/Daigassou
Transfer midi file to keyboard events in FFXIV bard performance solo and multiplayer
|
|
|
OpenNefia/OpenNefia
Moddable engine reimplementation of the Japanese roguelike Elona.
|
|
|
elgarf/vMixUTC
Customizable controller for vMix
|
|
|
ianespana/ShawzinBot
Convert a MIDI input to a series of key presses for the Shawzin
|
|
|
akira0245/MidiBard
Bard performance plugin for FFXIV.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0-prerelease8 | 120 | 5/30/2026 |
| 9.0.0-prerelease1 | 234 | 3/28/2026 |
| 8.0.3 | 10,669 | 12/15/2025 |
| 8.0.2 | 4,731 | 7/31/2025 |
| 8.0.1 | 2,991 | 6/23/2025 |
| 8.0.0 | 4,364 | 5/18/2025 |
| 7.2.0 | 41,865 | 9/5/2024 |
| 7.1.0 | 14,330 | 5/2/2024 |
| 7.0.2 | 13,071 | 12/22/2023 |
| 7.0.1 | 2,043 | 8/30/2023 |
| 7.0.0 | 4,484 | 6/26/2023 |
| 6.1.4 | 19,420 | 1/14/2023 |