NAME

Peta::MIDI::Encoder - events into MIDI bytes

VERSION

version 0.2610180

SYNOPSIS

my $encoder = Peta::MIDI::Encoder->new(enable_running_status => 1);
my @messages = $encoder->encode([ note_on => 0, 60, 100 ]);
my $bytes = join '', $encoder->encode_events([ control_change => 0, 7, 100, 10, 64 ], [ pitch_bend => 0, -2048 ]);

DESCRIPTION

As MIDI::Stream::Encoder does; the events are described at the top of the source.

METHODS

new

new(enable_14bit_cc => 0, enable_running_status => 0, running_status_retransmit => 10, concat => 0).

encode, encode_events

encode($event): the event's messages as byte strings (one string with concat); encode_events(@events) the same of several.

clear_running_status

The next channel message sends its status byte.

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.