ModuleExt
NAME
OpenMPT::Bindings::ModuleExt - libopenmpt extension API wrapper
SYNOPSIS
use OpenMPT::Bindings::ModuleExt;
my $ext = OpenMPT::Bindings::ModuleExt.from-file('track.xm');
say $ext.module.title;
# Interactive interface
$ext.set-current-speed(2);
$ext.set-tempo-factor(1.5);
$ext.play-note(0, 60, 0.8, 0.5);
# Pattern visualization
say $ext.get-pattern-row-channel-volume-effect-type(0, 0, 0);
DESCRIPTION
Wraps the opaque openmpt_module_ext* handle from libopenmpt and
provides access to the extension interfaces:
/Interactive ā speed, tempo, pitch, volume, mute, note on/off
/Interactive2 ā note off/fade, panning, finetune
/Interactive3 ā
set-current-tempo2/Pattern Visualization ā pattern cell volume/effect type queries
CONSTRUCTION
from-blob
method from-blob(Blob $data, :%ctls --> ::?CLASS)
Create a ModuleExt from in-memory Blob data. Optional %ctls for
initial CTL parameters. The underlying Module object is accessible via
.module.
from-file
method from-file(Str $path, :%ctls --> ::?CLASS)
Read a file from disk and create a ModuleExt from its contents.
ATTRIBUTES
module
method module(--> OpenMPT::Bindings::Module)
The underlying Module instance. All standard Module methods (metadata,
rendering, etc.) are available through this method.
Caveat: returns Nil after the ModuleExt has been destroyed.
INTERFACES
Interactive
Requires libopenmpt 0.3+. Methods die with X::OpenMPT::Bindings if the
interface is not available.
set-current-speed(Int $speed) returns Boolset-current-tempo(Int $tempo) returns Bool(DEPRECATED ā useset-current-tempo2instead)set-tempo-factor(Num $factor) returns Boolget-tempo-factor() returns Numset-pitch-factor(Num $factor) returns Boolget-pitch-factor() returns Numset-global-volume(Num $volume) returns Boolget-global-volume() returns Numset-channel-volume(Int $channel, Num $volume) returns Boolget-channel-volume(Int $channel) returns Numset-channel-mute(Int $channel, Bool $mute) returns Boolget-channel-mute(Int $channel) returns Boolset-instrument-mute(Int $instrument, Bool $mute) returns Boolget-instrument-mute(Int $instrument) returns Boolplay-note(Int $instrument, Int $note, Num $volume, Num $panning) returns Intstop-note(Int $channel) returns Bool
Interactive2
Requires libopenmpt 0.6+.
note-off(Int $channel) returns Boolnote-fade(Int $channel) returns Boolset-channel-panning(Int $channel, Num $panning) returns Boolget-channel-panning(Int $channel) returns Numset-note-finetune(Int $channel, Num $finetune) returns Boolget-note-finetune(Int $channel) returns Num
Interactive3
Requires libopenmpt 0.7+.
set-current-tempo2(Num $tempo) returns Bool
Pattern Visualization
Requires libopenmpt 0.3+.
get-pattern-row-channel-volume-effect-type(Int $pattern, Int $row, Int $channel) returns Intget-pattern-row-channel-effect-type(Int $pattern, Int $row, Int $channel) returns Int
SEE ALSO
OpenMPT::Bindings::Module ā standard module API
OpenMPT::Bindings::Types ā enums and CStruct types
https://lib.openmpt.org/ ā libopenmpt documentation