MIDI::Track

Functions and methods for MIDI tracks
Download

MIDI::Track Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sean M. Burke
  • Publisher web site:
  • http://search.cpan.org/~sburke/

MIDI::Track Tags


MIDI::Track Description

Functions and methods for MIDI tracks MIDI::Track is a Perl module that provides a constructor and methods for objects representing a MIDI track. It is part of the MIDI suite.MIDI tracks have, currently, three attributes: a type, events, and data. Almost all tracks you'll ever deal with are of type "MTrk", and so this is the type by default. Events are what make up an MTrk track. If a track is not of type MTrk, or is an unparsed MTrk, then it has (or better have!) data.When an MTrk track is encoded, if there is data defined for it, that's what's encoded (and "encoding data" means just passing it thru untouched). Note that this happens even if the data defined is "" (but it won't happen if the data is undef). However, if there's no data defined for the MTrk track (as is the general case), then the track's events are encoded, via a call to MIDI::Event::encode.(If neither events not data are defined, it acts as a zero-length track.)If a non-MTrk track is encoded, its data is encoded. If there's no data for it, it acts as a zero-length track.In other words, 1) events are meaningful only in an MTrk track, 2) you probably don't want both data and events defined, and 3) 99.999% of the time, just worry about events in MTrk tracks, because that's all you ever want to deal with anyway.SYNOPSIS use MIDI; # ...which "use"s MIDI::Track et al $taco_track = MIDI::Track->new; $taco_track->events( , , , ); $opus = MIDI::Opus->new( { 'format' => 0, 'ticks' => 240, 'tracks' => } ); ...etc... Requirements: · Perl


MIDI::Track Related Software