arjenwitteveen / jai-midi

A basic MIDI module for Jai.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jai-midi

This module aims to provide basic MIDI I/O support for Jai programs in a simple to use, cross-platform manner. It allows you to receive MIDI messages from a MIDI source, and send MIDI messages to a MIDI destination. There is also basic support for reading MIDI files. The module does not aim to support all the possible functionality that MIDI (or the MIDI driver of each OS) provides. There is no support for MIDI 2.0.

Backends

The following backends are used:

  • On Windows, the Windows Multimedia API is used.
  • On macOS, CoreMIDI is used.
  • On Linux, ALSA is used. A version of libasound is included, as well as the necessary ALSA headers needed to generate bindings with.

Getting started

The module's API is documented in module.jai. The examples directory contains a set of sample programs that show how to use the module. If you want to dive into the code, the file to start with would be midi.jai.

A simple build script (first.jai) is included with the module. This is mainly useful when working on the module itself. It can be used to run tests, build the examples, and generate bindings. To see its options, run jai first.jai.

Disclaimer

I only have so much MIDI hardware that I can experiment with, so do not consider this module to be thoroughly battle-tested. The Windows version has been tested on Windows 10; the macOS implementation has been tested on an Intel Mac on Big Sur; the Linux implementation has been tested on a virtual machine running Ubuntu 22.04 LTS. For questions, suggestions, or bug reports, feel free to contact me on the Jai beta Discord.

License

This module is provided under the MIT license.

If you are using Linux, this module uses the ALSA library, which is released under the LGPL license.

About

A basic MIDI module for Jai.

License:MIT License


Languages

Language:C 100.0%