MIDI::Util - MIDI Utilities
version 0.0401
use MIDI::Util; my $score = MIDI::Util::setup_score( bpm => 120, etc => '...', ); MIDI::Util::set_chan_patch( $score, 0, 1 ); my $track = MIDI::Util::new_track( channel => 0, patch => 1, tempo => 450_000 ); my $dump = MIDI::Util::dump('volume');
MIDI::Util comprises handy MIDI utilities.
MIDI::Util
$score = MIDI::Util::setup_score; # Use defaults $score = MIDI::Util::setup_score( # Override defaults lead_in => $beats, volume => $volume, bpm => $bpm, channel => $channel, patch => $patch, octave => $octave, );
Set basic MIDI parameters and return a MIDI::Simple object. If given a lead_in, play a hi-hat for that many beats. Do not include a lead_in by passing 0 as its value.
0
Named parameters and defaults:
lead_in: 4 volume: 120 bpm: 100 channel: 0 patch: 0 octave: 4
$track = MIDI::Util::new_track; # Use defaults $track = MIDI::Util::new_track( # Override defaults channel => $channel, patch => $patch, tempo => $tempo, );
Set the channel, patch, and tempo and return a MIDI::Track object.
channel: 0 patch: 0 tempo: 500000
MIDI::Util::set_chan_patch($score); # Use defaults MIDI::Util::set_chan_patch( $score, $channel, $patch ); # Override defaults
Set the MIDI channel and patch.
Positional parameters and defaults:
score: undef (required) channel: 0 patch: 0
$dump = MIDI::Util::dump($list_name);
Return sorted array references of the following MIDI, MIDI::Simple, and MIDI::Event internal lists:
Volume Length Note note2number number2note patch2number number2patch notenum2percussion percussion2notenum All_events MIDI_events Meta_events Text_events Nontext_meta_events
MIDI
MIDI::Event
MIDI::Simple
MIDI::Track
Music::Tempo
Gene Boggs <gene@cpan.org>
This software is copyright (c) 2019 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MIDI::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MIDI::Util
CPAN shell
perl -MCPAN -e shell install MIDI::Util
For more information on module installation, please visit the detailed CPAN module installation guide.