NAME
Peta::MIDI::Device::Out - a MIDI output as MIDI::RtMidi::FFI::Device::Out has it
VERSION
version 0.2610180
SYNOPSIS
my $out = Peta::MIDI::Device::Out->new(name => 'player', enable_running_status => 1);
$out->open_port_by_name([ qr/FLUID/i, qr/TiMidity/i ]);
$out->program_change(0, 19);
$out->note_on(0, 60, 100);
$out->cc(0, 7, 100, 10, 64); # two controllers
$out->pitch_bend(0, -2048);
$out->rpn(0, 0, 12 << 7); # bend range: 12 semitones
$out->send_event(sysex => "\x7e\x7f\x09\x01");
$out->panic;
DESCRIPTION
Messages out of the device's port (Peta::MIDI::Device) to whoever it is connected to. Events are encoded by Peta::MIDI::Encoder, in MIDI::Stream's names or MIDI::Event's.
METHODS
new
new(name => ..., enable_14bit_cc => 0, enable_running_status => 0).
send_message, send_message_encoded, send_event, encode_message, encode
Messages as bytes; an event (or a list of them) encoded and sent, or only encoded.
note_on, note_off, control_change, cc, patch_change, program_change, key_after_touch, polytouch, channel_after_touch, aftertouch, pitch_wheel_change, pitch_bend, sysex, clock, start, stop, continue
Each an event's fields (cc, program_change, polytouch, aftertouch and pitch_bend MIDI::Stream's names for the others): note_on($channel, $note, $velocity), cc($channel, $controller, $value, ...), pitch_bend($channel, $value) (-8192 .. 8191), sysex($bytes), clock ...
rpn, nrpn
rpn($channel, $number, $value): the parameter and its value (14 bits, or [ coarse, fine ]), then the null parameter.
panic, PANIC
All notes off (controller 123) on a channel or all; PANIC a note off for every key.
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.