Christian Renz > MIDI-Tools-0.02 > MIDI::Tools

Download:
MIDI-Tools-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

MIDI::Tools - Various functions dealing with MIDI Events

SYNOPSIS ^

  use MIDI::Tools qw(...);

  # too much stuff, see below

ABSTRACT ^

MIDI::Tools - Various functions dealing with MIDI events

DESCRIPTION ^

This is a collection of functions evaluating or transforming lists of MIDI events, probably most useful for algorithmic composition. It is designed to be compatible with Sean M. Burke MIDI-Perl suite of modules.

CAVEAT ^

This module is in an early alpha stage of development. Interfaces are not written in stone yet, and stuff needs to be added. Near-future plans include: Dealing with intervals. Dealing with scales (transpose in scale, measure outsideness). Swingifying. Dealing with Chords.

EVALUATING MIDI EVENTS ^

All functions take a reference to a list of MIDI events as parameter and return a scalar or list of results.

$count = note_count($events);

Returns number of note_on events (excluding those with a velocity of 0).

($lowest, $highest) = note_range($events);

Returns lowest and highest pitch ocurring in note_on events, or undef if no note_on events occur in $events.

($mean, $stddev) = note_mean($events);

Returns mean and standard deviation of pitches in MIDI note_on events.

TRANSFORMING MIDI EVENTS ^

All functions take a reference to a list of MIDI events as parameter and modify the events directly.

note_limit($events, $lowest, $highest);

Remove all note_on and note_off events whose pitches lie outside ($lowest .. $highest).

note_transpose($events, $semitones);

Transpose events by a (positive or negative) number of semitones. Notes will not be transposed below 0 or above 127.

SEE ALSO ^

MIDI. MIDI::Event.

AUTHOR ^

Christian Renz, <crenz@web42.com>

COPYRIGHT AND LICENSE ^

Copyright 2003 by Christian Renz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: