#midi #audio #music


A library for playback and abstraction of MIDI files

21 releases (7 breaking)

new 0.13.2 Oct 18, 2021
0.12.0 Oct 6, 2021

#64 in Audio

Download history 157/week @ 2021-09-05 100/week @ 2021-09-12 196/week @ 2021-09-19 233/week @ 2021-09-26 288/week @ 2021-10-03 60/week @ 2021-10-10 112/week @ 2021-10-17

361 downloads per month
Used in 2 crates

MIT license

720 lines


Build Status crates.io docs.rs

Nodi provides types and functions for playback and abstraction of MIDI files.

This crate works alongside with the midly and midir crates. However you can implement your own MIDI player, instead of relying on midir.


  • Time-map MIDI events.
  • Join or merge multiple MIDI tracks.
  • Play MIDI files.
  • Split a MIDI track into measures/bars.
  • Transpose a track.


Check out /examples/play_midi.rs for a basic midi player.

I started developping this crate because I needed the features it now offers. Here are some real-world examples of nodi in action:

  • midnote: An accessible MIDI note viewer/ player.
  • plmidi: A MIDI player for the command line.


Nodi uses the log crate for the logging; you can use a compatible logger for consumption.

Crate Features

Features enabled by default:

  • hybrid-sleep: A more accurate sleep, mixing regular sleep with spin locking efficiently. With this feature enabled the default implementations of timers in this crate will use this. Highly recommended for Windows users but it may also increase timing on other platforms.

Optional features:

  • midir: Adds implementations of Connection for midir::MidiOutputConnection.
  • jack: Same with midir but uses the Jack backend.
  • winrt: Same with midir but uses the WinRT backend.
  • verbose-log: Enables more logging, not recommended unless you really want to see the Ticker tick.


~40K SLoC