#midi #audio #music #smf

nodi

A library for playback and abstraction of MIDI files

30 releases (12 breaking)

Uses new Rust 2021

0.19.2 Jun 13, 2022
0.18.1 Jun 8, 2022
0.14.0 Mar 31, 2022
0.13.2 Oct 18, 2021

#388 in Audio

Download history 22/week @ 2022-09-26 34/week @ 2022-10-03 11/week @ 2022-10-10 8/week @ 2022-10-17 25/week @ 2022-10-24 31/week @ 2022-10-31 39/week @ 2022-11-07 23/week @ 2022-11-14 20/week @ 2022-11-21 14/week @ 2022-11-28 17/week @ 2022-12-05 51/week @ 2022-12-12 21/week @ 2022-12-19 19/week @ 2022-12-26 14/week @ 2023-01-02 42/week @ 2023-01-09

126 downloads per month
Used in 2 crates

MIT license

31KB
697 lines

Nodi

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.

Features

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

Examples

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.

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.
  • midir-jack: Same with midir but uses the Jack backend.
  • midir-winrt: Same with midir but uses the WinRT backend.

Dependencies

~0.2–28MB
~460K SLoC