NAME
Peta::MIDI - MIDI in and out in real time, as MIDI::RtMidi::FFI has it, with no library
VERSION
version 0.2610180
SYNOPSIS
use Peta::MIDI::Device;
my $out = Peta::MIDI::Device->new(type => 'out', name => 'arpeggios');
$out->open_port_by_name(qr/FLUID|TiMidity/i);
$out->note_on(0, 60, 100);
my $in = Peta::MIDI::Device->new(type => 'in');
$in->open_port_by_name(qr/keyboard/i);
$in->set_callback_decoded(sub ($dt, $msg, $event) { say "@$event" });
$in->dispatch(60); # or any AnyEvent loop: EV, Event, IO::Async, Coro
DESCRIPTION
The devices of MIDI::RtMidi::FFI::Device (its ports, by number, name or pattern, virtual ports; its messages as bytes or decoded events; its callbacks, queue and handle; its senders, RPN, NRPN and panic), built on the ALSA sequencer through its device with no library, so on perl5 and pperl alike, on Linux.
- Peta::MIDI::Device, Peta::MIDI::Device::In, Peta::MIDI::Device::Out
-
Devices and ports; an input; an output.
- Peta::MIDI::Event, Peta::MIDI::Decoder, Peta::MIDI::Encoder
-
MIDI messages as events (MIDI::Stream's names, MIDI::Event's besides); bytes into events (running status, system exclusive, real time anywhere, controllers of 14 bits, the clock's tempo) and back.
- Peta::MIDI::ALSA
-
The ALSA sequencer's client: ports, connections, bytes in and out.
AUTHOR
PetaMem s.r.o. <info@petamem.com>
COPYRIGHT
Copyright (c) 2026 PetaMem s.r.o.
LICENSE
This package is free software, dual-licensed under the Artistic License 2.0 and the BSD 2-Clause License. See the LICENSE file of the distribution.