Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.
/ libremidi Public archive
forked from celtera/libremidi

A modern C++ MIDI real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI.

License

BSD-2-Clause, Unknown licenses found

Licenses found

BSD-2-Clause
LICENSE.ModernMidi
Unknown
LICENSE.RtMidi
Notifications You must be signed in to change notification settings

Soundux/libremidi

 
 

Repository files navigation

libremidi

Build status

libremidi is a cross-platform C++17 library for real-time and MIDI file input and output.

This is a fork based on two libraries:

Design

Instead of adding another abstraction layer like ModernMIDI does, this directly modernizes the RtMidi codebase with new C++ features and improvements:

  • The library can be used header-only:

    • Define LIBREMIDI_HEADER_ONLY=1.
    • Add the include folder to your include path.
    • #include <libremidi/libremidi.hpp>
  • Callbacks are passed by std::function and generally simplified.

  • Ability to use boost::small_vector to pass midi bytes instead of std::vector to reduce allocations.

  • Allow to pass span when available (C++20) or (uint8_t* bytes, std::size_t size) pairs whenever possible to reduce copying.

  • Less indirections, virtuals and memory allocations.

  • Simplify usage of some functions, use C++ return style everywhere.

  • Use of standard C++ snake_case.

  • Simplification of exceptions.

  • Passes clean through clang-tidy, clang analyzer, GCC -Wall -Wextra, ASAN, UBSAN etc etc.

New & improved backends

  • JACK support on Windows.
  • JACK support through weakjack to allow runtime loading of JACK.
  • UWP MIDI support on Windows
  • Emscripten support to run on a web browser with WebMIDI.
  • Raw ALSA support in addition to the existing ALSA sequencer support.

New features & APIs

  • Notification of device connection / disconnection.
  • Support chunking of output data (only supported on raw ALSA backend so far).

Roadmap

  • MIDI 2.0 support.
  • More tests and compliance checks.
  • Work even more towards this library being a zero-cost abstraction on top of native MIDI APIs.
  • Rethink some design issues with the original RtMidi, for instance the way port numbers work is not reliable.
  • Refactor duplicated code across backends.

They use this library

  • ossia.io: libremidi is used for every MIDI operation.

About

A modern C++ MIDI real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI.

Resources

License

BSD-2-Clause, Unknown licenses found

Licenses found

BSD-2-Clause
LICENSE.ModernMidi
Unknown
LICENSE.RtMidi

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.9%
  • CMake 3.1%