File: scale7.pl

package info (click to toggle)
pd-fftease 2.5.2.git20121005-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,116 kB
  • ctags: 2,516
  • sloc: ansic: 17,044; makefile: 363; perl: 80
file content (25 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/local/bin/perl 

# -*-Perl-*-

$file = "m3chord.scale";

open(OUT, ">$file");

$base = 27.5;

@ints = (1.2, 9/8, 1.2, 9/8, 9/8);
@ints = (1, 1.2, 4/3, 1.2 * (4/3), 16/9);
$phs = 0;


$octmult = 1;
while( $val < 22050 ){
    for $i (0..$#ints){
	$val = $base * $ints[$i] * $octmult;
	printf OUT "%.4f\n", $val;
    }
    $octmult *= 2;
}
close $file;
print "wrote to $file\n";