a freq so it doesn't match any times.
for ($i = 0; $i < @freq; $i += 2) {
$expr .= "(\$f0 >= $freq[$i] && \$f0 <= $freq[$i+1]) ||";
my $r = Spot::ftor($freq[$i], $freq[$i+1]);
- $hint .= "m{$r} ||" if $r;
+ $hint .= "m{$r\\.} ||" if $r;
}
chop $expr; chop $expr;
chop $hint; chop $hint;
my ($a, $b) = @_;
return undef unless $a < $b;
$b--;
+ my $d = $b - $a;
my @a = split //, $a;
my @b = split //, $b;
my $out;
while (@b) {
my $aa = shift @a;
my $bb = shift @b;
- if ($aa eq $bb) {
+ if (@b < (length $d) - 1) {
+ $out .= '\\d';
+ } elsif ($aa eq $bb) {
$out .= $aa;
} elsif ($aa < $bb) {
$out .= "[$aa-$bb]";