NAME

MIDI::RtMidi::Util - Handy Utilities for Real-time MIDI

VERSION

version 0.0301

SYNOPSIS

use MIDI::RtMidi::Util qw(out_port stop_device input_ports output_ports);

my $ports = input_ports(); # e.g. ['USB MIDI Interface', ...]
$ports = output_ports();

my $midi_out = out_port('usb');
# Do something cool ...

END {
  stop_device($midi_out);
}

DESCRIPTION

MIDI::RtMidi::Util is a junk drawer for Real-time MIDI utilities.

FUNCTIONS

out_port

$out_port = out_port($name);

Open and return a named MIDI::RtMidi::FFI::Device RtMidiOut device.

This function takes a unique part of an open port name as its argument.

stop_device

stop_device();

Stop and close an open MIDI::RtMidi::FFI::Device device.

input_ports

$input_ports = input_ports();

Return an array-reference of open MIDI input port names.

output_ports

$output_ports = output_ports();

Return an array-reference of open MIDI output port names.

SEE ALSO

MIDI::RtMidi::FFI::Device

AUTHOR

Gene Boggs <gene.boggs@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Gene Boggs.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.