package main; use strict; use MarkovDiddly; my $t6 = MarkovDiddly->new(6); # will closely an resemble existing tune print "tune (6): ",join(" ",$t6->get_tune()),"\n\n"; print "pitches (6): ",join(" ",$t6->get_pitches()),"\n\n"; print "durations (6): ",join(" ",$t6->get_durations()),"\n\n"; my $t2 = MarkovDiddly->new(2); # will be more random print "tune (2): ",join(" ",$t2->get_tune()),"\n\n"; # grab a load of predictable notes with more random durations $t6->set_pitches(qw(d2 g2 g2 b2 g2 g2)); my @tune = map {$t6->get_next_pitch().",".$t2->get_next_duration()." "} (0..30); print "mixture (6/2): ",join(",",@tune),"\n"; exit;