Subject: | Addition of just intonation? |
Hi there. This is not a bug report but rather a possibly-nice-to-have addition. Besides equal temperament, I would like to know the just intonation ratio.
I'm not sure how you plan to integrate other tuning systems, but a possible change to allow this just feature might be something like this:
sub frequency {
my ($self, $just) = @_;
my $f;
if ($just) {
my %intonation = (
'C' => '1/1',
'C#' => '25/24',
'Db' => '27/25',
'D' => '9/8',
'D#' => '75/64',
'Eb' => '6/5',
'E' => '5/4',
'F' => '4/3',
'F#' => '25/18',
'Gb' => '36/25',
'G' => '3/2',
'G#' => '23/16',
'Ab' => '8/5',
'A' => '5/3',
'A#' => '125/72',
'Bb' => '9/5',
'B' => '15/8',
);
$f=$intonation{ $self->format('isobase') };
}
else {
my $n=$self->to_midinum();
$f=$self->{base} * 2**(($n-69)/12);
}
return $f;
};
Thanks,
Gene