Did you know? You can control MIDI on Mac with SWI-PrologSearch Documentation:
SWI-Prolog owl logoPredicate read_stream_to_codes/3