- SEE ALSO
- COPYRIGHT & LICENSE
MIDI::Morph - Musical transition tool
use MIDI::Morph; my $m = MIDI::Morph->new(from => $from_score, to => $to_score); $new_score = $m->Morph(0.4);
The aim of MIDI::Morph is to provide an easy-to-use composition tool that allows transitions between two gestalten (musical snippets). The data handled by this module is in MIDI::Score format (at this moment, only
note events are considered).
This is an alpha release, features and API will be extended and changed iteratively.
my $m = MIDI::Morph->new(from => $from, to => $to);
Creates a new morpher object.
AutoMap is called automatically by MIDI::Morph and provides a mapping from the notes in the
from structure to the notes in the
to structure. Currently, it is a simple mapping 1st<->1st, 2nd<->2nd, but this will become more sophisticated in future.
Morph creates a structure that reflects a transition point between
from (0) and
to (1). Currently the transition is linear.
MIDI::Morph::event_distance($event1, $event2, $weights);
This function calculates the distance between two events. The events passed should be note events as described in MIDI::Score. The weights are passed as a hash reference with the keys
velocity. This parameter is optional; the default weights are 1, 1, 1 and 0 respectively.
These weights can be used in case you want to measure the distance between two events in different terms.
my $event = morph_single_event($from_event, $to_event, $position);
This helper function morphs two single events.
Christian Renz, <crenz @ web42.com>
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MIDI-Morph. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2005 Christian Renz <crenz @ web42.com> , All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.