Metadiddles

Paradiddles applied to “Paradiddles”:

PaPPaPaaaraararrrarraraaadaadadddiddidiiidiididddddddddddlddldlllelleleeeseesess

aPaaPaPPrarraraaaraararrdaddadaaidiididddiddidiiddddddddldlldlddeleelellsessesee


Sign up for the a100ql newsletter where I share news, thoughts, essays and materials related to the blog once or twice per month.

2 thoughts on “Metadiddles”

  1. Great exercise!

    #!/usr/bin/env perl
    use strict;
    use warnings;

    my $str = “Paradiddles”;
    my @str = split //, $str;

    my @pattern = (0,1,0,0,1,0,1,1);

    my $rlrr;
    my $lrll;
    for (my $i = 0; $i < @str-1 ; ++$i) {
    for (my $j = 0; $j < @pattern ; ++$j) {
    $rlrr .= $str[$i + $pattern[$j]];
    $lrll .= $str[$i + $pattern[($j + @pattern/2) % @pattern]];
    }
    }
    print $rlrr, $/;
    print $lrll, $/;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.