Music-AtonalUtil
view release on metacpan or search on metacpan
lib/Music/AtonalUtil.pm view on Meta::CPAN
@$equivs = @{$equivs}[@min_span_idx];
}
}
if ( !@normal ) {
# nothing unique, pick lowest starting pitch, which is first index
# by virtue of the numeric sort performed above.
@normal = @{ $equivs->[0] };
}
$_ += 0 for @normal; # KLUGE avoid Test::Differences seeing '4' vs. 4
return wantarray ? ( \@normal, \%origmap ) : \@normal;
}
# Utility, converts a pitch set into a scale_degrees-bit number:
# 7 3 0
# [0,3,7] -> 000010001001 -> 137
sub pcs2bits {
my $self = shift;
my $pset = ref $_[0] eq 'ARRAY' ? $_[0] : [@_];
( run in 0.611 second using v1.01-cache-2.11-cpan-131fc08a04b )