# Any good free C# library for midi playback and sequencing?



## mopsiflopsi (Jan 14, 2021)

Hey folks. Software dev question here: does anyone know a good .Net/C# library for sequencing and playback of midi files? I'm interested in writing a simple chord progression generator kind of tool using Unity. Looking for libraries that can give me a head start. Basic stuff I need:
- Play specified pitches as requested,
- Generate and export midi file with a sequence of specified pitches

If there's something written specifically for Unity, even better. Thanks in advance.


----------



## SergeD (Jan 14, 2021)

Maybe you should instead check here








Human verification


Stack Overflow | The World’s Largest Online Community for Developers




stackoverflow.com





or here





C# midi free download - SourceForge


C# midi free download. View, compare, and download C# midi at SourceForge




sourceforge.net





or even on Codeplex site


----------



## mopsiflopsi (Jan 14, 2021)

SergeD said:


> Maybe you should instead check here


Thanks, yeah I checked on a few sites as well as github. I was curious if any VI-C users personally used and could recommend one, so I don't have to waste hours discovering shortcomings of various open source projects.


----------



## Michel Simons (Jan 14, 2021)

Funny thing is that I was thinking about something similar last night in between sleeping. I haven't checked if anything like that exists though.


----------



## ennbr (Jan 14, 2021)

Have you looked into JUCE it's an entire framework for audio app/programs and plugins runs on multiple platforms Windows, Mac, iOS, Android etc...








JUCE | JUCE


Deliver music applications on all main platforms, with high performances and professional tools




juce.com


----------



## mopsiflopsi (Jan 14, 2021)

ennbr said:


> Have you looked into JUCE it's an entire framework for audio app/programs and plugins runs on multiple platforms Windows, Mac, iOS, Android etc...
> 
> 
> 
> ...


Oo that looks cool. Although I'm not terribly keen on C++.

Also found this but it's not a very mature framework: https://github.com/obiwanjacobi/vst.net


----------



## gyprock (Jan 14, 2021)

Python library:


music21: a Toolkit for Computer-Aided Musicology


----------



## maks991 (Apr 11, 2022)

Sorry for late reply. You can use my DryWetMIDI library, which is a .NET library to work with MIDI. It's supereasy to start playback of a MIDI file with it:


```
var midiFile = MidiFile.Read("My MIDI file.mid");
var playback = midiFile.GetPlayback();
playback.Start();
```

`Playback` has a lot of features, you can read in more detail in the library docs: https://melanchall.github.io/drywetmidi/articles/playback/Overview.html.


----------

