VOOZH about

URL: https://www.nuget.org/packages/Melanchall.DryWetMidi/

⇱ NuGet Gallery | Melanchall.DryWetMidi 8.0.3




👁 Image
Melanchall.DryWetMidi 8.0.3

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Melanchall.DryWetMidi --version 8.0.3
 
 
NuGet\Install-Package Melanchall.DryWetMidi -Version 8.0.3
 
 
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="Melanchall.DryWetMidi" Version="8.0.3" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Melanchall.DryWetMidi" Version="8.0.3" />
 
Directory.Packages.props
<PackageReference Include="Melanchall.DryWetMidi" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Melanchall.DryWetMidi --version 8.0.3
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Melanchall.DryWetMidi, 8.0.3"
 
 
#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.
#:package Melanchall.DryWetMidi@8.0.3
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Melanchall.DryWetMidi&version=8.0.3
 
Install as a Cake Addin
#tool nuget:?package=Melanchall.DryWetMidi&version=8.0.3
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 DryWetMIDI Logo

👁 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:

  • Read, write and create Standard MIDI Files (SMF). It is also possible to:
    • read RMID files where SMF wrapped to RIFF chunk;
    • easily catch specific error when reading or writing a MIDI file since all possible errors in a file are presented as separate exception classes;
    • finely adjust the process of reading and writing (it allows, for example, to read corrupted files and repair them, or build MIDI file validators);
    • implement custom meta events and custom chunks that can be written to and read from MIDI files.
  • Send MIDI events to/receive them from MIDI devices.
  • Play MIDI data and record it.
  • Manage MIDI data either with low-level objects, like a MIDI event, or high-level ones, like a note, using different time and length representations (read the High-level data managing section of the library docs).
  • Build musical compositions (see Pattern page of the library docs) and use music theory API (see Music Theory - Overview article).
  • Perform complex tasks like quantizing, notes splitting or converting MIDI file to CSV representation (see Tools page of the library docs).

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.

Projects using DryWetMIDI

Here the list of noticeable projects that use the library:

  • Playtonik
    Playtonik is an app designed and developed by 5of12. It uses physics-based interactions, immersive spatial audio and dynamic haptic feedback for a fun, relaxing experience. For the fidgeters, Playtonik comes with a selection of built in sounds and an on screen keyboard. Scale filters help keep you in tune, so you can focus on having fun! For the musicians, MIDI support lets you connect your favourite instrument. Playtonik can work as a note source or as a chaotic MIDI delay, great for adding texture to your sound.
  • EMU – Sound to Light Controller
    EMU (DMXIS’s next generation) is a state-of-the-art, intuitive sound-to-light controller designed for professional live musicians and DJs. Easy to use software, EMU allows you to run automated or responsive DMX light shows, leaving you to focus on your show!
  • Musical Bits
    Musical Bits creates software that helps you creating music. Our software uses latest technology, including AI, to model all layers of creativity of a human composer. These layers are implemented as reusable and combinable software components. Musical Bits software is available as co-pilot for producers and composers under the name KLANGMACHT and helps you create, drumsounds, beats, guitars, background choirs, lyrics and more. We even create and distribute full virtual bands, albums and songs. For example, check out the Frostbite Orckings.
  • CoyoteMIDI
    CoyoteMIDI extends the functionality of your MIDI devices to include keyboard and mouse input, including complex key combinations and multi-step macros.
  • Clone Hero
    Free rhythm game, which can be played with any 5 or 6 button guitar controller, game controllers, or just your standard computer keyboard. The game is a clone of Guitar Hero.
  • Electrophonics
    A collection of virtual musical instruments that features real MIDI output.
  • Rustissimo
    Using Rustissimo you can create a concert with your friends and play instruments with synchronization.

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.

Getting Started

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (7)

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.

GitHub repositories (12)

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
Loading failed