Skip to content

jh-midi/portmidi-sml

Repository files navigation

portmidi 2.0

  • portmidi for PolyML with virtual ports, all Portmidi functionalities are at your disposal except callback function
  • You can use Portmidi without worry of pointers : just use device id or name
  • please read tutor_eng.sml and execute lines step by step for getting started
  • use modifier.sml to transform MIDI message from input to output (Presonus Atom SQ -only one channel- )
  • create virtual "my-diato" midi ports for use with Ardour, Tracktion MuseScsore ...
  • and use diato keyboard for entering, recording your music on Linux.
  • these are examples for using read1 and write1 added to lib interface for realtime input-output
  • portmidi libs are provided for 64bits : tested on Debian Linux, Mac Catalina and Windows 10
  • compiled from https://github.com/PortMidi/portmidi
  • read the portmidi doc at https://portmidi.github.io/portmidi_docs/

Installing PolyML

learn sml language

installing portmidi-sml and compile virtual port

  • I provide already compiled portmidi dynamic library for facility, but if this don't work for you, you should compile portmidi yourself and modify the function "getLibMidi()" in the file PortmidiFFI.sml
  • download https://github.com/jh-midi/portmidi-sml/archive/refs/heads/main.zip
  • copy this file to your home directory
  • unzip the file : unzip main.zip

create your virtual midi port (no need to be a programmer)

  • cd portmidi-sml-main
  • polyc virt.sml -o virtual-portmidi (compile the program )
  • now you can create virtual midi port : ./virtual-portmidi diato-port
  • you can create your in-out named ports : ./virtual-portmidi my-midi-port
  • and you can use it with my diato program (refresh your chromium navigator) or another at your convenance

installing on windows

installing on Mac

It's the same as for Linux, but I was only able to compile for the Intel version (Catalina). Just modify PortmidiFFI.sml to add what is needed for M1 and M2.