In addition to supporting the popular Scala .scl format, Pocket Orchestra supports the new .scale format, which is specifically designed to tune real-life instruments. The .scl format lacks room for a fundamental frequency, which is critical for determining a proper tuning for an instrument, and it does not allow users to name each note. The .scale format allows for both of these things, allowing for more customizability and a more readable output. When a .scl file is loaded, the fundamental frequency is assumed to be A = 440Hz and a name is automatically given to each note based on how it approximates the 12-tone equal tempered scale. The .scale file avoids both of these potentially unwanted assumptions. Using the Scale Builder in Pocket Orchestra, converting between these two file types is quite simple.
This page is intended to describe the format of the .scale file for people who wish to write their scales manually, or for developers of music software who wish to support reading and writing .scale files.
I had three purposes when designing the .scale format: the contents of the file should be easily understood and discussed by humans, the file should be easy for machines to read, and the file should store information valuable to tuning software. With that in mind, I arrived at this format:
Don't worry, you don't need to understand any of this to use Pocket Orchestra to its full extent. The Scale Builder handles all the formatting for you.
This is an example of a properly formatted .scale file:
//This is what a comment looks like
//All white space is ignored.
//Header section comes first.
//It is always 4 lines long.
//1st line is the scale name,
//2nd is the description,
//3rd is frequency to build scale from,
//4th is the number of pitches in the scale.
//Commas separate base frequency
//and scale size from the data they contain.
Just Scale (12 tones) //NAME
This line is the scale description. //DESCRIPTION
Base frequency, 440.0 //TONIC FREQUENCY
Scale size, 12 //# OF NOTES IN SCALE
//Begin pitch data.
//Before first comma is note name,
//after first comma is data type
//(ratio, cents, or frequency),
//and after second comma is actual data.
//ratios are separated by the "/" character,
//and every number can be expressed
//as a whole number or a decimal.
A, ratio, 1.0/1.0
//tonic is optional, but recommended.
//Otherwise software won't know what to name it!
Bb, ratio, 25.0/24.0
B, ratio, 9.0/8.0
C, ratio, 6.0/5.0
C#, ratio, 5.0/4.0
D, cents, 498.05
Eb, ratio, 45.0/32.0
E, frequency, 660
F, ratio, 8.0/5.0
F#, ratio, 5.0/3.0
G, ratio, 9.0/5.0
G#, ratio, 15.0/8.0
//octave is optional.
If you have any questions or suggestions, send me an email at firstname.lastname@example.org