NAME
PDL::Audio::Scales - Over 1200 musical scales in PDL format.
SYNOPSIS
use PDL::Audio::Scales;
@names = scale_list;
# returns [1 1 1.5 5 7 8 8.5 1.2]
$scale = get_scale 'arist_chromrej';
($scale, $desc) = get_scale 'arist_chromrej';
# sets $desc to "Aristoxenos Rejected Chromatic, 6 + 3 + 21 parts 7"
EXAMPLE
The following script will play all the scales (unmodified, it will run for hours) :)
use PDL::Audio;
use PDL::Audio::Scales;
sub osc {
my ($dur,$freq) = @_;
(gen_asymmetric_fm $dur, $freq, 0.9, 0.6)*
(gen_env $dur, [0, 1, 2, 9, 10], [0, 1, 0.6, 0.3, 0]);
}
for (scale_list) {
my ($scale, $desc) = get_scale($_);
my @mix;
my $i;
print "$_ [$desc] $scale\n";
my $l = $scale->list;
for (($scale*880)->list) {
push @mix, ($i*0.2*44100 , osc 0.3*44100, $_/44100);
push @mix, ($l*0.2*44100+0.1, osc 0.8*44100, $_/44100);
$i++;
}
(audiomix @mix)->scale2short->playaudio;
}
AUTHOR
This file was translated from clm-2/scales.cl (common lisp music). the original comments are:
;;; This file contains more than 1100 musical scales, each one
;;; a separate list variable, containing notes as cents or ratios.
;;; The first note of 1/1 or 0.0 cents is implied. The data was
;;; translated from ftp://ftp.cs.ruu.nl/pub/MIDI/DOC/scales.zip
;;; (a collection of around 1100 files) by Bill Schottstaedt
;;; 24-Aug-95.
;;;
;;; These scales were brought together mostly by John Chalmers
;;; (non12@cyber.net) and Manuel Op de Coul (coul@ezh.nl).
;;;
;;; The reference for the Greek scales in this archive is:
;;; John H. Chalmers: Divisions of the Tetrachord, 1993.
;;; Frog Peak, Box 1052, Lebanon NH 03766, USA.
;;;
;;; If you know of scales not in this archive please send them to
;;; Manuel Op de Coul (coul@ezh.nl).
;;; since doing this translation, another 100 or so scales have been added:
;;;
;;; ----------------
;;; Date: Thu, 12 Oct 1995 06:58:42 -0700
;;; From: COUL@ezh.nl (Manuel Op de Coul)
;;; Subject: Updated scale archive
;;;
;;; The scale archive with the collections of John Chalmers and myself
;;; has been updated and contains now over 1250 scales.
;;; The scales.doc file contains the complete listing. It's found here:
;;;
;;; http://www.cs.ruu.nl/pub/MIDI/DOC/scales.doc (readme file, ASCII)
;;; http://www.cs.ruu.nl/pub/MIDI/DOC/scales.zip (ZIP file, binary)
;;;
;;; Use the "-a" option while unzipping. The size of the ZIP file is about
;;; 284 Kb. FTP is possible also from ftp.cs.ruu.nl.
;;; The file format of the scales is that of my tuning program Scala,
;;; which I hope will be available soon. The files are text files so also
;;; usable without it.
;;;
;;; Manuel Op de Coul coul@ezh.nl
;;; ----------------
SEE ALSO
perl(1), PDL, PDL::Audio.