NAME
MIDI::RtMidi::FFI::Device::Out - OO interface for MIDI::RtMidi::FFI output deviced
VERSION
version 0.10
SYNOPSIS
DESCRIPTION
METHODS
See MIDI::RtMidi::FFI::Device for documentation methods common to all device types.
new
Construct new instance.
my $midiin = MIDI::RtMidi::FFI::Device::In->new( %options );
See global device options in "new" in MIDI::RtMidi::FFI::Device.
enable_14bit_cc
Enable encoding of 14-bit values to MSB/LSB pairs for lower 32 CCs. Default: false
enable_running_status
Enable running-status in encoded messages - status is not retransmitted for consecutive messages with the same status, after the first message in the set.
send_message
$device->send_message( $msg );
$device->send_message( $msg, $other_msg );
Sends a message - MIDI bytes - on the device's open port.
encode_message
my $msg = $device->encode_message( note_on => 0x00, 0x40, 0x5a )
$device->encode_message( @event );
Attempts to encode the passed message with MIDI::Stream::Encoder.
encode
Alias for "encode_message".
send_message_encoded
$device->send_message_encoded( @event );
# Event, channel, note, velocity
$device->send_message_encoded( note_on => 0x00, 0x40, 0x5A );
$device->send_message_encoded( control_change => 0x01, 0x1F, 0x3F7F );
$device->send_message_encoded( sysex => "Hello, computer?" );
Sends an event to the open port. Event names may be MIDI::Event names or MIDI::Stream event names.
send_event
Alias for "send_message_encoded".
rpn
$device->rpn( $channel, $rpn, $value );
$device->rpn( $channel, [ $rpn_msb, $rpn_lsb ], [ $value_msb, $value_lsb ] );
$device->rpn( $channel, [ $rpn_msb, $rpn_lsb ], [ $value_msb ] );
$device->rpn( 0xf, 0x0000, 0x1fff );
Send a single Registered Paramater Number (RPN) value.
This expects the parameter number and its value as 14-bit values, or you can pass an arrayref for either to speficy MSB and LSB separately.
If your parameter expects only a MSB value (CC6 only), you may specify just the MSB in an arrayref, or shift the MSB by 7 bits. That is:
$device->rpn( $channel, $rpn, $value_msb << 7 );
$device->rpn( $channel, $rpn, [ $value_msb ] );
...not:
$device->rpn( $channel, $rpn, $value_msb ); # wrong!
nrpn
$device->nrpn( $channel, $nrpn, $value );
$device->nrpn( $channel, [ $nrpn_msb, $nrpn_lsb ], [ $value_msb, $value_lsb ] );
$device->nrpn( 0xf, 0x0000, 0x1fff );
Send a single Non-Registered Paramater Number (NRPN) value. See "rpn" for additional detail on parameters.
panic
$device->panic( $channel );
$device->panic( 0x00 );
Send an "All MIDI notes off" (CC 123) message to the specified channel. If no channel is specified, the message is sent to all channels.
PANIC
$device->PANIC( $channel );
$device->PANIC( 0x00 );
Send 'note_off' to all 128 notes on the specified channel. If no channel is specified, the message is sent to all channels.
Warning: This method has the potential to flood buffers! It should be a recourse of last resort - consider "panic", it'll probably work.
note_off, note_on, control_change, patch_change, key_after_touch, channel_after_touch, pitch_wheel_change, sysex, clock, start, stop, continue
Wrapper methods for "send_message_encoded", e.g.
$device->note_on( 0x00, 0x40, 0x5a );
is equivalent to:
$device->send_message_encoded( note_on => 0x00, 0x40, 0x5a );
cc
An alias for control_change.
program_change
An alias for patch_change.
aftertouch
An alias for channel_after_touch.
polytouch
An alias for key_after_touch.
pitch_bend
An alias for pitch_wheel_change.
AUTHOR
John Barrett <john@jbrt.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by John Barrett.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.