diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-10-05 16:23:49 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-10-05 16:23:49 +0000 |
commit | b5954f69f4cd821016e3693aa8e301e30113491a (patch) | |
tree | f48767c60ce96cee8c7e70172ebc7f864acbc10b /examples/scale7.pl | |
parent | 0477d32b345e971a3b7072583e51370f874f38c8 (diff) |
include pvtuner~'s scale files and scripts as examples
svn path=/trunk/externals/fftease/; revision=16336
Diffstat (limited to 'examples/scale7.pl')
-rw-r--r-- | examples/scale7.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/scale7.pl b/examples/scale7.pl new file mode 100644 index 0000000..f5c35c7 --- /dev/null +++ b/examples/scale7.pl @@ -0,0 +1,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"; |