Skip to content

fserb/RTMidi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtmidi bindings for haxe

This is a native Haxe extension for rtmidi.

It comes with precompiled ndlls for Mac, but it should work with all RTMidi targets (Windows, Mac, Linux).

Both RTMidiIn and RTMidiOut are supported.

To compile the extension:

cd project
haxelib run hxcpp Build.xml -Dmac
haxelib run hxcpp Build.xml -Dwindows
haxelib run hxcpp Build.xml -Dlinux

To use it:

  1. Add the haxelib dependency (RTMidi)

  2. Some code like:

function callback(msg: Array<Int>) {
  // msg is an array with the MIDI received bytes
}

static public function main() {
  midi = new rtmidi.RTMidiIn();
  if (midi.getPortCount() == 0) return;

  midi.openPort(0);
  midi.setCallback(callback);
  midi.ignoreTypes(false, false, false);
}

About

rtmidi haxe native port

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published