NAME

Music::Gestalt - Compose music using gestalts.

VERSION

Version 0.03

SYNOPSIS

use Music::Gestalt;

# see below

DESCRIPTION

This module helps to compose music using musical gestalts (forms). A gestalt is similar to a list in MIDI::Score format, but so far it only supports note events, and all parameters are expressed as values between 0 and 1. This allows for more flexible transformations of the musical material.

CONSTRUCTOR

new

my $g = Music::Gestalt->new(score => $score);

Creates a new Music::Gestalt object. The optional score argument receives a score in MIDI::Score format.

PROPERTIES

PitchLowest

Sets (if you pass a value) and returns lowest pitch used in this gestalt.

PitchHighest

Sets (if you pass a value) and returns highest pitch used in this gestalt.

PitchMiddle

Sets (if you pass a value) and returns middle pitch of the range used in this gestalt.

PitchRange

Returns the pitch range used in this gestalt, ie. the pitches that occur will be between pitch middle +/- pitch range.

If you pass a value as parameter, the new pitch range will be calculated around the current pitch middle.

VelocityLowest

Sets (if you pass a value) and returns lowest velocity used in this gestalt.

VelocityHighest

Sets (if you pass a value) and returns highest velocity used in this gestalt.

VelocityMiddle

Sets (if you pass a value) and returns middle velocity of the range used in this gestalt.

VelocityRange

Returns the velocity range used in this gestalt, ie. the velocities that occur will be between velocity middle +/- velocity range.

If you pass a value as parameter, the new velocity range will be calculated around the current velocity middle.

Duration

Returns the duration of this gestalt.

If you pass a value as a parameter, it will be used as new duration.

Notes

Returns the note list of this gestalt.

Density

Sets and returns the density of this gestalt. The initial density is 1, meaning that all notes will be used. At density 0, a score created from this gestalt will have no events. At density 0.5, a score created from this gestalt will have half the original events, selected at random.

It is intentional that the density may not be greater than 1; there are too many possible ways to generate additional events.

METHODS

AsScore

Returns a structure representing the gestalt in MIDI::Score format.

Append

Appends other Music::Gestalt objects to this object

MirrorTime, MirrorPitch, MirrorVelocity

Mirrors the start times, pitches and velocites found in the gestalt.

AUTHOR

Christian Renz, <crenz @ web42.com>

BUGS

Please report any bugs or feature requests to bug-music-gestalt@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Music-Gestalt. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Please also consider adding a test case to your bug report (.t script).

COPYRIGHT & LICENSE

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.