#!/usr/bin/env perl
#
# Show files with 12 pitches and whose ultimate ratio is the octave.
use
strict;
use
warnings;
use
Music::Scala ();
my
$s
= Music::Scala->new;
for
my
$file
(
glob
(
'*.scl'
) ) {
eval
{
my
@ratios
=
$s
->read_scala(
$file
)->get_ratios;
if
(
$ratios
[-1] == 2 and
@ratios
== 12 ) {
say
$file
}
};
warn
"could not parse '$file': $@\n"
if
$@;
}