Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor in /home/quilime/quilime.com/lib/markdown.php on line 191

Warning: Cannot modify header information - headers already sent by (output started at /home/quilime/quilime.com/lib/markdown.php:191) in /home/quilime/quilime.com/index.php on line 20
Generate Semitones

— Generate Semitones


#!/bin/perl
my $m = 2 ** (1/12);
foreach my $s (0..12) {
    print int(0.5 + 1000 * $m ** $s-1000), "\n";
}

prints: 
semitone - fine
0  - 0 
1  - 59 
2  - 122 
3  - 189 
4  - 260 
5  - 335 
6  - 414 
7  - 498 
8  - 587 
9  - 682 
10 - 782 
11 - 888 
12 - 1000

gist