[Scala logo]

Scala help

This help file belongs to Scala version 1.86 and 2.25.

Brackets indicate an optional parameter. Parentheses indicate a choice of options. Items in capital letters are commands. Words preceded by a slash are command qualifiers. Long commands and options can be abbreviated.

New users should read the sections Commands and Qualifiers for the command language format. See also About... for background info, Introduction for how you can set up things to tune electronic instruments with Scala and HELP for usage of the HELP command.

If you are looking for an operation that is not described in this file then look in the list of supplied command files.

To navigate through this page, there is a list of help items.


ADD

ADD  [scalenr.]
Multiply the pitches of the current scale with those in the given scale at the same degree and replace them in the current scale. This means their logarithms (value in cents) are added. The default scale is 0 (current scale), so when no number is given the pitches are multiplied with themselves. The amount of scales is set in file scala.ini (default 30), and shown with SHOW SETTINGS. Instead of a scale number, a filename may also be given.
For adding a constant term to all pitches use MOVE/FREQUENCY.
   /ADD
Instead of multiplying the pitches, take the summation tones.
   /MEDIANT
Instead of multiplying the pitches, take their mediant value, i.e. (num(a) + num(b)) / (den(a) + den(b)). All pitches must be rational.
   /MEANSQUARE
Instead of multiplying the pitches, take the mean of their squares, i.e. (a2 + b2) / 2.
   /SUMMATION
The current scale is replaced by a scale with all sum tones of the current or given scale, using octave equivalence. The size of the new scale will be the square of the number of notes in the given scale, but less if there are duplicate sum tones. Warning: the original 1/1 remains in the scale. To remove it, do DELETE 0. See also SUBTRACT/DIFFERENCE.


APPEND

APPEND  pitch  [scalenr.]
Insert a new pitch in the current (number 0) or given scale after the last position making the size of the scale increase by one. The maximum size of a scale is set in file scala.ini (default 1200). See INSERT to insert a new pitch at another degree than after the last one.
   /FACTOR  factor  [scalenr.]
Interpret the pitch parameter as a linear factor and not as cents when it has a decimal point. Can only be combined with /INTERVAL and /LINE.
   /FREQUENCY  frequency  [scalenr.]
Interpret the parameter as a frequency relative to the base frequency of SET FREQUENCY. Can only be combined with /LINE.
   /INTERVAL  interval  [scalenr.]
Specify the interval with the last degree instead of the absolute pitch. Can only be combined with /FACTOR and /LINE.
   /GIVENBEATS  position  interval  frequency
Specify a new pitch in the current scale by its beat frequency against a given rational interval on a given scale degree. This scale degree does not have to be inside the scale, octave equivalence is assumed. The beat frequency is relative to the base frequency of 1/1. When a negative beat frequency is given, the resulting pitch will be lower than the given interval, otherwise higher. See also SHOW BEATS and LINEARTEMP/GIVENBEATS. Do SORT afterwards if necessary. Cannot be combined with other qualifiers.
   /LINE  pitch-list
Append all the pitches given in the parameter, separated by spaces. Can only be combined with /FACTOR, /FREQUENCY, /INTERVAL and /NOTATION.
   /NOTATION  notename  [notation-system]  [scalenr.]
Specify the pitch by note name. The current notation is the default one. Can only be combined with /LINE. Then the notation system can only be the current one.
   /SCALE  scalenr.
Multiply the pitches of the given scale by the formal octave of the current scale and add them to the current scale. Instead of a scale number, a file name may also be given. Cannot be combined with other qualifiers.


APPROXIMATE

APPROXIMATE  [highest-prime]
Replace each pitch in the current scale with the closest fraction to the pitch with numerator and denominator consisting only of prime factors used in harmonicity calculations. If the given parameter is not a prime number, then the next higher prime will be the limit. If no parameter is given, then the prime limit set with SET LIMIT is effective.
The prime count is set by Prime_Count in scala.ini (default 10 which is 29-limit).
   /LIMITED
Replace only when there exists a fraction whoseCannot be combined with /INSERT and /MOULD.
   /FLOATS_ONLY
Replace only the floating point pitches (those given in cents) in the current scale. Cannot be combined with /INSERT and /MOULD.
   /CONSISTENT  resolution  [highest-prime]
Replace pitches only with ratios which are consistent in the given resolution of equal tempered steps/octave and the given prime limit. If the prime limit is not given, then the limit set with SET LIMIT is effective. Also the /WEIGHTED qualifier works implicitly here, so the current attribute should first be set to a useful value. If attribute weighting is not desired, then do SET ATTRIBUTE NONE. If the given resolution is equal to the number of tones in the current scale, then a JI-epimorphic scale with standard mapping will likely result. To calculate the number of steps/octave if the formal octave is not 2/1, do for example CALCULATE 3\13 = 8.202087 / octave.
See also SET ATTRIBUTE ET_STEP. Cannot be combined with /INSERT, /MOULD or /WEIGHTED.
   /WEIGHTED
Does not only take distance into account, but also the current attribute value given by SET ATTRIBUTE. The optimality criterion (which is minimised) is the sum of the absolute pitch difference and the weighting factor given by SET WEIGHTING multiplied with the attribute value of the tested ratio. For the attribute one that gives a harmonic complexity value should be chosen (like DEPTH, ENTROPY, EUCLID, GRADUS, HARMON, MANN, PROOIJEN, TENNEY, TRIANGLE, TR_LOG, VOGEL, WILSON) and not CENTS for example. If HARMON is chosen, the absolute inverse of it is taken into the weighted sum. If the weighting factor is higher, then the attribute value weighs more and the pitch difference less. The absolute pitch difference is weighted in cents. If NONE is chosen, then it works as though /WEIGHTED was not used.
The harmonicity function can be parameterised with the SET HARMCONST command and the coefficients and weighting factor viewed with SHOW HARMCONST. This qualifier should be used in combination with /LIMITED, otherwise the computation time will be too long. Cannot be combined with /CONSISTENT and /INSERT.
   /INSERT  pitch  [highest-prime]
Insert all approximations to the given pitch in the current scale. All the same constraints of /LIMITED apply here. You must use SET MAXDIFF first to set the range in which approximations will be sought. The initial value of 0.0 does not mean no maximum difference here, but exactly zero. The range of pitches to be inserted is from (pitch - max.diff.) to (pitch + max.diff.). If highest-prime is not given, the limit set with SET LIMIT applies. Any pitches already in the current scale will remain there. So if only the approximations are wanted, do CLEAR first. Set any exponent limits with SET EXPLIMIT. Approximations below 1/1 will not be inserted, if the pitch is above 1/1 and vice versa. If more approximations are found than the maximum scale size, then "Overflow in scale size" will occur. Cannot be combined with other qualifiers.
   /MOULD  scalenr.
The given scale must contain a set of small pitches which are considered to be "commas" whose difference is negligible when added to or subtracted from the pitches of the current scale. For each pitch, all possible combinations of adding or subtracting the commas once or not, will be visited and be evaluated according to the current attribute and maximum pitch difference. This means that these settings influence the result: SET ATTRIBUTE and SET MAXDIFF. Prime limit or exponent limits do not play a role. Set maxdiff to zero if you want no limit to the difference.
This function can be used to shape a periodicity block after creation with PIPEDUM. If the set of commas is the same as the set of defining intervals of the periodicity block, then the result will still be a periodicity block. So if the defining intervals are placed in scale number 1, then after doing PIPEDUM/SCALE 1 and NORMALIZE you can do APPROXIMATE/MOULD 1. The set of commas is not checked for independence, contrary to the PIPEDUM command. To see the shape, use the LATTICE command. A useful attribute is HARMON in this case, but any other one defined for rational intervals may be used too. After creating a p.b., the command KEY/CENTRE can be used first to set the tonic more to the centre of the lattice, if desired.
If /WEIGHTED is used in combination, then the pitch deviation and the value of SET WEIGHTING also play a role. The weighting factor should probably be set to a higher value than the default 1.0. It's best to experiment a bit with different settings. The error function is then the weighting factor times the attribute value plus the logarithmic pitch deviation.
Note that one can also put one comma in the given scale, for example the schisma ($s). Instead of a scale number, a filename may also be given. Can only be combined with /WEIGHTED.
   /SUPER
The intervals of the current scale will be replaced by their nearest superparticular (epimoric) approximation. A superparticular ratio is one of the form (n+1)/n. The formal octave (last scale degree) will also likely be changed. See also RATIO/SUPER. Cannot be combined with other qualifiers.


ASSUME

ASSUME  scalenr.
Make floating point pitches of the current scale into rational ones if the same pitch is present in the given scale as a rational value. This only happens if the values are exactly the same. Positive powers of 2 will be made rational even if they're not in the given scale.
Instead of a scale number, a filename may also be given. The file intnam.par is useful because it contains many rational pitches. See also APPROXIMATE and UNRAT.
   /COMBINATION
Also compare combinations (product and quotient) of any two pitches in the given scale. Many more rational values can be found this way. It may also find extra rational values when applied to the current scale itself if it's partially rational.


AVERAGE

AVERAGE  pattern
Replace each pitch in the current scale with the geometric mean of that pitch with the pitches given by the relative offsets in the given interval pattern. For example, AVERAGE 1 will take the mean of a pitch with the next degree.
AVERAGE 1 1 will give a moving average of three consecutive pitches.
AVERAGE -1 will take the means of pitches with their previous degree.
AVERAGE 2 will take the mean of a pitch with the one two steps further, etc.
The pattern may consist of any amount of numbers. Octave equivalence is assumed. An effect of this command is that it makes deviations from equal temperament smaller, as the moving average operation smoothes out fluctuations in a time series. For 12-tone meantone scales, try AVERAGE 7.


BISTEP

BISTEP  scalenr.
Modify a scale in such a way that the least-squares difference with the nearest pitches in another scale is minimised. The current scale to be modified must have exactly two different interval sizes between consecutive pitches. You can check this with SHOW INTERVALS; the scale must have two intervals listed with interval class 1. The operation leaves the pattern of interval sizes intact and the formal octave also remains the same. The least-squares difference with corresponding (nearest) pitches in the given scale is minimised. The given scale does not have to have the same size as the current scale. The formal octave does not have to be the same; the difference between the formal octaves does not influence the result. The nearest pitches to the ones of the current scale will be selected for approximating them. Instead of a scale number, a filename may also be given.
If the scale structure is a linear temperament, then CALCULATE/LEASTSQUARE can also be used. This gives an identical result (size of the fifth). Example: Suppose the scale to be approximated is 1/1 9/8 5/4 4/3 3/2 5/3 15/8 2/1 and the current scale is 1/1 200.0 400.0 500.0 700.0 900.0 1100.0 2/1. Then the result is 1/1 194.693 389.386 502.654 697.347 892.040 1086.733 2/1.
   /UNIQUE
As above but if the given scale has less pitches than the current scale, or if it has pitches that are closest to more than one pitch in the current scale, then those pitches are only counted once in the calculation and are ignored for approximation of pitches further removed from them.
This means that if the given scale consists of only one pitch, then the result will contain this pitch exactly.
For example, suppose the current scale has 12 tones and interval pattern a b b a b a b a b b a b, and the given scale is 9/8 5/4 4/3 3/2 5/3 15/8 2/1, then only 7 pitches of the current scale are matched and their differences minimised and the remaining pitches are calculated according to the interval pattern.
   /MATCH  pitch
Instead of a scale to approximate, give one pitch that must be matched in the scale. This is the same as using BISTEP/UNIQUE with the given scale containing only this given pitch.
   /PERMUTATION  count  scalenr.
Create a scale with two interval sizes in such a way that the least-squares difference with corresponding pitches in another scale is minimal. The scale will have the same size and formal octave as the given scale. The count which is given is the number of intervals with one size, while the number for the other size will be the remaining number of scale size minus count. All interval patterns (permutations of the two intervals) are tested and the one giving the lowest least-squares difference to the given scale will be taken. This is the difference with BISTEP without /PERMUTATION. For long scales it may take a lot of computing time. Instead of a scale number, a filename may also be given. The given scale may also be 0, in which case the current scale will be replaced with the approximation.


CALCULATE

CALCULATE  expression
Evaluate a given arithmetical pitch expression and show the result. The expression may consist of pitches given as a ratio, in cents, from a pitch memory or scale degree (see help of $, %, [ and Expressions), all mixed, and the following operations:
+ : multiplication
- : division
* : power (right operand is pitch)
^ : power (right operand is linear value)
\ : root
| : reduction (divide or multiply the left by the right operand until the result is smaller than the right operand and larger than 1/1)
plus : summation
div : logarithmic ratio (left and right operand must have the same sign)
abs : if the right operand is smaller than 1/1, take the reciprocal
num : if the right operand is rational, take the numerator, otherwise the linear value
den : if the right operand is rational, take the denominator, otherwise 1/1
lin : specify that right operand is linear value
min : subtraction (see below)

Furthermore parentheses may be given to influence the order of evaluation. It calculates the result and shows it in various units. The result is stored in pitch memory 0. The order of precedence of operations is first 'num', 'den' and 'lin', then ^, then * and \, then |, then +, -, 'plus', 'div' and 'abs'. Example: 3/2*12-2*7 or 3*12|2 or 3^12|2 gives the Pythagorean comma. The difference between * and ^ is that with ^ the right operand is read as a linear value instead of as cents, may also be negative and may not be a parenthesized expression. With a nonnegative integer or ratio as the right operand, * and ^ give the same result.
Strictly speaking, 'lin' is not an operation but when it is put in front of a pitch value which contains a decimal point, then it is interpreted as a linear factor instead of a cents value. It must not be negative.
Note that the 'div' operation is the logarithm with the right operand as the base. For example we want to know how many steps of the 25th root of 5 go into one octave, so we do CALC 2 div 5\25. We could then use this value as a base for attributes, like: SET ATTRIBUTE ET_STEP $0. Though the step size can be used directly too, e.g. CALC 5\25 and then SET STEP_UNIT $0.
A special operation is:
min : subtraction
When not between parentheses, it can be used only once in an expression and has lowest precedence. The result is given as a frequency difference. The given frequency is relative to the base frequency of SET FREQUENCY. Example: 3/2 min 700.0. It can also be used to calculate beat frequencies between harmonics, in the same example: 3 min 2+700.0. To use subtraction in an expression, put it between parentheses.
Extra units in which the result is expressed are stored in parameter file calcval.par and may be altered as wished. Note names can be given at the end but it is not default. See also SET CALC_OUTPUT and SHOW/UNITS PITCH.
To display results in another form, or write them into a text file, use the ECHO command with its lexical functions.
Several Scala commands store their results in the first couple of pitch memories so they can be also used again in pitch expressions here.

   /FACTOR
Interpret all pitch values in the expression with a decimal point not as cents but as a linear factor. This is the same as putting the word lin in front of every pitch value. Can only be combined with /NOOUTPUT.
   /NOOUTPUT
Store the result(s) in pitch memory 0 (and higher) and do not show any results. See also help of :=.
   /LEASTSQUARE
With this qualifier, there is no parameter. It calculates the least-squares fifth for a meantone scale (cycle of fifths). It can also be used to calculate the (formal) fifth or generator for attaining one (just) interval exact. First the size (number of notes) is asked. This is used for giving a hint for the number of fifths to be stacked to approximate the intervals. If you know this already, it can be entered, otherwise use 0. Then the formal octave is asked, usually this is 2/1. This may also be given as an expression, for example 2\7 is the 7th root of 2/1. Then the degree for the fifth is asked, again for hinting the number of fifth steps. Hit enter for taking the nearest equal tempered degree which is usually the easiest. Next, enter the number of pitches to be approximated. This number should include the fifth itself, even if it's not to be included in the least-squares average. Namely, the first approximant is taken to be the formal fifth (generator). So enter 2 if you do not want to approximate, but have one exact scale interval. Subsequently each interval to be approximated is entered, followed by the number of steps to approximate it (for the fifth this is one). The default one is the lowest (either upwards or downwards). If the approximation is not very close, then also the number of steps to the second best approximation is suggested. Then comes a weighting factor, which can be given as a ratio or floating point value. Enter a weight of zero if the approximant is to be excluded from the average. If weights are not identical, then usually ratios with higher primes are given less weight. Give zero weight to the formal fifth if it doesn't approximate some interval itself, or in case of attaining one exact scale interval. For downwardly stacked fifths, enter a negative value for the number of steps. Intervals with a weight of zero will not be included in the standard and highest deviation. The result is shown with the deviation from the given generator.
The result is also stored in pitch memory 0 ($0), so it can be used with the LINEARTEMP command. Example: a 4/17-comma meantone fifth is the negative least-squares average for 3/2 and 5/4. To calculate this enter subsequently: 12, 2, 7, 2, 3/2, 1, 1.0, 5/4, 4, 1.0
Another example: for a meantone scale with an exact 13/10 augmented third, enter this subsequently: 12, 2, 7, 2, 3/2, 1, 0.0, 13/10, 11, 1.0
The minimax result, see /MINIMAX, is also given next and stored in pitch memory 1 ($1). Can only be combined with /NOOUTPUT. See also EGALIZE/MODEL.
   /MINIMAX
As /LEASTSQUARE except that the fifth giving the lowest maximum error is calculated instead of the least-squares error. The errors are calculated as the difference in cents times the given weight. Example: a 1/5-comma meantone fifth has the same error for 3/2 and 5/4. To calculate this enter subsequently: 12, 2, 7, 2, 3/2, 1, 1.0, 5/4, 4, 1.0
The result is stored in pitch memory 0 and the least squares result is also given and stored in pitch memory 1. Can only be combined with /NOOUTPUT.
   /TOP
As /MINIMAX except that the period (formal octave) and generator (formal fifth) are jointly optimised. Depending on the given weights, the (weighted) minimax solution will be given first, then followed by the TOP (Tenney Optimal Primes) solution, which is minimax with the approximants being weighted by the inverse of their logs, and the given weights ignored. Because the period is optimised too, do not forget to include it (or a multiple) in the approximants. For example, suppose the period is 600.0 cents, then enter 2/1 as an approximant, followed by 0 steps of the generator. Enter for the size some number of notes for which the approximate generator and period form a well-formed scale (have Myhill's property). Then the mapping is more quickly entered by taking defaults from the suggested numbers of steps. The intervals should not be entered octave reduced, so enter 2, 3, 5 etc., not 2, 3/2, 5/4. If there is not a single, but a range of solutions, which happens when there are zeroes in the generator part of the mapping, then it tries to balance the weighted errors. The generator is stored in pitch memory 2 ($2) and the period in pitch memory 3 ($3). The minimax pair in $0 and $1. Can only be combined with /NOOUTPUT. See also PROJECT/TEMPER/TOP.
   /RMS_TOP
As /TOP except that the optimum is not minimax, but least squares. The difference with /LEASTSQUARE is that the period and generator are jointly optimised. First the weighted least squares solution is given, followed by the TOP-RMS solution, which is least squares with the approximants being weighted by the inverse of their logs, and the given weights ignored. Because the period is optimised too, do not forget to include it (or a multiple) in the approximants. The generator is stored in pitch memory 2 ($2) and the period in pitch memory 3 ($3). The least squares pair in $0 and $1. Can only be combined with /NOOUTPUT. See also PROJECT/TEMPER/RMS_TOP.


CATALOGUE

CATALOGUE  [start]
Show size (number of notes) and formal octave of all nonempty working scales and the pitch memories. If the start parameter is given, then it's the first scale or pitch memory to be shown. Show also whether scales consist completely of rational pitches or not, indicated with the word rational. The last column contains part of the description text and if that is absent, the first few pitches of the scale are shown.
Subsequently show the values in the pitch memories which are different from the initial value 1/1.
The number of scales and pitches which are available is shown with SHOW SETTINGS. The scale memories with the highest numbers are used for UNDO, and should not be used for scales that must be kept. The number of scale memories, undo-memories and pitch memories is set in the file scala.ini.
   /PITCH
Show all the values in the pitch memories.
   /SCALE
Show the nonempty scale memories only.


CD

CD  [directory]
Change the working directory to the given directory. The original directory will be restored when leaving the program. Without parameter, the current directory path appears on the screen. Wildcards can be given too, then the first matching name will be taken. To change back to the previous directory, enter CD - .


CHORDS

CHORDS  first-number  last-number  [chord-size]
Shows the approximations in the current scale to all just chords between the given two harmonic numbers. The chord-size parameter is the number of notes in the chords. The default value is 3. The minimum value is 2. What is shown is first the chord, then the nearest approximation in scale degrees and then the standard deviation between the chord notes and scale notes. If the chord size is five or smaller, then the inverted chord is given too. For example, if first-number is 3, last-number is 6 and size is 3, then the chords are 3:4:5, 3:4:6, 3:5:6 and 4:5:6.
The approximations start only on degree 0, so if the current scale is not equal tempered and chords on another position would be requested, then KEY must be done first. See also SHOW LOCATIONS. If the current attribute is NOTATION then an extra line is shown with the note names of the approximating chord. See also SET NOTATION.
   /CONSTRAINED
Show only chords for which the differences with the pitches of the current scale do not exceed the maximum difference set with SET MAXDIFF. A value of 0 cents for the maximum means that only exact matches will be shown. If there is at least one note in the chord with a larger difference, then the chord will not be shown. Another constraint (if this qualifier is not given in combination with /MATCH) is that only chords whose prime exponent numbers do not exceed the limits set by SET EXPLIMIT and without primes larger than the limit set with SET LIMIT are shown.
   /MATCH  [position-or-name-pattern]  [chord-size]
Show occurrences of chords given by name in the current scale. The chords to be searched are from the list in file chordnam.par. If the chord-size parameter is given, only chords of "chord-size" tones will be matched, otherwise chords of any size. If this parameter is negative, then it means that chords with at least that positive size will be matched. For an occurrence to be found, the tones of the chord must be within plus or minus three formal octaves of the scale, assuming octave equivalence.
If no first parameter is given, or if it's an asterisk, then chords will be matched at all positions in the scale. If the current scale is an equal temperament, only chords starting from the first tone of the scale will be matched. Otherwise, use CHORDS/MATCH 0 to do this, or use any positive number to match at another scale degree. If the first parameter is a name pattern, then only chords having a name that matches the pattern will be matched with the scale. If the name pattern consists of more than one word, it must be surrounded by double-quotes ("). The following special characters are recognised in the pattern:
* : matches zero or more of any character.
? : matches exactly one of any character.
A whole word of the name must be matched in order for it to be found. To match part of a word, the pattern may begin and end with a * character.
Displayed are the scale degrees that form the chord, and its name. If the pitches do not match exactly, then their difference in cents with the scale pitches will also be given. The current scale must be in ascending order. If the current attribute is a notation system, set with SET NOTATION, then a second line with the note names will be shown.
The chord matching can be further restricted with the /CONSTRAINED qualifier, see above. See also SHOW LOCATIONS for counting occurrences of a literal chord.
   /ALL_SHOW  [name-pattern]  [chord-size]
Show all chords from the list if no parameter is given. If a name pattern is given, show all chords having a name that matches the pattern. In this case there is only one parameter, the pattern, which may contain spaces. If the name pattern contains spaces, it must be surrounded by double-quotes (") if the second parameter is also to be given.
The displayed chord list can be restricted further to only give chords with a given number of notes. To show all chords with a certain number of notes, make the first parameter "*", for example to show all chords with 4 notes do CHORDS/ALL * 4. The intervals are given as they appear in the file chordnam.par. See also LOAD/CHORD. Can not be combined with other qualifiers.
   /CENTS_SHOW  [name-pattern]  [chord-size]
As above, but shows the intervals of the chords in cents, relative to the first note. Can not be combined with other qualifiers.
   /ODD_LIMIT  limit  [position]
Show all occurrences in the current scale of chords which odd-limit is within the given limit. The differences of the chord tones with the pitches of the current scale will not exceed the maximum difference set with SET MAXDIFF. A value of 0 cents for the maximum means that only exact matches will be shown. If there is at least one note in the chord with a larger difference, then the chord will not be shown.
If no second parameter is given, then chords will be matched at all positions in the scale. If the current scale is an equal temperament, only chords starting from the first tone of the scale will be matched.
If the formal octave of the current scale is a whole number, then these multiples of the chord's fundamental will not be shown. Subchords of chords matched will also not be shown.
The current scale must be in ascending order. If the current attribute is NOTATION then an extra line is shown with the note names of the approximating chord. Can not be combined with other qualifiers.


CLEAR

CLEAR  [scalenr.]
Empty the given scale. Default is 0 (current scale).
   /ALL  [last-scalenr.]
Empty all scale memories, including the current scale, but not the highest ones used for UNDO. If a parameter is given then empty all scale memories from 0 (current scale) to the given last scale (may include undo-memories). Warning: This cannot be undone with UNDO, except for the current scale.
   /MAPPING
Set the keyboard mapping to the default values and the size to zero. This zero size will work as a linear mapping when sending a scale to a synthesizer. There is no parameter. See also SHOW MAPPING.


CLOSE

CLOSE
Close the text file opened with FILE. It is not necessary to do this before EXIT because it's done automatically.


CLS

CLS
Clear the screen (c.q. main window).


COLLAPSE

COLLAPSE  [interval-class]  [scalenr.]
Replace the current or given scale with its set of intervals of the given interval-class. The default interval-class is 1, which means adjacent pitches (as shown by SHOW/INTERVAL). It may be any integer number. Then what were intervals will become pitches. To then remove all the identical values, use UNIQUE. An equal temperament would then be reduced to one interval.
This command can amongst others be useful prior to FIT. If this command is repeated, it gives an effect similar as EUCLID does.
   /ALL  [scalenr.]
Replace the current or given scale with its set of unique intervals of all interval-classes. This command may cause the scale to become very large. An equal tempered scale will stay the same. See also SHOW/TOTAL INTERVALS.
   /ERECT  [scalenr.]
Do the reverse operation to COLLAPSE 1. The pitches will be added up consecutively so that they will become the successive intervals of one step.


COMPARE

COMPARE  [file-mask]  [scale-size]
Compare the current scale with all scales in memory, then with all modes in the mode list (based on the octave) and subsequently with files in the current directory that satisfy the file mask. For a match the scales must have equal size, and their successive intervals must be equal, but the key does not have to be equal. The key for which the scales match is displayed. See also KEY. Also if the successive intervals in reverse order are equal then this match is displayed. See also INVERT. Next, it is checked whether the pitches of the current scale form a subset of any scale. If so, if this is a known mode, then its name is given.
Additionally, it can be checked if scales match within a given difference limit, in the same ways as described above. If no pitches differ more than the limit, it is a match. The maximum difference is set with SET MAXDIFF. If this is not desired, do SET MAXDIFF 0.0.
If no file mask, but the size of the current scale is given, there will be no check for subsets. If both a file mask and a scale size is given, the scale size acts as an extra filter and only scales with that size will be checked, the same way as with the DIRECTORY command.
If there were files with the same scale size, then afterwards those with the least differences not being equal will be shown. Those differences are the average absolute, root mean square and highest absolute difference. Often they will belong to the same scale file. Then the same comparisons will be shown for files with the same scale size tried in all other keys. If the other keys didn't give a better approximation than the same key, then "idem" will be written. Then comparisons only in the original key will be shown for scales with not necessarily the same size. Only the number of tones of the smaller of the two scales will be considered. If all comparisons were equal for scales with any size, then "idem" will be written.
To compare with the last scale loaded or saved, do COMPARE %scl. See also SHOW DIFFERENCE.
   /MEMORY_ONLY
Compare the current scale only with all scales in memory, so not with files and modes.
   /SAVE_LIST
Save the filenames shown by the command to be equal or inversely equal in any key to a scale list file with name comp.lst. Approximately equal files are not added. This list file is used when "@comp" is given instead of a filename mask. For instance to do a much quicker compare against the same files a second time, or to load them all into memory, or to invoke an operation on all of them using ITERATE. Cannot be combined with /MEMORY_ONLY.
   /SUPERSET
Also indicate the cases when the current scale is a superset of the scales and modes it is compared with. To check also if the current scale is approximately a superset, set the maximum difference with SET MAXDIFF. If this is not desired, do SET MAXDIFF 0.0. If you want to check all modes of the current scale for it, then use the command ITERATE/KEY COMPARE/SUPERSET.
   /PITCH  pitch  [file-mask]  [position]
Search for the given pitch in the files that satisfy the file mask. The scale degree where the pitch was found is given plus the size of the scale. The maximum difference is set with SET MAXDIFF. If this is not desired, do SET MAXDIFF 0.0. If a position is given, then only scales are listed which have the pitch at this degree. If 0 is given, then its meaning is the last degree, or formal octave. If it is "n" then it equals the number of notes in the current scale.
Can only be combined with /RATIONAL and /SAVE_LIST, in which case the list file is named search.lst. Use this list file with "@search". To search for more than one pitch at the same time, create a scale and use /SUPERSET.
   /RATIONAL
To be used with /PITCH, it will only find rational pitches. The pitch parameter itself doesn't need to be rational. Must be combined with /PITCH, can also be combined with /SAVE_LIST.


CONVERGENTS

CONVERGENTS  number
Show the convergents (continued fraction) of a nonnegative linear number. At the left it is shown whether the displayed fraction is higher or lower than the given number by a plus or a minus sign, or if it's equal (within the computer's floating point resolution) with an equal sign. For every convergent the total number of (semi-)convergents is then displayed, followed by the fraction. Then the continued fraction expansion is shown. If an asterisk appears, then the ratio is too large to be displayed and only the fractional part (between 0 and 1) is shown. The last column shows the difference between the ratio and the number.
If you want the parameter to represent a logarithmic pitch value, use /CENTS or /LOGARITHMIC. The parameter may also be given as a ratio smaller than 1, or be a pitch memory or scale degree (see help of $ and %). If you want to enter a value in cents, but it to be interpreted as a linear value, then put 'c' in front of the value, like this: c702.0. See also RATIO (/FAREY, /PARENTS, /CHILDREN and /STERN), DIVIDE/FIND and SET ATTRIBUTE (DEPTH, FRACTION, STERN). The attribute STERN is the same as the sum of the number of semi-convergents in the second column.
Use this command among others to find out what is a good scale size for a linear temperament with a given generator. See also LINEARTEMP. To see convergents' denominators of scale pitches it's also possible to use SET ATTRIBUTE CONVERGENTS.
   /SEMI
Also show all semi-convergents. They are indicated with an 's' and precede the full convergent that they belong to.
   /CENTS  pitch  [octave]
Interpret the parameter as being a cents value and show the convergents. A rational number will also be taken as a cents value. If the octave parameter is given, the number will be divided by the log of it. It can be a rational or cents value. Cannot be combined with /LOGARITHMIC.
   /LOGARITHMIC  number  [octave]
Take first the logarithm of the parameter and then show the convergents. It must be 1.0 or larger. For a pitch memory or scale degree it is the same as /CENTS. In absence of the octave parameter, it's the binary logarithm, otherwise the given octave is the logarithm's base. It can be a rational or floating point number. Cannot be combined with /CENTS.


COPY

COPY  scalenr.  scalenr.
Copy the first to the second given scale. The current scale is number 0. The number of scale memories and undo-memories is set in scala.ini. The total number of scales is the sum of these two. To undo a scale operation, UNDO or COPY can be used. Copying scales into the undo-memories should be avoided. See also PUSH, POP and UNDO.
   /PITCH  pitch  pitchnr.
Assign a pitch to the given pitch memory. Warning: it is not copying one pitch memory to another. To do that, use a $-value with the first pitch (see help of $). The highest pitch memory is set in scala.ini (default 10). See also help of :=. Can only be combined with /RANDOM.
   /NOTEVAL  notename  [pitchnr.]  [notation-system]
Puts the nominal note value according to the given notation system in the given pitch memory. For notations of equal tempered systems this is the equal tempered value. For diatonic notations, all accidentals may be used in any combination. Octave numbers can be appended to the note name with a period in between, for example: c#.1. The default pitch memory is number 0. The default notation system is the current one. See also the %noteval() function in the ECHO command. Cannot be combined with other qualifiers.
   /RANDOM  [scalenr.]
Copy a random non-empty scale to the current or given scale. The current scale will not be chosen. The chances for all non-empty scales to be copied are the same. See also SEED. Can only be combined with /PITCH.
   /PITCH/RANDOM  lower-bound  higher-bound  [pitchnr.]
Assign a random pitch to the given pitch memory. The default pitch memory is 0. The pitch will be distributed logarithmically uniform between the given lower and higher bound.
   /FREQ_MAP
Copy the base frequency to the reference frequency of the current keyboard mapping. See also SET MAP_FREQ. There is no parameter. Cannot be combined with other qualifiers.
   /MAP_FREQ
Copy the reference frequency of the current keyboard mapping to the base frequency. See also SET FREQUENCY. There is no parameter. Cannot be combined with other qualifiers.


CPS

CPS
Create a Wilson Combination Product Set. First is asked Enter number of factors to select from:, which is the number of factors the set will be taken from. Then Enter combination count:, which is the number of factors in each product. Subsequently all the factors must be entered which can have any ratio or cents value.
In order to obtain from there a useful scale, the central tone can be deleted with the DELETE command with degree 0 as parameter. Alternatively MOVE/KEY for another degree. Next, reduce the pitches to the range of one given formal octave using REDUCE. Then SORT and eventually an octave can be added with APPEND, or use NORMALIZE. To take a useful attribute in combination with a CPS scale, do SET ATTRIBUTE SEP_PRIMES.
   /SCALE  [scalenr.]
Instead of entering the factors one by one, the current or given scale is used. If the current scale is used, it will be replaced with the result. Only the combination count needs to be entered. Degree 0 with 1/1 is not used, so if a factor of 1/1 is desired, there needs to be an extra one in the scale besides degree 0.
Instead of a scale number, you can also give a filename. This qualifier can not be combined with /FACTOR and /PRIMES.
   /CORNER
Create a larger Combination Product Set by also taking combinations of the generating intervals themselves. So once one interval is selected, it is put back in the set so it can be taken again (drawing with replacement). The lattice of the result scale is then in the form of a corner. It is similar to /SUPERSTELLATED, a one-sided form of it. Use the LATTICE command to see the difference. Can not be combined with /EXPANDED, /STELLATED and /SUPERSTELLATED.
   /EXPANDED
Create an expanded Combination Product Set by taking several combination counts of the generating intervals. First enter the number of factors. Then the first combination count (default 1) and the last combination count. All combination counts from the first until the last will be combined in the scale. If all counts from 1 to the number of factors is taken then it produces an Euler-Fokker genus. Cannot be combined with /CORNER, /STELLATED or /SUPERSTELLATED. See also EULERFOKKER.
   /STELLATED
Create a stellated Combination Product Set. The input values are given as with a normal CPS. A stellated CPS is a CPS where all otonal (harmonic) and utonal (subharmonic) chords are completed by adding missing tones. For example, in a 2 out of 4 CPS (Hexany), there are 6 tones forming 4 otonal and 4 utonal triads. These are completed to tetrads, so 8 tones are added making a total of 14. If the Hexany is pictured as an octahedron, the added tones are points above the faces, giving a starlike shape, hence the name. If the number of factors is not twice the combination count, then the otonal and utonal chords are not equal in number but stellation is still possible.
Contrary to the unqualified CPS command, the central tone, 1/1, is not in the scale unless it is added in the stellation process. So one doesn't need to delete it afterwards. The tonic is by default the smallest product. Do NORMALIZE afterwards to get an octave reduced scale.
Note that Erv Wilson's definition of stellation only encompasses the case where the combination count is half the number of factors, and the generalisation of it here to all combination counts is not necessarily what he would intend it to be, nor with /SUPERSTELLATED.
Cannot be combined with /CORNER, /EXPANDED or /SUPERSTELLATED.
   /SUPERSTELLATED
Create a superstellated Combination Product Set. This is a CPS which results from CPS/STELLATED, but where the incomplete chords formed by the extra tones of the stellation are also completed; and if that forms new incomplete chords, they are also completed, and so on. Note that this operation is how Erv Wilson defined "stellation". Perhaps confusingly, the names in this program have been chosen to distinguish and characterise the two kinds of stellation.
Cannot be combined with /CORNER, /EXPANDED or /STELLATED.
   /FACTOR
Create a Combination Product Set by giving the generating intervals as linear factors which need not have a period. This qualifier is not allowed in combination with /PRIMES and /SCALE.
   /PRIMES
Create a Combination Product Set from a set of prime numbers. First is asked Enter number of factors to select from: and Enter combination count:. Subsequently the first factor must be entered which must be an integer number and then the number of primes to be skipped each time for the next prime to be taken. For instance if the first is 3 and then 2 are skipped the next prime will be 7. With 0 the same prime is used again, and with 1 the next prime is taken. Can not be combined with /SCALE and /FACTOR.


DELETE

DELETE  position  [scalenr.]
Delete a position (degree) from the current or given scale. Positions may not be higher than the number of notes in the scale. If degree 0 with the value 1/1 is deleted, then all pitches shift downward by the amount of degree 1. If more than one position is given as parameter, they need to be separated by spaces. See also INSERT and SELECT.
   /START  position  [scalenr.]
Delete all pitches at the given position and higher from the current or given scale. The same operation can be done with EXTEND.
   /INTERVAL  position  [scalenr.]
Delete the interval at the given position (degree) from the current or given scale. The position may not be higher than the number of notes in the scale. The pitches above the given position will then shift downward. See DISCARD/EQUAL to delete an interval with a given size.
   /EQUAL  pitch  [scalenr.]
Delete the given pitch from the current or given scale. If there are more degrees with the same pitch, then these are all deleted.
   /GREATER  pitch  [scalenr.]
Delete all pitches from the current or given scale that are greater than the given pitch.
   /NEAREST  pitch  [scalenr.]
Delete the pitch from the current or given scale that is nearest to the given pitch. Degree 0 will not be deleted or found as nearest.
   /SMALLER  pitch  [scalenr.]
Delete all pitches from the current or given scale that are smaller than the given pitch.
   /EGALIZE  [scalenr.]
Delete one pitch from the current scale or given scale so as to make the scale more equal tempered. If the scale would not become more equal tempered by deleting one pitch, then nothing happens. All interval classes are considered in this. The sum of absolute logarithmic differences of all intervals with the equal tempered intervals is minimised. Note this is not the same as the average distance from equal tempered shown by SHOW DATA. The formal octave will be kept.
   /FACTOR  factor  [scalenr.]
Delete all rational pitches which contain the given factor from the current or given scale. The factor can be an integer (prime or not) or a ratio. See also LIMIT/DELETE and PROJECT.
   /DEN_FACTOR  factor  [scalenr.]
As above, but deletes rational pitches which denominator contains the given factor. The factor should be an integer (prime or not). If it's a ratio, then its denominator is simply ignored.
   /FLOATS  [scalenr.]
Delete all floating point pitches from the current or given scale.
   /MODEL  scalenr.  [scalenr.]
For each pitch in the first given scale, the nearest pitch from the current or second given scale will be deleted. The formal octave will not be deleted. Instead of a scale number, a filename may also be given for the first parameter. See also SELECT/MODEL.
   /RANDOM  [count]  [scalenr.]
Delete a randomly chosen pitch from the current or given scale. The formal octave may also be deleted. If a count is given then so many randomly chosen pitches will be deleted with each the same probability. See also SAMPLE/RANDOM and SEED.
   /UNDER  [scalenr.]
Delete all rational pitches from the current or given scale which denominator has a higher prime limit than the numerator. Floating point pitches are not deleted.
   /ODD_UNDER  [scalenr.]
As above, deletes rational pitches which denominator has a higher odd limit than the numerator.


DIFFERENCE

DIFFERENCE  scalenr.  [scalenr.]
Remove pitches that are both in the first scale and the second scale from the second scale. If no second parameter is given, it will be the current scale. The first parameter may also be a filename. See also INTERSECT and MERGE. For the exclusive-or of two scales (i.e. obtain the pitches not contained in both) see command file xor.cmd.


DIRECTORY

DIRECTORY  [file-mask]  [scale-size]
Show the list of files that satisfy the given filename pattern. If it is omitted, the file mask will be *.scl. It will show the name, size and part of the description as the window width permits. If no filename extension is given, '.scl' will be assumed. If the scale size parameter is also given, then files which conform to the file mask and which have this scale size are shown. It must be a positive number. If only a scale size is given and no file mask, then all scale files with that number of notes will be shown.
For file types other than scales, the size column lists these numbers:
   /DESCRIPTION  search-pattern  [file-mask]
Show the list of scale files which have the given search pattern in the scale description. If it consists of more than one word, it must be surrounded by double-quotes ("). Matching is case-insensitive. The following special characters are recognised in the pattern:
* : matches zero or more of any character.
? : matches exactly one of any character.
Some example search patterns:
meantone: the literal string "meantone"
{dh}e{kx}any: a string beginning with a d or h followed by an e followed by a k or x followed by "any".
~{aeiou}??????ing: a ten-character word starting with anything but a vowel and ending in "ing".
\?: the literal string "?"
The default file mask is *.scl. Cannot be combined with other qualifiers.
   /MAPPING  [file-mask]  [map-size]
Show the list of keyboard mapping files that satisfy the given filename pattern and mapping size, if given. Works by assuming filename extension '.kbm'. Can only be combined with /NAME_ONLY.
   /NAME_ONLY  [file-mask]
This will only display the filenames, which is quicker. Scales and mappings cannot be selected by size, only file mask. Can only be combined with /SAVE_LIST.
   /SAVE_LIST  [file-mask]  [output-filename]  [scale-size]
Save the filenames shown by the command to a scale list file with the given name or dir.lst, which is default. This list file is used when "@dir" is given instead of a filename mask. For instance to do a much quicker compare against these files, or to load them all into memory, or to invoke an operation on all of them using ITERATE. Can only be combined with /NAME_ONLY, /LINEARTEMP, /PROPER, /TRIVALENT and /WELLTEMP.
   /WIDE  [file-mask]
This will only display the filenames, and more than one per line. Cannot be combined with other qualifiers.
   /LINEARTEMP  [file-mask]  [scale-size]
This will display only scales which are linear temperaments, such as is also shown by SHOW DATA as Myhill's property or as equal temperament. In the latter case, "ET" is put behind the file name. Can only be combined with /SAVE_LIST.
   /PROPER  [file-mask]  [scale-size]
This will display only scales which are proper or strictly proper, such as is also shown by SHOW DATA. Can only be combined with /SAVE_LIST.
   /RATIONAL  [file-mask]  [scale-size]
This will display only scales which consist entirely of rational pitches. The prime-limit is shown behind the filename. If the scale has all superparticular steps, then "S" is shown behind the prime-limit. Can only be combined with /SAVE_LIST.
   /TRIVALENT  [file-mask]  [scale-size]
This will display only scales which are trivalent, such as is also shown by SHOW DATA. It means that all interval classes have exactly three sizes. Can only be combined with /SAVE_LIST.
   /WELLTEMP  [file-mask]
This will display only 12-tone scales with 2/1 as octave, which are well-temperaments or French temperaments ordinaires, such as is also shown by SHOW DATA. In the latter case, "ORD" is put behind the file name. Can only be combined with /SAVE_LIST.
   /CREATE  directory
Create a new directory in the current one. If it already exists, nothing will be done. To see the current directory, use CD with no parameter.


DISCARD

DISCARD  margin
Find clusters of notes that are within the given range from each other, and delete all but the one with the highest absolute harmonicity value. The margin can be given in cents or as a ratio. If there are notes with equal harmonicity values which are highest, they are kept. The harmonicity value of a floating point pitch is considered to be zero, so they are always deleted if there is a rational pitch within the margin. If all notes are floating point pitches then the lowest scale degree will be kept.
The harmonicity function can be customised with the SET HARMCONST command and the coefficients viewed with SHOW HARMCONST.
After doing this command, the notes will be in ascending order. An example, to remove notes within a syntonic comma do: DISCARD $k. To remove notes by distinguishing them in other ways, see LIMIT.
   /SMALLEST
Use as margin the smallest interval of the scale. There is no parameter. This is equivalent to doing DISCARD %si. To see what is the smallest interval SHOW DATA can be done. Cannot be combined with /EQUAL.
   /EQUAL  interval
Delete from all intervals in the current scale which are equal to the given interval, the pitch with the lowest absolute harmonicity value. If the harmonicity values are equal then the highest pitch will be deleted. The harmonicity value of a floating point pitch is considered to be zero. After doing this command, the notes will be in ascending order and unique. Cannot be combined with /SMALLEST.


DIVIDE

DIVIDE  interval  count  [lower-bound]
Show divisions of the given interval in superparticular ratios where the second parameter is the number of ratios. The first parameter must be given as a ratio. Only one permutation of each division is given; the interval sizes are in descending order.
If a lower bound is given, only divisions with all intervals greater or equal to it are shown.
   /FIND  interval  [octave]  [maximum-difference]
Show the equal tempered divisions of the given octave wherein a scale degree approximates the given interval. If the octave parameter is not given, 2/1 is the default. If no maximum difference parameter is given, then successively better approximations will be shown, multiples of earlier shown divisions will not be shown, and three dots will indicate that all intermediate temperaments successively approximate the given interval better and better until the one on the next line. If a maximum difference is given (cents or ratio), then all divisions with a deviation less than that will be shown. It stops when the deviation is zero.
This command can also be used to approximate a triad with an equal temperament. For example, to approximate 5:6:8 do DIVIDE/FIND 6/5 8/5.
To approximate more intervals with a division, use the command FIT/MODE. The octave needs to be present in the scale then. To create a given equal temperament use the command EQUALTEMP. To find a least-squares approximation of more than one pitch, use the command FIT.
   /ALLFIND  interval  [octave]
As above, but show all successive equal tempered divisions. It continues also when the deviation is zero.
   /CONSISTENT  intervals  [octave]  [max-difference-or-steps]
As /FIND, but instead of the best direct approximation, the best consistent approximation is given. Consistent approximation means that the constituent prime factors of the interval ratio are approximated to the nearest step in each successive division, and these step numbers are added to approximate the ratio. This often gives a different result than the direct approximation. If the shown division is consistent for the harmonic limit of the given interval, this is indicated with a 'h'. Harmonic limit being in this case the maximum of numerator and denominator, but is shown only if it's less than 10000. If not and it's consistent for the prime limit of the interval, it's indicated with a 'p'. See also EQUALTEMP/DATA.
If no third parameter is given, then all divisions will be shown. If it is a ratio or cents value, then it's interpreted as a maximum difference for the approximation. If it's an integer value, then it's interpreted as a number of steps and only the divisions where the consistent approximation is the same number of steps will be shown. The numbers given between < and | are the number of equal tempered steps for the primes in the given interval in ascending order.
Example: to see in which octave divisions the syntonic comma vanishes, do DIVIDE/CONSISTENT $k 2/1 0, vanishing means it is zero steps.
More than one rational interval can be given, but they must be surrounded by double quotes. Then all equal temperaments will be given in which all intervals have the same number of consistent steps, to be given in the third parameter. The default is 0. Limits will not be indicated.
See also EQUALTEMP/CONSISTENT, EQUALTEMP/VANISH and QUANTIZE/CONSISTENT.
   /GENERATOR  interval  generator  [octave]
Shows divisions of the (octave extended) given interval which approximate the given generator. If the octave parameter is not given, 2/1 is the default formal octave (period). Only successively better approximations with an error less than the size of the generator will be shown, unless the maximum deviation set with SET MAXDIFF is not 0.0 cents. Then all approximations not exceeding this difference will be shown. The results given are: the number of octaves and the number of generator steps (between the brackets, also called the mapping), the resulting interval using the given generator, the difference with the given interval (the comma which can be tempered out), and the generator to attain the given interval exactly. At the next line, the number of tones that produce a well-formed scale is given, i.e. has Myhill's property or is equal tempered, see LINEARTEMP/WELLFORMED.
   /FIRST_GEN  interval  generator  [octave]
As above, but only shows the first approximation with a nonzero generator count.


DOUBLE

DOUBLE  [interval-class]  [expansion]  [position]
Double the number of pitches in the current scale by inserting a mean between pitches separated by the given interval-class. The default interval-class is 1, which means adjacent pitches. It may be any integer number. The default expansion factor is 2, i.e. doubling. To triple by inserting two means, do DOUBLE 1 3. Expansion may be any positive number. To insert new pitches only between one pair, give the upper scale degree number as the third parameter, for example to insert one pitch between degrees 6 and 7, do DOUBLE 1 2 7.
The qualifiers select the pitch-averaging operation. Geometric mean is the default. Qualifiers cannot be combined. See also SAMPLE, MORPH and INSERT/SPLIT.
   /GEOMETRIC
Uses the geometric mean, i.e. sqrt(a * b). This divides an interval equally. This is the default qualifier.
   /ARITHMETIC
Uses the arithmetic mean, i.e. (a + b) / 2. Densifying a scale by inserting harmonic or arithmetic means is also known as katapyknosis.
   /HARMONIC
Uses the harmonic mean, i.e. 2 * a * b / (a + b). It is the arithmetic mean with the intervals reversed. Densifying a scale by inserting harmonic or arithmetic means is also known as katapyknosis.
   /SUBC_HARMONIC
Uses the subcontrary to harmonic mean, i.e. (a2 + b2) / (a + b).
   /RHSM
Uses the root harmonic square mean, i.e. sqrt(2 * a2 * b2 / (a2 + b2)).
   /RMS
Uses the root mean square, i.e. sqrt((a2 + b2) / 2).
   /LOGARITHMIC
Uses the logarithmic mean, i.e. log(mean) = (b * log(a) + a * log(b)) / (a + b). Specifying another expansion factor than 2 is not allowed.
   /SUB1_GEOMETRIC
Uses the first subcontrary to geometric mean, i.e. ((b - a) + sqrt((a - b)2 + 4a2)) / 2. Specifying another expansion factor than 2 is not allowed.
   /SUB2_GEOMETRIC
Uses the second subcontrary to geometric mean, i.e. ((a - b) + sqrt((a - b)2 + 4b2)) / 2. Specifying another expansion factor than 2 is not allowed.
   /COUNTER_LOG
Uses the counterlogarithmic mean, i.e. log(mean) = (a * log(a) + b * log(b)) / (a + b). Specifying another expansion factor than 2 is not allowed.
   /MEDIANT  [interval-class]  [position]
Uses the mediant, i.e. (num(a) + num(b)) / (den(a) + den(b)). All pitches must be rational. Specifying another expansion factor is not allowed.
   /GOLDEN  [interval-class]  [position]
Uses the golden mediant, also called noble mediant, which is (num(a) + phi * num(b)) / (den(a) + phi * den(b)), where phi is the golden ratio: 1.61803398875 approximately. All pitches must be rational. Specifying another expansion factor is not allowed.
   /EPIDEN  [interval-class]  [expansion]  [position]
Uses the epimoric mean, i.e. (2 * a * b - a - b) / (a + b - 2), which is produced by the arithmetic mean of the Epimoric Denominator, see also SET ATTRIBUTE EPIDEN. The above formula is for expansion factor 2. Higher ones are also allowed. However if one of the two pitches which are being interpolated is 1/1, then the mean cannot be calculated and one is added instead to the epimoric value of the other pitch. If both pitches are superparticular (epimoric), then this mean equals the mediant.


ECHO

ECHO  [text]
Writes the given text to the screen. This is useful for displaying text in external command files. Without text, an empty line will be written. This command can also be used to display pitch values on the screen or simultaneously display them and write them to an output file. In the following functions, a pitch parameter is a pitch expression, see help of Expressions, or arithmetical pitch expression, see CALCULATE.
The parentheses are always mandatory. The following lexical functions exist:
%attrib(pitch,attribute)
Gives the attribute value of a pitch for the given attribute kind. Some attributes are disallowed, namely those that do not solely depend on the pitch itself, for example: DIFF_ET, DISSONANCE, MULTIPLE, NOTATION, etc. See also SET ATTRIBUTE.
%bpm(pitch)
Gives the frequency in beats per minute relative to the base frequency.
%cents(pitch)
Gives the cents value.
%den(pitch)
Gives the denominator of a rational pitch.
%desc(scalenr.)
Gives the description belonging to the scale memory.
%ellis(pitch)
Gives the frequency in Ellis relative to the base frequency. Ellis is the number of cents and octaves relative to the 64-foot C (16.3516 Hz).
%factor(pitch)
Gives the linear value.
%hertz(pitch)
Gives the frequency in Hertz relative to the base frequency.
%i()
Gives the current scale degree number under ITERATE/SCALE.
%image(pitch)
Gives the ratio of a rational pitch or cents value of a floating pitch.
%listfactor(scalenr.)
Gives the scale as a list of linear factors starting at degree 1. So put 1.0 in front for degree 0 if necessary.
%log_fract(pitch)
Gives the number of octaves as a fraction with maximum denominator 999.
%midi(pitch)
Gives the fractional MIDI note number relative to the base frequency.
%n(scalenr.)
Gives the number of notes in a scale memory. Adding and subtracting is also possible, like %n-1(0).
%name(pitch)
Gives the interval name of a rational pitch.
%note(pitch,notation-system)
Gives the shortest note name according to the given notation system. See help of SET NOTATION for the list of notation systems. If the notation system is omitted, the current notation system is used.
%note2(pitch,notation-system)
As above, but gives a second name too if there is one.
%noteoct(pitch,notation-system)
Gives the shortest note name plus octave number according to the given or current notation system.
%noteval(note-name,notation-system)
Gives the nominal note value according to the given notation system. For equal tempered systems this is the equal tempered value. For equal tempered systems which are diatonic, all accidentals may be used in any combination. Octave numbers can be appended to the note name with a period in between, for example: c#.1 The same name can be used in the score files for EXAMPLE. If the notation system is omitted, the current notation system is used. For Sagittal notations, only the current form is recognised, see SET SAGITTAL. To store a note value in a pitch memory, use COPY/NOTEVAL.
%num(pitch)
Gives the numerator of a rational pitch.
%octcps(pitch)
Gives the Csound/SAOL oct value relative to the base frequency.
%primes(pitch)
Gives the prime factorisation of a rational pitch.
%reci(pitch,unit)
Gives the reciprocal linear value times the given unit.
%scl(appendix)
Gives the name of the last scale file saved or loaded, regardless to which scale memory. If appendix is a non-empty string, then it is appended while replacing the original file extension. So if it was .scl, then %scl() is equivalent to %scl(.scl). This function can also be used to specify a file name for the COMPARE, FILE, LOAD, REMOVE, SAVE, SEND/FILE and TYPE commands. If there was no file loaded or saved before and the appendix parameter is empty, then the value will be "scala-temp".
%sep_primes(pitch)
Gives the prime factorisation of a rational pitch, not using exponents and excluding prime number 2 (for example 3.3.5.7).
%sys()
Gives the current notation system name.
%units(pitch,units_per_octave)
Gives the logarithmic value in terms of the given unit.
To get pitch values from the current scale (number 0), use % followed by a degree number, for example: %cents(%5).
These functions can be mixed with other text or used more than once per line. They can be employed to write input files for other programs or be used to output user calculated data.


EGALIZE

EGALIZE  factor
Move the pitches of the current scale towards or away from the equally tempered value. If the given factor is zero, the resulting scale will be an equal-tempered scale, if it is 1.0, the scale will remain unchanged. A factor larger than 1.0 increases the unevenness of the scale. The factor linearly influences the logarithmic difference of the scale pitches and the corresponding equally tempered pitch. The formal octave remains the same. The factor may be given as a fraction or as a floating point value and may also be negative. A value of -1 will reverse the sign of the difference with the equal-tempered value. To view the effect of this command do SET ATTRIBUTE DIFF_ET.
   /MODEL  [scalenr.]  [maximum-difference]
Temper the intervals of the current scale to get as many of them as close as possible to the pitches in the given scale. All intervals which are within the distance of the given maximum difference to one of the approximants in the given scale are taken into account. The quadratic error of these intervals will be minimised. All intervals of the current scale except the formal octave are subject to approximation. To see them, use SHOW INTERVALS.
This command can be used to increase the number of consonant triads, tetrads, etc. in a scale, or temper them to distribute the error more egally over the present consonant chords. Then the given scale should contain the intervals which are considered consonant in the chords to be improved. However this method only optimises individual dyads and not larger chords as a whole, so for larger chords this method may be suboptimal.
If the current scale is just, then the maximum difference should not be less than the comma one wishes to spread out. It's worthwile to experiment with which approximants to include and which not. For instance to optimise major triads it could be chosen to include 6/5, 5/4 and 3/2, or only 5/4 and 3/2. For the most consonant intervals, it's useful to also include the octave inversions.
A list of the used approximants will be given with the number of times each one was used to be approximated. They may also be floating point values.
Without a given scale, the current scale will be taken. Instead of a scale number, a filename may also be given. If no maximum difference is given, then the value set with SET MAXDIFF will be taken.
Try this command a second time to see if the scale can be further improved.
Example: There's a scale named cons_7.scl in the archive with consonant 7-limit intervals. To optimize the number of 7-limit tetrads and triads in a just scale by egalizing the septimal kleisma, do: EGALIZE/MODEL cons_7 225/224. See also PROJECT/TEMPER.


EQUALTEMP

EQUALTEMP  division  [octave]  [scale-size]
Create an equal-tempered scale with the given formal octave (also called modulus or interval of equivalence) divided into the given number of steps (division). The division may be either a positive integer or floating point number. If the octave parameter is not given, 2/1 is assumed. If a scale size is given, the resulting scale will have that number of notes, otherwise it will be the same as the division, or if the division was given as a floating point number, the nearest integer above that. To create a (non-octave) scale by giving the size of the step rather than dividing a formal octave, enter 1 for the division, the step size for the octave and the number of tones as the last parameter. Qualifiers cannot be combined.
   /CONSISTENT  limit  [octave]
Shows all the equal divisions that are consistent in the given limit. The default octave parameter is 2/1. Shown are the division, its consistency limit and consistency level for the given limit if it's odd. So all divisions with a consistency limit of the given limit or higher are shown. To see more aspects, check the divisions with EQUALTEMP/DATA. See also DIVIDE/CONSISTENT and QUANTIZE/CONSISTENT.
   /DATA  division  [octave]  [alternative-fifth]
Shows structural properties of the temperament and relations between several intervals. The best approximations to major third, perfect fifth and harmonic seventh are shown and other interval sizes derived from them. If another octave than 2/1 is entered, the given comma sizes are with respect to the nearest octave approximation.
"Misfit numbers" are an invention of Fokker and are sums of squared errors in cents. M1 only counts 3/2, M2 is the sum of squared errors of 3/2 and 5/4, M3 of 3/2, 5/4 and 7/4, M4 adds 11/8 and M5 adds 13/8.
"Relative errors" are a percentage of the average deviation in terms of step size. The average error is a quarter step, because the error varies between zero and half a step. R1 only counts 3/2, R2 is the sum of relative errors of 3/2 and 5/4 divided by two, R3 of 3/2, 5/4 and 7/4 divided by three, etc. like with the misfit numbers.
"Combined error factor", from Mandelbaum, is the sum of the squared errors of the first basic three divided by the size of half a step. This makes it a kind of normalised version of the misfit number M3. The second combined error factor is given if the highest consistently represented harmonic is 9 or higher. It then includes the errors of the higher odd consistent harmonics reduced by the octave like 9/8, 11/8, etc.
The command also shows chromatic distributions and all possible strictly diatonic subscales and some subscales of other forms. With those, the diatonic semitones have a hyphen if their size matches the structural size, and note G is in upper case if the fifth equals the basic fifth.
If the third parameter is given, it is used as the best fifth, instead of the nearest approximation. It must be a positive step number in the upper half range smaller than the given division.
See also DIVIDE/CONSISTENT.
If the current scale is an equal temperament, then view its data with the command EQUALTEMP/DATA n %n. See also tips.par with tips about this command.
   /DIFFERENTIAL  division  [octave]
Create a Dudon differentially coherent scale, which is a scale where difference tones between two pitches a fixed number of steps away, are also scale tones under octave equivalence. A simple example of such a scale is 1/1 6/5 3/2 8/5 19/10 2/1. The first parameter is the number of tones in the scale. The default octave parameter is 2/1. Then the interval class from which the difference tone results is asked followed by the target interval class for it. The default target given will be the nearest one. This is a negative number, since the difference tone will be smaller than 1/1. The last question asks for a scale position to exclude from the set of equations. The reason for this question is the fact that there is one more interval than tones to calculate, since the octave is given and fixed. So one tone has to be excluded, and cannot (in general) be differentially coherent. If the given number is from 0 to n-1 (n = the number of tones), then it only determines the mode or key of the result scale. The approximations to the excluded tone are then the same. If the given number is from n to 3*n-1, one equation is changed for one tone to become the target of two difference tones. This results in better or worse approximations, usually with less equal scales. Finally, if the given number is -1, then the best approximation of all will be taken. Sometimes it may seem there is a better approximation than the one taken, but then it will have duplicate tones, so it's not selected.
Because the result scale will be a JI scale, it's useful to do FAREY with a high enough order afterwards to make it rational. Only the denominator can easily become larger than the highest usable integer, and in that case there's no point in doing FAREY. The command EQUALTEMP/DATA tells which interval class has the best approximation to its difference tone. See also SHOW/DIFFERENCE LOCATIONS and SUBTRACT/DIFFERENCE.
   /FREQUENCY  division  [octave]  [first-pitch]
Create a scale where the differences between successive frequencies form an arithmetic series. This means that the difference of these differences is a constant. It will be calculated from the given parameters. The default octave parameter is 2/1. If the third parameter is not given, then the differences will be equal, so it will be a constant series. If the value for the first pitch is too high or too low, a non-monotonic scale will result. See also HARMONIC and MOVE/FREQUENCY.
   /LENGTH  division  [octave]  [first-pitch]
As above, but create a scale where the differences between successive reciprocal frequencies (string lengths) form an arithmetic series. See also HARMONIC and MOVE/LENGTH.
   /LOGARITHMIC  division  [octave]  [first-pitch]
As /FREQUENCY, but the logarithms of frequencies will form an arithmetic series. If the first-pitch parameter is not given, it will therefore be a normal equal temperament. Check the result with SHOW/INTERVAL SCALE. See also LINEARTEMP/VARIED.
   /MISFIT  first-division  [octave]
Like /DATA, but only shows the Misfit numbers, Relative errors, TOP and TOP-RMS errors, the Combined error factor and the Weighted triad dissonance for the given and higher divisions. If the division is not an integer number, only that division will be shown.
   /SHORTDATA  division  [octave]  [alternative-fifth]
Like /DATA, with the difference that possible diatonic and other subscales are not shown.
   /VANISH  division  highest-prime  [octave]
Create a list of commas which vanish in the given equal division for a given prime limit. Vanishing means that their consistent representation in the division is zero steps. Integer multiples of vanishing commas will not be given. Only the commas which are smaller than one and a half step size in the division will be given, if SET MAXDIFF is set to zero, or that value otherwise.
The current scale will be silently replaced by this list of commas, so you must do SHOW to see the result. After doing SORT, the larger commas can be easily deleted. If you wish to check if commas vanish in multiple divisions at the same time, then copy the scale to another scale memory and do INTERSECT with the list of another division. See also DIVIDE/CONSISTENT and EQUALTEMP/CONSISTENT. This command can also be used to find commas (unison vectors) to make a periodicity block, see PIPEDUM.


EUCLID

EUCLID  iterations  [rank]
Performs the Euclidean algorithm on the current scale with the given number of iterations and shows the results. By default, the second largest pitch is subtracted from the largest pitch as many times as goes in each iteration. If this is more than one time, the intermediate result is also shown, indicated by an apostrophe on the first line. Iteration stops if one of the two largest intervals have become zero. The default second parameter is 1. If it's 2, then the third (rank+1) largest pitch is subtracted from the largest pitch, etc. The scale must have at least rank+1 pitches. If the current scale has rational intervals, they are also shown as rationals. If multiple instances of the same interval occur, only one row will be displayed. A plus sign in the first column indicates a change of the smallest "defining" interval. Also the sum count of all but the smallest interval is given and the remainder being the sum size of the smallest interval.
The algorithm is also known as Viggo Brun's algorithm. See also CONVERGENTS and INSERT/RANKING.


EULERFOKKER

EULERFOKKER
Create an Euler-Fokker genus. This is a scale with a rectangular lattice. See also LATTICE. With this command however the factors are not restricted to being prime, or even integer or rational. The first question is Enter number of dimensions: that is for the resulting lattice to have. Then Enter factor 1 which need not be an integer but can be any pitch. Then Enter multiplicity 1: that is the number of lattice steps in the first dimension. Then it goes on for the remaining dimensions and the concluding question is Enter formal octave (enter for none): for an eventual separate last degree as interval of equivalence. For example to create a genus [33355] enter: 2, 3/1, 3, 5/1, 2, 2/1 and then do NORMALIZE. Also multilinear temperaments (temperaments with more than one chain of fifths) can be made. For example to create a tuning with two 12-note chains of a 700 cents generator with a distance of 16.667 cents enter: 2, 700.0, 11, 16.667, 1, 2/1 and then do NORMALIZE.
If there are large multiplicities for rational factors, the origin might be moved from the lower left corner of the lattice in order to preserve the rationality of scale, in case of overflows otherwise. See also KEY/CENTRE for moving the origin to the middle of the lattice.
See also CPS.
   /CORNER
A partial Euler-Fokker genus will be created with tones smaller than or equal to a given upper bound. So instead of the multiplicities, a single upper bound, which must be a positive number and can also be floating point, is given. Ernest McClain invented this scale model and called it "musical yantra". This model only uses integer factors which are also prime. The command doesn't have this restriction. Cannot be combined with /TRIANGLE.
   /TRIANGLE
Only the lower triangular part of the normally rectangular lattice will be made. The genus will be cut off at the line (plane, etc.) going through all the endpoints of the basis. Cannot be combined with /CORNER.


EXAMPLE

EXAMPLE  input-file  [output-file]
Create a MIDI file from a text score using the current scale or a scale file specified in the score. Pitches can be expressed in a number of ways. Different tunings can be applied without having to change the score. The resulting MIDI file can make use of pitch bend messages for tuning or MIDI Tuning Standard single note tuning change messages if the qualifier /MTS is used. Because pitch bend messages affect all notes on a MIDI channel, this command's algorithm chooses channels on a kind of round-robin basis. All channels will be used if necessary, unless some are explicitly excluded by exclude statements in the input file. If the amount of channels (16 or less) is not sufficient, which means there are too many simultaneous notes, then no output file will be generated. The instrument that plays the file is to be tuned to 12-tone equal temperament and be using the default standard pitch bend range of -2..2 semitones (4096 steps/100 cents). But the resolution can be changed by key MIDI_Pb_Resolution in file scala.ini if necessary.
The default extension of the input text file is .seq. If no output-file parameter is given, it will be given the same name as the input file but with the extension .mid. To use a MIDI file as input, use the /MIDI qualifier, see below.
In the input file you can specify notes, ladders and chords where degrees of the current scale will be chosen as the nearest representation for each of the pitches of the ladder or chord. So for instance to hear what's the best approximation of a just major chord, save a two-note scale with pitches 5/4 and 3/2 and specify this scale in a chord statement in the input file. 0 addtime <time offset> 0 default <filename> 0 division <units per quarter note> 0 equal <division> [<formal octave>] 0 exclude <channel no. (1..16)> 0 frequency <frequency for degree> [<degree>] 0 key <degree/pitch/name> 0 load <filename> 0 lt_gens <formal fifth> [<formal octave>] 0 lt_pars <generator> <division> [lower bound] [<formal octave>] 0 notation <notation system> [<formal octave>] 0 offset [<name>] 0 outfile <filename> 0 relative 0 transpose <degree/pitch/name> 0 velocity <default onset key velocity (0..127)> <time> chord <filename> <duration> [<degree/pitch/name>] [<offset degree>] [<velocity>] <time> ladder <filename> <duration per note> [<degree/pitch/name>] [<offset degree>] [<velocity>] <time> mnote <channel no. (1..16)> <note no. (0..127)> <duration> [<velocity>] <time> note <degree/pitch/name> <duration> [<velocity>] <time> parameter <parameter no. (0..127)> <value> <time> program <program no. (1..128)> [b] <time> tempo <microseconds per quarter note/q.n. per minute> [pm] <time> text <text info> <time> timesig <num/den> [<MIDI clocks>] [<32nd-notes>] <time> touch <value (0..127)> <time> track <track no. (1..16)> If above a zero is indicated as time parameter, this means that this field is ignored, it does not mean that the statement must appear at the beginning, except for "exclude", "frequency" and "division". Such a statement may appear anywhere and more than once and its scope is everything that is below until an eventual new statement of the same kind. The zero may not be omitted and is reserved for future use. Below an explanation of the parameters: The possible statements are the following, see also pbexampl.seq: The default file extension for scale files in the input file is '.scl' and for the output file parameter it's '.mid'.
If there is an error in the input file, then the message "Error in file format" will be given followed by the contents of the line that causes the error. If a wildcard is given in the filename then the first file that matches the name will be used. An input-file can also be generated from a MIDI file with EXAMPLE/CREATE.
The generated MIDI file format is SMF1 (file type 1). Some hardware sequencers or sequencers built in synths have trouble with this type if it's not "one channel per track". In that case you can convert the file to SMF0 (or eventually back to SMF1 again) with some MIDI toolset or utility like MIDI1TO0.EXE for Windows from Günther Nagler, see http://www.gnmidi.com.
See also PLAY.
   /MIDI  input-file  output-file
Use a MIDI file as input file. It will be translated into another MIDI file with an extra track containing pitch bend messages, using the current scale and keyboard mapping. The same algorithm as above is employed. The instrument to be used must be tuned to 12-tone equal temperament and be using the default standard pitch bend range of -2..2 semitones, unless qualifier /MTS is also used. There is no requirement for the input file to adhere to 12-note tuning, it is only used as a score. Therefore the note numbers in the input file have no relation to 12-tone equal temperament or any other tuning.
If there are MIDI channels which should not be retuned, these channel numbers should be entered first with the command SET EXCLUDE (for a drum track for example).
The current keyboard mapping is used for the mapping of note numbers to scale degrees (see LOAD/MAP and SHOW MAPPING). This also applies to soundcards with no keyboard. Only the keyboard mapping's range is ignored, the whole MIDI range is useable. To have a standard mapping, do CLEAR/MAP first (which is the initial situation). The mapping's reference frequency also has influence (can be changed with SET MAP_FREQ). If a special mapping is used, then make sure that any unmapped note numbers are not used in the MIDI file. Also if an unequal scale is used, make sure it is in the right key for the music (use KEY or SET MIDDLE to set the middle note in the keyboard mapping). The following conclusion is important because people often have the wrong assumption here: The mapping of note numbers only depends on the keyboard mapping and NOT on the pitch values in the scale! It also does NOT depend on the pitches which MIDI note numbers normally represent! There is NO matching of pitches based on their values going on. The ordering of pitches in the scale is always respected.
Any pitch bend messages in useable channels will be filtered out. Parameter (controller) messages may produce unexpected results since they apply to one channel and a channel in the output file may be used for more than one channel in the input file. This only happens if there's a shortage of output channels however. If this is the case then these parameter messages will be ignored and left out.
The algorithm tries to preserve any different program numbers for different channels as much as possible. This means that when many different program numbers are used, this will result in many pitch bend messages because there will be less channels available per voice. If there are not enough free channels, it is first tried to use a channel with a different program number. If this does not succeed, then the operation fails. In that case, try again after modifying the MIDI file to make use of less different program numbers.
Three other settings apart from SET EXCLUDE influence the result. If SET CONTROLLER OFF is done then the parameter (control) messages in the input file are not transferred to the output MIDI file. This is useful if these messages have adverse effects because of the MIDI channels being used differently and for more than one input channel.
If SET PITCH_BEND OFF is done first, then pitch bend messages are not added to the pitch bends for the tuning. This could sometimes make the pitch bend values out of range, if that happens they will be limited.
If SET PROGRAM OFF is done first, then program change messages are not transferred to the output file. This can be useful if a preselected voice is wanted or in case instruments are used that have a slow response to these messages which causes notes to be lost.
If SET CONTROLLER OFF is done first, then parameter change messages are not transferred to the output file.
During the translation, the track names are written to the screen and also the used program numbers and controller types (if present). Afterwards the amount of pitch bend messages written to the output file is shown. If a wildcard is given in the filename then the first file that matches the name will be used.
The file written is a standard MIDI file type 1, even if the input file type is type 0. Some sequencer programs can only handle type 0, see above for converting MIDI files.
Scala version 2.x can also do real-time MIDI retuning according to the current scale and keyboard mapping, see the Tools:Microtuning MIDI Relay dialog.
Cannot be combined with /CREATE, /NOTATION or /SCALE.
   /MTS
Instead of using pitch bend messages, use the MIDI Tuning Standard tuning dump when combined with /MIDI and MIDI Tuning Standard real-time single note tuning changes when translating sequence files. All other messages will be kept intact and no channel swapping will occur. So there also is no limit to the number of simultaneous tones because of the channel limit with pitch bends. An extra track is created with the tuning dump, based on the current scale and keyboard mapping for /MIDI/MTS. The current device ID set with SET DEVICE_ID will be used. Warning: very few MIDI file players or synthesizers support this standard. Cannot be combined with /CREATE, /NOTATION or /SCALE.
   /NOSWAP
Causes the MIDI channels of the input file to be unchanged in the output file, so no channel swapping will occur and the number of pitch bend messages will likely be higher than otherwise. Also there is no checking whether there are simultaneous notes on a channel which cannot be retuned together. It will only work well if each midi channel only plays at most one note at a time (or only octave intervals), otherwise sounding notes will inadvertedly be retuned. Messages on the excluded MIDI channels will be copied to the output file unchanged.
This qualifier is only useful if one plans on editing the output file afterwards. Can only and must be combined with /MIDI.
   /CREATE  input-file  output-file
Take a MIDI file as input and translate it into an EXAMPLE input file. The current keyboard mapping is used to map MIDI note numbers to scale degrees. If you make the octave degree of the mapping larger than 12, then that means you will have unused scale degree numbers which can be used to add more pitches to the resulting file later. The output file is meant to be checked and modified (otherwise EXAMPLE/MIDI would be more efficient).
If SET PROGRAM OFF is done first, then program change messages are not transferred to the output file. And if SET CONTROLLER OFF is done first, then parameter change messages are not transferred to the output file. Pitch bend messages are discarded. The MIDI channels which are excluded with SET EXCLUDE will not be translated with "note" messages but with "mnote" messages, so they are kept unchanged. This is useful for the standard MIDI percussion channel 10.
Can only be combined with /NOTATION and /SCALE.
   /NOTATION
Can only be combined with /CREATE and causes the pitches not to be specified as scale degree numbers but as note names. A notation statement will be added to the output file, which can of course be changed for interesting results. Key signature statements in the MIDI file will be observed and be taken into account for the note spelling, based on the cycle of fifths. So it's important that the MIDI file has these statements correct.
The current keyboard mapping determines the mapping of MIDI note numbers to note names. With this option it's not useful to have another octave degree than 0 or 12 because this function effectively assumes that the note numbers in the midi file represent 12 notes per octave. The current scale plays no role. Degree 0 will become C or B#, degree 1 C# or Db, etc.
The current notation is ignored except for one instance which is the feature to use the LT notation instead of E12. The division in SET LT_PARS must be set to 12, and the generator, lower bound and octave parameters are ignored. Then the note names will also be based on the MIDI file's key signature statements just like the letter names. So 0 sharps will be the gamut -3 .. 8, otherwise Eb .. G#.
   /SCALE
Can only be combined with /CREATE and causes the pitches not to be specified as scale degree numbers but as note names, where these are the names of the current scale pitches for the current notation system. They can be seen with SHOW/NOTATION SCALE. So the difference with /NOTATION is that instead of using 12-tET note names, the names can be chosen freely and are specified by the current scale. It can be of any size or order, so the pitches can be completely remapped if desired. A notation statement with the current notation system will be added to the output file. The offset and tolerance for the current note names is taken into account too. If there are pitches in the current scale without a note name, they will be omitted in the generated output file. So it can therefore be used as a filter for notes in the MIDI file, for example if it's too complex to be retuned in whole. If the current notation is LT, then statements for the LT parameters will also be added. This notation is useful to remap pitches based on the linear temperament model with generator-octave pairs where both can be chosen ad libitum.
The current keyboard mapping determines the mapping of MIDI note numbers to scale degrees. Key signature statements in the MIDI file will not be observed.


EXCHANGE

EXCHANGE  position  position
Exchange two positions in the current scale. The positions may not be higher than the number of notes in the scale. If degree 0 with the value 1/1 is exchanged, then all pitches will shift.
The other command to select and interchange scale or pitch memories is SWAP.
   /INTERVAL  position  position
Exchange the two intervals at the given positions in the current scale. The positions must be positive and not higher than the number of notes in the scale.
   /EQUAL  interval  and-interval
Replace the given interval(s) in the current scale with the given other interval and vice versa. The scale must be non-empty. It is not necessary that both intervals are present in the scale. If only one is present, it works the same as REPLACE/EQUAL.


EXIT

EXIT
Leave the program. In version 2.x, you can also press Ctrl+Q.


EXPONENTIATE

EXPONENTIATE  power  [base]
Change all pitches of the current scale by the given power. The default base is 2. The base-logarithmic values of the pitches are raised to the given power. Power may be a ratio or floating point value, base can be given as ratio or cents value. If the base is 2, octaves will remain the same, because 2/1 has a logarithmic value of 1. If the power is greater than 1, pitches greater than the base will become higher and pitches below lower and conversely. The base must be larger than 1. See also MULTIPLY and STRETCH.
   /LOGARITHMIC  add-constant  [base]  [first-position]
Change all pitches of the current scale by adding the given constant to them and then taking the logarithmic value with the given base. The default base is 2, and it must be larger than 1. The constant cannot be 0.0 unless first-position is not 0, which is default. If it's one less than the base then degree 0 will not be changed. It can be negative, but then the absolute value of the sum is taken before the logarithm. The constant may be a ratio or floating point value, the base can be given as ratio or cents value.


EXTEND

EXTEND  new-size  [scalenr.]
Change the number of tones in the current or given scale to the given size. If it is smaller than the current size, the highest degrees are removed. If the size is greater, extra tones are added by octave extension, where the formal octave (equivalence interval) is the last tone of the original scale. If the scale is equal tempered, it will remain so with the same step size.
To increase the number of tones by densifying the scale, use the command DOUBLE. To do the same by duplicating pitches, use SAMPLE.
   /ABSOLUTE  pitch  [scalenr.]
Increase the number of tones in the current or given scale until the formal octave is equal or higher than the given pitch, or the maximum scale size is reached.
   /FACTOR  factor  [scalenr.]
Multiply the number of tones in the current or given scale by the given factor. If it's not a whole number, then the product will be rounded to the nearest integer.
   /CHORD  interval  interval-list
Checks in the current scale on each degree if the first given interval exists on that degree and then adds each of the given interval(s) there if they are absent. The command does only one run, so if the added pitch(es) create new instances of the first given interval, then those will not be considered. This command therefore completes partial chords. The intervals must match within 0.5 cent.
For example, to complete major triads for each fifth do EXTEND/CHORD 3/2 5/4. To do this for each major third do EXTEND/CHORD 5/4 3/2. See also SHOW LOCATIONS, POLYCHORD and PRODUCT. Cannot be combined with other qualifiers.
   /CHILDREN
There is no parameter. Adds the Farey child fractions of all rational pitches in the current scale to the current scale. To get the child fractions of the next level, repeat this command. Can be combined with /PARENTS, then adds both Farey child and parent fractions. See also RATIO/CHILDREN.
   /PARENTS
There is no parameter. Adds the Farey parent fractions of all rational pitches in the current scale to the current scale. To get the parent fractions of the next level, repeat this command. To get all parent fractions, repeat this command until no more pitches are added. Note that it is possible to create a scale by starting with a scale of size one with 1/1 at degree 1. Afterwards NORMALIZE can be used. Can be combined with /CHILDREN. See also RATIO/PARENTS.


FAREY

FAREY  order  [highest-prime]
Replace each pitch in the current scale with the closest fraction to the pitch with denominator smaller than or equal to the given order. A Farey order is the maximum denominator. A prime limit can be given as second parameter and then the approximating fractions will not exceed that limit. This is a rational approximation that is different from the method used with APPROXIMATE. See also ASSUME and FIT/HARMONIC. If you want only one particular denominator, then use QUANTIZE/LINEAR. Warning: if the order is high then this takes a lot of computing time. Specifying a prime limit will add to the computing time.
   /BEATS
Replace each pitch in the current scale with the fraction which gives the lowest beat frequency with the scale pitch, where the denominator is smaller than or equal to the given order. Note that giving a high order is meaningless since the beating partials could be so high that they are inaudible. See also RATIO/FAREY. Can only be combined with /FLOATS_ONLY.
   /FLOATS_ONLY
Replace only the floating point pitches (those shown in cents) in the current scale. Can only be combined with /BEATS.
   /LOGARITHMIC  order  [octave]
Find the nearest Farey fraction of the logarithm of each pitch. So the result will be some step of an equal division whose cardinality does not exceed the given order. So here the order means maximum division. The default octave and base of the logarithm is 2/1. See also RATIO/FAREY/LOGARITHMIC. Cannot be combined with other qualifiers.
   /LEASTSQUARE  order
Replace each pitch in the current scale with a fraction approximating the pitch with denominator smaller than or equal to the given order, where all pitches have the same denominator. The denominator giving the best least squares difference for all intervals (between each pair of pitches) will be chosen. Cannot be combined with other qualifiers. See also FIT/HARMONIC.
   /MINIMAX  order
Replace each pitch in the current scale with a fraction approximating the pitch with denominator smaller than or equal to the given order, where all pitches have the same denominator. The denominator giving the smallest maximum logarithmic difference for all intervals (between each pair of pitches) will be chosen. Cannot be combined with other qualifiers. See also FIT/HARMONIC.
   /FIND  order
Find out which key of the current scale has the most Farey ratios with the given order, or in case of multiple ones, which one also has the lowest order. It doesn't matter whether the pitches are rational or not. Shown will be the actual Farey order (highest denominator), the scale key and the number of notes in the scale which are under this order.
Pitch memory 0 will be set to the interval that the base frequency is to be changed with in order to give the Farey ratios the lowest possible integer frequency. To see this, do SET FREQUENCY $0 and then SHOW/FREQUENCY SCALE. Cannot be combined with other qualifiers.


FILE

FILE  filename
Creates a text file with the given name. Then subsequent program output will be written to the file as well as to the screen. To cancel this and close the file, use the command CLOSE. To create a file with the same name as the last scale file loaded or saved, do FILE %scl(.txt). To create a file with the current date and time, put "%date" somewhere in the filename, and then this token will be replaced by the current date and time separated by an underscore. For example if you want to automatically keep a log of all Scala output, you could create a directory called 'log' and put this command in startup.cmd: FILE log\Scala_%date.log


FIT

FIT  [scalenr.]  [maximum-deviation]
Show the best least-squares fittings of an equal tempered scale to the given scale with decreasing step sizes, so that each pitch in the scale is approximately an integer multiple of this step, not all necessarily different. All scale pitches must be greater than 1/1. If the scale is not in non-descending order, it will be sorted first. You can give a pitch more weight by including it more than once in the given scale. Approximations are shown with step sizes down to about one twelfth of the smallest interval in the scale. Only successively better approximations are shown, unless a maximum standard deviation is given. Then all fittings with a lower deviation are shown. The linear least-squares approximation which is given first is the value for which degree one is one step, degree two, two steps, etc. This value does not necessarily occur in the list that follows. Subdivisions of the given approximations are not given since their standard deviation is not better but equal. If the steps match any known mode, the name will be given. For fitting to integer divisions, use FIT/MODE. See also CALCULATE/LEASTSQUARE.
   /MINIMAX
In addition to the best least-squares fittings explained above, also give the best minimax fittings, i.e. for which the maximum deviation among the steps is minimal. The linear minimax approximation which is given first is the value for which degree one is one step, degree two, two steps, etc. FIT/MINIMAX works slower then FIT only. See also CALCULATE/MINIMAX.
   /MODE  [division]  [scalenr.]
Show the best least-squares fittings of modes of increasingly larger equal tempered scales compared to the current scale, where the octaves are the same. Displayed are: If a division parameter is given, only the best mode-fitting of that division is shown. With use of the optional second parameter, the division parameter must be given too. Give a 0 for any division in this case.
Sometimes the standard deviation can be higher than the previous one. This is because the algorithm shifts the pitch of degree 0 to find a better fitting, but for the standard deviation given this is not taken into account. For any negative value of division, the successive divisions will be shown until (the positive value of) that division, otherwise it will stop at some point. See also MODE.
To fit all modes of the current scale do ITERATE/KEY FIT/MODE. To change the scale into a given mode, use QUANTIZE.
   /ALL_MODE  [first-division]  [last-division]
As above, only all successive divisions will be shown, instead of only increasingly better approximations. The parameters can be a range of divisions. If a first division is given, this will be the first division shown.
   /HARMONIC  [first-harmonic]  [scalenr.]
Show the best least-squares fittings of harmonic scales with increasingly higher first harmonic. If the number of notes in the scale is fifteen or less then the matched harmonics are shown, otherwise only the first and last harmonic and the amount of harmonics matched. An unmatched pitch is indicated with an 'x'. A harmonic will only match one pitch of the scale; the one that is closest to it. If all consecutive intervals of the harmonic scale are superparticular then this is indicated by the letter S. The standard deviation is also shown in cents.
If the first-harmonic parameter is given, then only the best fitting of that harmonic scale will be displayed, instead of successive higher ones. If it's negative, then all higher ones are shown, starting from the given parameter without the minus. See also HARMONIC. To find subharmonic fittings, do INVERT first.
To obtain a fitting of a harmonic scale, use the command SELECT/MODEL on a harmonic scale with the given bounds with the parameter scale as model. See also QUANTIZE/LINEAR and FAREY.


FLIP

FLIP  first-prime  second-prime
Exchange for all rational pitches in the current scale the exponents of the two given prime factors. This will cause the lattice to be mirrored in the main diagonal between the two prime axes. For example, if the primes are 5 and 7, and there's a pitch 28/25 (2.2.7/5.5) it will become 20/49 (2.2.5/7.7).
Instead of a prime, 1 may also be given for the second parameter. This will cause the lattice to be projected onto the first prime's axis. To view the result of this command, use LATTICE, or do SET ATTRIBUTE PRIMES. See also PROJECT.


FRETBOARD

FRETBOARD  interval-list
Check if the given interval or chord is present in the current scale and show the fingering on a diagram of a fretboard (fingerboard of a fretted string instrument). The tonic for the interval or chord is asked, which may be given as a scale degree number or a note name in the current notation system. Secondly the string tuning is asked, which must be given as a list of note names or scale degree numbers (or mixture thereof) separated by spaces, from low to high. Default is the standard guitar tuning of EADGBE. More examples are in the file fretstr.par. The note names should be in the current notation system, which may be any except the just systems JI, JI2, SAJI* and EITZ. The intervals don't need to be exact to be found in the current scale and the maximum width of the range is determined by the SET TOLERANCE command, so if the tolerance factor is set to 1/3, then the maximum difference is one sixth of the average one-step interval in the scale.
The intervals in the list are separated by spaces. But they can be separated by colons as well. In that case the values with decimal points are read as linear factors instead of cents values, for example: 4:5:6:7. See also SHOW LOCATIONS.
In the diagram a fret number of 0 indicates the open string. The nut is shown as a double vertical line. Numbers and the letter 'O' indicate the frets against which the string should be pressed (finger to the left side). The 'O' means that it's a root tone, the next note is indicated with '1', etc. If all notes can be played simultaneously on different strings then the message "Notes on different strings" is given.
See also SHOW TRANSPOSE to find suitable open string tunings. See SHOW STRINGLEN to calculate fret positions.
   /CHORD  name-pattern
Finds the first match of the given pattern in the list of chords and use the intervals from that chord to show on a fretboard for the current scale. To explore the available chord names, use the command CHORDS/ALL_SHOW. Can only be combined with /NOTATION.
   /MODE  name-pattern-or-mode
Finds the first match of the given pattern in the list of modes and show that mode on a fretboard for the current scale. A list of steps may be given too. To explore the available mode names, use the command MODE/ALL_SHOW. Can only be combined with /NOTATION.
   /NOTATION
Show note names in the current notation system at the finger positions instead of tone numbers.
   /SCALE  scalenr.
Instead of an interval list, give a scale number or filename and use the intervals from that scale to show on a fretboard for the current scale. Can only be combined with /NOTATION.


HARMONIC

HARMONIC  first-harmonic  last-harmonic  [step]
Create a harmonic scale with all harmonic numbers between and including the given ones. To create a subharmonic scale, do INVERT afterwards or reverse the parameters. Degree 0 will represent the first harmonic.
If parameter step is given then harmonics are skipped by that amount if higher than 1. This value may also be noninteger (>= 1.0), in which case the harmonics will obey this formula : floor(first-harmonic + n * step), n >= 0.
The first harmonic may be 0 in the above formula, but a 1 will in this case be the first note. The first and last harmonic and step may be given as floating point number or ratio.
To create a scale with an irregular set of harmonics, use INPUT/FACTOR. See also EQUALTEMP/FREQUENCY, MODULATE, FIT/HARMONIC and DOUBLE.
   /LOGARITHMIC  first-harmonic  last-harmonic  [step]
As above, but takes the log of the harmonic numbers instead. For good results, the first harmonic should not be less than 2.
   /OVER_UNDER
Create a sort of combined harmonic/subharmonic scale with regularly varied numerators and denominators. First the scale size is asked, followed by the formal octave, which must be a ratio. Then the numerator step is asked, which is the amount by which the numerator will be increased when going to the next scale degree. Lastly the denominator step is asked, the amount by which the denominator will be decreased when going to the next scale degree. The first harmonic/subharmonic will be determined by these parameters and if it cannot be a whole number then "Invalid argument" will be given. This should only occur if the formal octave is not a superparticular ratio. For example: 7, 2/1, 2, 1 will give the following scale: 1/1 10/9 16/13 34/25 3/2 38/23 20/11 2/1 or written in non-simplified form: 28/28 30/27 32/26 34/25 36/24 38/23 40/22, 42/21. If the denominator step is 0, then a harmonic scale will result, if the numerator step is 0, a subharmonic scale results. The step values may be noninteger, in which case the floor formula shown above is used. This scale model was invented by Dan Stearns.
   /RMS
Create a scale with the frequencies of vibration modes of an ideal rectangular membrane. The formula is sqrt(n2 + r m2) where n and m are integers and r is the aspect ratio of the rectangular shape (ratio between length and width). If n and m start at 1, the edges are fixed, if they start at 0, they are loose. The range of n and m will be asked for, and then r, which must be positive.


HELP

HELP  [subject]
Typing the command HELP followed by a subject item gives you information about it. If no subject is given, then all help topics will be displayed. Subjects may be abbreviated, like commands and qualifiers can. Square brackets indicate that a parameter to a command is optional. Often the number and meaning of parameters depend on the command qualifier (see help items Commands and Qualifiers). When this is so, the help texts show the parameters after the qualifier. If not, then the parameters are the same as for the command without a qualifier, unless stated explicitly that there are no parameters. The letter H is an abbreviation for this command.
In the GUI-version you can browse the help texts in a dialog window, do Help:Contents or press F1. Then enter the command or topic and click on the Find button or press Enter.


IMPORT

IMPORT
The default qualifier is /ZIP. See LOAD/UNFORMATTED and LOAD/CENTS to import text files with linear factors and cents values respectively. SAVE/CENTS exports to a text file with cents values, SAVE/CSV to a comma separated values file and SAVE/EXCEL to an Excel file. Use LOAD/CENTS to import a CSV file.
   /JICALC  filename
Converts a JI Calc text file to a set of Scala scale files. For each scale in the file, the description will be displayed and the number of notes. Then a filename will be prompted for to store the scale in. If a file with the same name already exists, then it will be asked if it is to be replaced or another name is wanted. The description of the scale can be changed. To do so, enter an empty filename. Then a new description can be entered, and then the filename again. To skip one scale, enter an empty description and then again an empty filename. To stop converting the input file, press Ctrl+C and the enter key.
Lines at the beginning of the JI Calc file will be ignored until a '#' character is encountered at the first line. The lines with key names will be ignored too. If the base frequency is different from 261.625 Hz, then it will be appended to the description when the file is written.
   /ZIP  filename  [directory]
Extracts all files from a zipfile. These can be scale files from the scale archive or other files. Any existing files will be overwritten. If the given filename has no extension, '.zip' will be assumed. If a wildcard is given in the filename then the first zip file that matches the name will be used. If a directory is given and it exists, then the files will be written in that directory. Text files in the archive will be automatically converted to the native format (CR-LF, LF or CR). Names of the extracted files will be shown in the main window.


INPUT

INPUT  [scalenr.]
Input a scale by hand. The pitches may be given as a rational or in cents. Those to be given in cents must contain a decimal point. Degree 0 (1/1) is not entered. If this is to be other than 1, use MOVE with the inverse amount afterwards. The default scale is 0 (current scale). See also LOAD.
   /FACTOR
Input a scale by giving relative, linear factors. They can be the frequencies of the notes or factors proportional to them. The numbers do not have to have a decimal point. Degree 0 is also to be entered whereto all subsequent factors are relative. That means if the values represent frequencies, it corresponds to the base frequency.
   /INTERVAL
Input a scale by giving the intervals relative to the previous degree. Can be combined with /FACTOR.
   /LINE
Input a scale by giving all pitches on one line at once. The number of notes does not have to be entered separately. Pitches are separated by spaces. But they can be separated by colons as well. In that case the values with decimal points are read as linear factors instead of cents values, for example: 4:5:6:7:8. Can be combined with /INTERVAL but not with /FACTOR.
   /NOTATION  [notation-system]  [scalenr.]
Input a scale by giving all note names on one line at once. The number of notes does not have to be entered separately. Names are separated by spaces or commas. The first name given will become scale degree 0, so one name more must be given than the scale size, like with INPUT/FACTOR. If no notation system parameter is given, the current notation system will be used, see SHOW NOTATION. A useful notation to use may be LT, see SET LT_PARS, so notes can be entered as numbers which are multiples of an ET step.
Octaves can be appended to the names with a period. For example, the major scale could be entered as: c d e f g a b c.1
And the minor scale as: a b c d e f g a.1


INSERT

INSERT  position  pitch
Insert a new pitch in the current scale at the given position. All pitches at a higher position shift up and the size of the scale increases by one. The position must be a number not higher than the number of notes in the scale plus one. If insertion is done at degree 0, the given pitch must be lower than 1/1 in order for the scale to remain monotonic. See also DELETE.
   /INTERVAL  position  interval
Split the interval in the current scale between the given and next position by inserting another interval. The position must be not higher than the number of notes in the scale. If the given interval is larger than the interval to the next degree, you can do SORT to restore the order.
   /INV_INTERVAL  position  interval
Insert the given interval downwards from the pitch at the given position.
   /FREQUENCY  position  frequency
Insert a new pitch by specifying the frequency relative to the base frequency (see SET FREQUENCY and SHOW/FREQUENCY).
   /NEAREST  pitch
Insert the given pitch in the current scale before the lowest pitch which is higher. If the given pitch is lower than 1/1, it is indeed inserted before scale degree 0.
   /LARGEST  interval
Split the largest interval(s) in the current scale by inserting the given interval. The scale may not be empty.
   /SPLIT  interval
Insert the given interval at all positions where it "fits", i.e. where the scale interval is larger than it. It will only be inserted once in each interval, so if large enough intervals remain, the command will have to be repeated.
   /INV_SPLIT  interval
Same as above, except that the interval is split the inverse way.
   /RANKING  rank
Insert the interval which is the rank number's (second, third, etc.) largest one step interval at all positions where it fits, as with /SPLIT. The parameter is one less, so 1 means second largest, 2 is third, etc. Repeating this command acts like Viggo Brun's algorithm, see EUCLID. If the given rank is too high, nothing will happen.
   /INV_RANKING  rank
Same as above, except that the intervals are split the inverse way.


INTERSECT

INTERSECT  scalenr.  [scalenr.]
Remove pitches that are not in the first scale from the second scale. The current scale is default for the second parameter. The first parameter may also be a filename. See also MERGE and DIFFERENCE.
   /ALL  [first-scalenr.]  [last-scalenr.]
Intersect all scales in the given scale range with the current scale. If no parameters are given then all working scales from 1 and higher will be used, but not the Undo scales. The last scale number is inclusive.


INVERT

INVERT  [position]  [position]  [scalenr.]
Reverse the order of the intervals in the current or given scale. If one position is given, reverse the order of the intervals between degree 0 and the given position. If two positions are given, reverse the intervals between the two given scale degrees. To view the effect of this command do SHOW/INTERVAL, or SET ATTRIBUTE INTERVAL and then SHOW. Warning: the last pitch is assumed to be the formal octave so it does not change with this operation. If the current scale does not have a formal octave (yet) -which may be the case if a CPS scale has been created- then it must first be added with APPEND or NORMALIZE.
To take the reciprocal of all pitches: do REVERSE after INVERT (with no parameters).
   /INTERVAL   position  [scalenr.]
Exchange intervals pairwise in the current or given scale. The interval at the given position remains the same. The interval at position-1 is exchanged with the interval at position+1, the one at position-2 with position+2, etc. Positions are modulo the scale size. If the scale is inversionally symmetric in the given interval position, then it remains the same, see also SHOW DATA. To view the effect of this command do SHOW/INTERVAL, or SET ATTRIBUTE INTERVAL and then SHOW.
   /ARITHMETIC  [scalenr.]
Inverts a scale arithmetically, i.e. preserving linear pitch distances instead of logarithmic ones. If P is the pitch and Oct the formal octave, then this pitch will be mapped to Oct + 1/1 - P. The arithmetic mean of a pitch with its arithmetic inverse is constant.
   /HARMONIC  [scalenr.]
Inverts a scale harmonically. If P is the pitch and Oct the formal octave, then this pitch will be mapped to 1 / (1/Oct + 1/1 - 1/P). The harmonic mean of a pitch with its harmonic inverse is constant.
   /MERGE  [scalenr.]
Add the formal octave inversions of the pitches in the current or given scale if not already present.


ITERATE

ITERATE  command  [file-mask]  [scalenr.]
Will load successively scale files with filenames that match the given file mask to a scale memory and execute the given command for each of them. So it visits each scale in a set defined by the file mask and does an operation on it. For each loaded file, the filename and description is shown. The default scale memory where each file is loaded into is number 0 (current scale). Any previous scale in the given scale memory will be lost. Files that are not scale files are silently ignored. If the command contains more than one word, it must be surrounded by double- quotes ("). Example: ITERATE "SHOW DATA" mean*.scl The command can be an external command, see help for @. ITERATE commands can be nested, but then double-quotes must be used. Another example: to compare the current scale against a set of scale files do: ITERATE "SHOW DIFFERENCE 1" *.scl 1. Qualifiers cannot be combined.
   /COMBINATION  command  [scalenr.]
Will apply the given command to all different combinations of pitches of the current or given scale. The pitch count of the combination is asked for separately. Of course it may not exceed the size of the scale. If the last pitch must be present in each combination, then use /MODE instead. The combinations will be consecutively put in the current scale, which will lose its previous contents, and then the command applied. The "parent" scale, if it is another one than number 0, will not be affected. Afterwards, the last combination will remain in the current scale. For quoting the command, see above.
   /KEY  command  [scalenr.]
Will apply the given command to all different keys of the current or given scale. The original key will be restored afterwards. For quoting the command, see above. See also % for using the iteration index.
   /MEMORY  command  [first-scalenr.]
Will copy each nonempty scale memory with the given scale number and higher to scale number 0 (current scale) and execute the given command for each of them. The default scale number is 1. The highest scale memories which are used for UNDO will not be visited.
   /MODE  command  [scalenr.]
Like /COMBINATION with the difference that the last pitch (formal octave) is always present. It is included in the pitch count of the combination which is asked for.
   /NOOUTPUT  command  [file-mask]  [scalenr.]
As ITERATE, but without showing the filename and scale description for each scale.
   /NOTATION  command  [first-notation]
The current notation system will be set to all systems and the command executed once for each. If the second parameter is given the first system will be that one. The order is the one given by SHOW NOTATION.
   /REPEAT  command  count
Will execute the given command a number of times. The second parameter is the number of times. If it is "n" then it equals the number of notes. See also % for using the iteration index.
   /SCALE  command  [scalenr.]  [last-position]
Will traverse the current or given scale and execute the given command for each degree in it. The degree will be copied to pitch memory 1, so that the command can reference it with $1. The original contents of pitch memory 1 will be lost. Instead of a scale number, a filename may also be given. See also % for using the iteration index %i, and ECHO for the function %i(). Without the last-position parameter, the last degree to be done is the highest scale degree, or formal octave. A lower or higher position may be used, and values like "n-1" or "n+2" can be given also. Note that you can also use this way to iterate over a predefined list of numbers. For example, you wish to show equal temperament data of all divisions between 200 and 300, then do as follows:
HARMONIC 200 300
MOVE 200
ITERATE/SCALE "EQUAL/DATA $1"


KEY

KEY  [steps-or-note-name]  [scalenr.]
Change the key (tonic) of the current or given scale to the given degree. This cycles the intervals downwards by the given number of positions. The value given will be taken modulo the scale size. Any integer value is allowed, also a negative one. The default value is 1. To transpose a scale by changing all frequencies without changing the interval pattern, use SET FREQUENCY. Instead of a scale degree, the first parameter may also be a note name in the current notation system, see SET NOTATION. If the base frequency needs to be changed to the frequency of the given scale degree as well, then before giving the KEY command, do SET FREQUENCY %1, for example if the number of steps is 1.
Warning: the last pitch is assumed to be the formal octave so it does not change with this operation. If the current scale does not have a formal octave (yet) -which may be the case if a CPS scale has been created- then it must first be added with APPEND or NORMALIZE. Alternatively without adding a formal octave, the command MOVE/KEY can be used to change the key of an octaveless scale.
   /ALL
Copy all keys of the current scale to scale memories 1 and further. The current scale itself remains the same. There is no parameter. Warning: all scale memories from 1 until the scale size minus one will be overwritten.
   /CENTRE  [ignore-prime]
If all pitches of the current scale are rational: change the key so that 1/1 is as close as possible to the centre of gravity of all points of its lattice. The default prime to be ignored is 2, but another prime can also be specified. If no prime should be ignored, give 1 or any other non-prime number as parameter. See also PIPEDUM.
If not all pitches are rational and the scale is a Pythagorean scale (formed by a generator): change the key so that 1/1 is in the middle of the cycle of generators, so that the number of generators upwards and downwards are in balance. See also LINEARTEMP.
   /EGALIZE  [scalenr.]
Change the key of the current or given scale so that is it as close as possible to an equal tempered scale. The sum of absolute differences between the pitches and a corresponding equal tempered pitch is minimised.
   /LEASTSQUARE  scalenr.
Change the key of the current scale to make it match that of the given scale as closely as possible as with /MATCH, but instead minimising the least squares difference.
   /MATCH  scalenr.
Change the key of the current scale to make it match that of the given scale as closely as possible. The scales don't need to have the same number of notes. The sum of absolute differences between the nearest degrees of the two scales is minimised. The given scale must be sorted in ascending order and have at least two notes.
Instead of a scale number, a filename may also be given. To see to which key the current scale has been changed, do COMPARE/MEMORY_ONLY which compares it to the first undo-memory (among others), which was the original scale.
   /NEAREST  pitch  [scalenr.]
Change the key to the pitch in the current or given scale with the smallest absolute difference from the given pitch. The scale may not be empty. Even if 1/1 is closest to the given pitch, the next degree will be taken.
   /MAPPING  signature  [notation-system]
Create a suitable keyboard mapping to the current scale for normal 12-tone music in a given key. The current keyboard mapping will be overwritten. The signature parameter must indicate the number of sharps in the score, so if it's in C it is 0, in G it's 1, etc. Flats must be indicated with a corresponding negative number. The allowed range is -7 .. 7. If the second parameter is omitted, the current notation system will be used, see SET NOTATION. Scale degrees will be mapped on the basis of their note names, so if for example the scale has different tones for F# and Gb, the algorithm will pick the appropriate one. If no scale degree matches a particular note name, then the nearest one to the nominal value for the note name will be taken. For notation systems whose name begins with an E, the nominal value is the equal tempered value of the corresponding ET. Afterwards, do SHOW MAPPING to see the result. The mapping's reference frequency, middle key, etc. will not be changed. See also Mappings.
   /RANDOM  [scalenr.]
Change the key of the current or given scale to a random degree with uniform probability.
   /ROOT  [scalenr.]
Change the key so that the highest sum of numerator and denominator of the rational pitches in the scale is minimised (minimax). This gives the most compact diamond lattice representation, see LATTICE/DIAMOND. Nonrational pitches will be ignored. Any scales of the Partch diamond or rectangular type will so be put in their "root" transposition, i.e. simplest form.


LATTICE

LATTICE  horizontal-factor  vertical-factor  [depth-prime]
Show the lattice (Carthesian model) of a rational scale. All rational pitches in the scale must be a combination of the two given factors for the primes they contain. The optional third parameter must be a prime not being in one of the other two factors. It controls the third dimension which is layed out horizontally, unless the diagram would become too wide in which case the planes are above one another. If there are non-rational pitches (i.e. floating point pitches) in the scale, then the message Not all pitches mapped will be given. If the error message No such lattice is given then it means that neither factors given are present in the scale, or that no one- or two-dimensional lattice can be created for the scale with the given factors. So one or more two-dimensional projections will be shown and the ignored primes will be listed. If only a one-dimensional projection is wanted, then a factor of 1/1 can be given. The total number of different primes in the scale must not be more than 12.
The origin (1/1) is indicated with a '0', one pitch with a '*' and if more than one pitch projects on the same place, a 'x' is drawn. If more than one pitch projects on the origin, it is indicated with a 'O'. With a third parameter, the origin in other planes is marked with a dot, unless there's a pitch there in which case it will be a '*'.
Example: LATTICE 3 5 will show fifth-relations horizontally and third-relations vertically, ignoring octaves.
   /DIAMOND
There are no parameters. It shows for the current scale a diagram like a Partch diamond. Horizontally the odd numerators are shown and vertically the odd denominators. Octave relations do not play a role. The positions indicating 1/1 are marked with a '0', a pitch with a '*' and with a '.' the positions that have a common factor in numerator and denominator and which are present in the scale. Numbers above 99 are not shown, and only as many that fit on the screen horizontally. A Partch diamond is usually drawn turned 45 degrees clockwise. Can only be combined with /NOTATION.
   /LOAD  horizontal-factor  vertical-factor  filename
Create a scale using a rectangular lattice that is drawn in a text file. The format of the lattice is the same as shown by LATTICE, but can have only two dimensions. This means a lattice picture can be saved using the commands FILE and CLOSE and then be changed with a text editor, or created with a text editor. Each line counts for one vertical factor and two horizontal positions for one horizontal factor. The *'s must be separated by one space on a line. A mandatory '0'-character indicates the origin (1/1). An empty last line is recommended. With this qualifier it is easy to create a multilinear temperament for instance like:
       * * * * *
 * * * 0 * * *
The factors can be rational or floating point pitches. Afterwards the scale can be reduced by an octave, sorted and have an octave appended with NORMALIZE. Cannot be combined with other qualifiers. See also PROJECT.
   /NOTATION
Instead of the asterisks, show the note names of the pitches. The shortest name is taken for the current notation system (if there are enharmonic equivalents). If the equivalents have the same length, then names which are closer to C in the cycle of fifths have priority, so Eb comes before D# for example. The current notation system is set with the command SET NOTATION. The nearest scale degree of an ET can also be shown, by using notation system LT, and do SET LT_PARS 1 <division>. Another useful notation here is JI.
If there is no note name for a pitch, a '*' is drawn, and if more than one pitch projects on the same place, a 'x' is drawn. Treated as a special case is when the notation tolerance set with SET TOLERANCE to 0, then the scale degree numbers are shown instead of note names.
Cannot be combined with /LOAD.
   /TRIANGULAR  horizontal-factor  vertical-factor  [depth-prime]
As without qualifiers, but show the lattice (Carthesian model) in a slanted way. The vertical factor will be shifted to the right going upwards. So if the horizontal factor is 3 and the vertical factor 5, then major triads are shown as triangles like this:
  * 
 0 *
And minor triads are down pointing triangles. If there is not enough space with three factors for a horizontal arrangement of the layers, then try without this qualifier. Can only be combined with /NOTATION.


LIMIT

LIMIT  [number]
Change rational pitches that have a prime limit higher than the prime number given into floating point pitches. If the number is 1 then all rational pitches in the current scale will be made floating point numbers. If the given number is not prime, the first lower prime is taken. If no parameter is given, the value set with SET LIMIT is taken. To actually change pitches to those of a lower limit, use APPROXIMATE. See also PROJECT.
   /DELETE  [number]
Remove the pitches from the current scale which have a prime limit higher than the number given. See also DELETE/UNDER.
   /EQUAL  [number]
Change rational pitches into floating point pitches which contain the given number. It can be a prime or non-prime. Can only be combined with /DELETE. See also DELETE/FACTOR.
   /ODD  number
Change rational pitches into floating point pitches that have an odd number limit higher than the number given. If the given number is not odd, the number one less is taken. Can only be combined with /DELETE. See also DELETE/ODD_UNDER.
   /MAX_ATTRIB  number
Delete pitches from the current scale which have an attribute value higher than the given number. The attribute is set with SET ATTRIBUTE. From attribute values which can also be negative, the absolute value will be taken for the comparison. Only attributes which give a numerical value are allowed, so attributes like PRIMES, SEP_PRIMES and VECTOR are not allowed and give the message "Invalid attribute for operation". INTERVAL and OTHER_SCALE are also not allowed. The numeric value of TWELVE is the deviation from 12-tET in cents.
Because many attributes can be chosen, and attribute EXPRESSION can represent a user-definable function, this is a powerful operation to select features from a set of pitches. For example, first create a lot of pitches with the EULERFOKKER or RECTANGLE command, and select the most consonant ones with an attribute like MANN, TENNEY, VOGEL, etc.
Cannot be combined with other qualifiers. See also SORT/ATTRIBUTE.
   /MIN_ATTRIB  number
Like above, but pitches with an attribute value lower than the given number will be deleted.
   /ATTRIBUTE  number
Like above, but pitches with an attribute value unequal to the given number will be deleted.


LINEARTEMP

LINEARTEMP  [scalenr.]
Create a Pythagorean scale or linear temperament in the current or given scale memory. A linear temperament is a cycle or chain of one particular interval, called the generator or formal fifth. Whenever by doing so a pitch originates that is outside the range of one formal octave (interval of equivalence), it is "wrapped" back inside by subtracting the formal octave value. Examples of this kind of scale are the Pythagorean scale generated by a pure fifth, and regular meantone scales.
The program asks first the scale size and then the formal octave. By default it is 2/1, and may also be given as an expression, for example 2\7 is the 7th root of 2/1. Next the position of the formal fifth (generator) in the scale must be given. If instead 0 is entered, the order of pitches is determined by their size (monotonically ascending). This is also default when just the enter key is pressed. Otherwise the range is indicated where the formal fifth must be in, for the resulting scale to be monotonic. Then the formal fifth is entered. The default value for this is pitch memory 0 and it may also be entered as an expression. Subsequently the count downwards, i.e. the number of generators that are stacked in the downward direction is entered which is by default 0. This gives a scale in another key. Defining it here can prevent pitches from becoming a floating point value if ratios overflow.
Example: to create a normal 1/4-comma meantone scale, enter: 12, 2, 0, 696.578, 3. Usually the fifth needs to be calculated first with CALCULATE or :=, for example take 3/2-$k^1/4 for the quarter-comma fifth. Then take the default $0 for the fifth.
To extend temperaments with periods smaller than an octave, one can do EXTEND/ABSOLUTE 2.
Scales which are created by this command are also called linear or regular temperaments. To create specific temperaments, use /TEMPERAMENT. A simple alternative is offered by the command files comma.cmd and comma3.cmd. In older versions of Scala this command was called PYTHAGOREAN.
   /GIVENBEATS
Like above, but the actual fifths are varied so that they exhibit a constant beat rate, except for the "wolf" fifth at the end of the cycle. The formal fifth must be a rational value. The beat rate to be entered is given in Hertz and relative to the base frequency set with SET FREQUENCY. If it is positive, then the actual fifths will be larger than the formal fifth; for a negative beat frequency they will be smaller. See also SHOW BEATS.
   /EQUALBEATS
Like above, but there is no "wolf" fifth that is different. Instead, the beat rate is calculated to be equal for all fifths. The formal fifth to be approximated must be a rational value. The number of notes must not be less than two. If the fifth is not a proper generator for a full cycle of the given number of notes then the resulting scale may not be correct (for example 5/4 and 12). This doesn't mean that an equal beating scale cannot be generated, but that it must be assembled from more than one cycle, or that the number of tones and the octave must be chosen differently. The algorithm may also fail if the average formal fifth is too remote from the just value, in which case wrapping around the octave occurs at wrong places.
If the octave is a rational value, then the pitches are the solution to a set of linear equations with integer coefficients and therefore rational. To try to retrieve the rational values, one can use the command FAREY with a high order, but often the exact numerators will be too high.
It's also possible to calculate a partial cycle. Then the size given must be the number of fifths to be calculated. The formal octave and fifth should be the same as otherwise, and the last pitch given is the pitch at the end of the cycle (octave reduced). Note that the actual scale size will then be one higher, since the formal octave will still be appended. For example to make four equal beating fifths leading to a just major third, enter the following: 4, 2/1, 3/2, 5/4.
See also SHOW BEATS. Tip: for a different distribution of beat rates, use KEY or KEY/EGALIZE afterwards.
   /TEMPERAMENT
Create a temperament in the current or given scale memory. For each formal fifth, a deviation can be given in terms of a fraction of a given comma. For non 12-tone temperaments, first set the notation system, initially it's E12. It is used for the names whilst querying the temperings. The default comma is the Pythagorean comma, but any other comma or interval can be entered. Comma parts can be entered as a ratio or linear value. A positive value means that the formal fifth will be diminished by that fraction of the comma, so if the given comma is $k and the part is 1/4, then the fifth will be tempered by a quarter syntonic comma. A zero value leaves the fifth just. Negative parts will augment it. So going around the circle of fifths, the parts must be entered. Also a remainder can be indicated by entering an 'x', then that part will be calculated in closing the circle of fifths, for example for the G#-Eb fifth. More than one remainder can be entered as 'x', so that each remainder will be tempered by the same amount. If no remainder is entered, then it will be assumed that the comma parts add up to close the circle of fifths. But it is not checked and the last comma part simply ignored. For example to get a Vallotti temperament, enter the following parts of a Pythagorean comma: 1/6, 1/6, 1/6, 1/6, 1/6, 0, 0, 0, 0, 0, 0, 1/6.
If you want to enter the temperings in cents, then specify a comma of one cent. To check the result, use SHOW CYCLE.
   /TWO_SIZE
This produces a scale generated by the given fifth, but the chain of fifths can be shorter than the size of the scale. The size of the remaining fifths will be made equal, so the comma, whether positive or negative, is spread out over more than one "wolf" interval. So if the given fifth is "a", and the wolf fifth "b", then the circular pattern of fifth sizes will be like
     a   a
   a       a
    b     b
       b
for seven tones. Not only the count of fifths downwards, but also the count upwards must be given. Their sum will be the number of fifths of the given size. To check the result, use SHOW CYCLE. Some "modified meantone" tunings are defined this way, to avoid having one very bad wolf.
   /VARIED
Create a Pythagorean scale with regularly varied fifths. It works like above except that an initial fifth size is asked and then an accumulating variation which is added to each subsequent fifth. For instance suppose the initial value is 698.0 cents and the variation 1.0 cent, then the fifths will be 698, 699, 700, 701, etc. cents. For the fifths in the downward direction the variation is in the opposite direction, so the variation is not monotonic over the cycle of fifths.
   /WELLFORMED
Instead of creating a scale with the given size, it will create one with at least so many tones. Depending on the formal fifth and octave, it will be the minimal size which either has Myhill's property or is equal tempered. Use SHOW DATA to verify this.


LOAD

LOAD  filename  [scalenr.]
Read a scale from a scale file on disk and store it to the given scale number. The default scale is 0 (current scale). If the given filename has no extension, the extension '.scl' will be assumed. If a wildcard is given in the filename then the first scale that matches the name will be loaded and the actual name shown. This works only for scale files. See also IMPORT. If you always want the filename to be shown then add this key to scala.ini: Load_Show_Name 1. To load the last loaded scale again, do LOAD %scl. See also DIRECTORY.
   /ALL  file-mask  [first-scalenr.]  [scale-size]
Interpret the given filename as a file mask and load all the scales that match into available scale memories. If a scale number is given as second parameter then this scale will be the first where a scale is stored, next scales go in subsequent higher memories, default is 0. A list file can also be used, for example if the list filename is dir.lst then do LOAD/ALL @dir . Instead of a file mask, the name of a zip file can also be given. Then all files in the archive with a '.scl' extension will be loaded into the scale memories.
If a scale size is given, then only scales with this size will be loaded. The number of available scale memories is set by Scale_Count in file scala.ini. Can be combined with /CHORD and /NOUTPUT.
   /UNFORMATTED  filename  [first-scalenr.]  [scale-size]
Reads a text file with all pitches for a scale on one line. The values are considered to be linear factors. The first number will represent degree 0 and the other factors are relative to that. The number of notes will therefore be one less than the number of factors. If the text file has more than one line then next scales go in subsequent higher memories. If a scale number is given as second parameter then this scale will be the first where a scale is stored, default is 0. If a scale size is given, then only scales with this size will be loaded.
   /CENTS filename  [scalenr.]
Reads a text file with pitches in cents on separate lines. The first number will represent degree 1. Lines with no readable number will be skipped. All text on a line will be ignored, except the first readable number. A vertical comma separated values (CSV) file can also be read.
This function can be used to write command files for importing scale files from other programs. See also IMPORT.
   /CHORD  name-pattern
Copy the first chord that matches the given name pattern to the first non-empty scale memory. To explore the available chords, use the command CHORDS/ALL_SHOW.
If combined with the qualifier /ALL, then all chords that match the given name pattern will be copied to subsequent scale memories, to begin with the first non-empty one, so possibly overwriting higher scale memories that are not empty. Therefore repeated use of this command will add chords to the memories without overwriting previous ones.
   /MAPPING  filename
Read a keyboard mapping from a map file on disk. If the given filename has no extension, the extension '.kbm' will be assumed. If a wildcard is given in the filename then the first file that matches will be loaded and the actual name shown. Keyboard mappings can be created by using an external text editor, see Mappings, SHOW MAPPING and CLEAR/MAP. See also DIRECTORY/MAP and KEY/MAPPING.
   /NOOUTPUT
Do not show the description or filename, only error messages if there are any. This makes loading many scales with /ALL much faster. Can only be combined with /ALL.
   /PITCH  filename  [first-pitchnr.]
Read one or more pitch values from a text file on disk and store them to the given pitch memory and beyond. The default pitch memory is 0. Pitch memories are used to store single pitch values and hold intermediate results of pitch calculations, not in the context of a scale.
Each line in the file should contain one value. Values with a period are interpreted as cents, other values as a linear ratio. Lines with something else are ignored. The number of pitch memories is set by Pitches_Count in file scala.ini.


MERGE

MERGE  scalenr.  [scalenr.]
Merge the first scale into the second scale. All duplicate pitches will be removed. In set-terms: take the union of the first and second scale. The resulting scale (given by the second parameter) will be in ascending order. With no second parameter, it is the current scale. The first parameter may also be a filename. See also DIFFERENCE and INTERSECT.
   /ALL  [first-scalenr.]  [last-scalenr.]
Merge all scales in the given scale range with the current scale. If no parameters are given then all working scales from 1 and higher will be merged, but not the Undo scales. The last scale number is inclusive.


MODE

MODE  name-pattern-or-mode
Selects a mode (subset) from the current scale. If the parameter is a name pattern, the mode is searched from the mode list in file modenam.par, which must be present in order for the command to work. The first occurrence of a match with the given name pattern is taken, unless the number of notes doesn't match with the scale size in which case the search continues. If there are more matches after the first one taken, the user is warned about this. The following special characters are recognised:
* : matches zero or more of any character.
? : matches exactly one of any character.
A whole word of the name must be matched in order for it to be found. To match part of a word, the pattern may begin and end with a * character.
If the parameter is a literal mode, it must have the same number format as in file modenam.par. That is, a sequence of integer numbers separated by spaces possibly preceded by a starting note enclosed in square brackets. Degree 0 or the formal octave can only be omitted if a starting note in square brackets is given. Instead of this command, SELECT can also be used. Note that pitches will be deleted from the current scale. The scale and mode size must be equal. If the scale size is larger, pitches must be deleted by hand first, or the command SAMPLE may be used.
Example: MODE M.Dorian (after loading or creating a 12-note scale.)
The word "mode" is sometimes used the key or transposition of a scale. To change this, use the KEY command.

This is a link to the list of presupplied modes.

   /COMPLEMENT
As above but selects the complementary mode from the current scale.
   /CREATE
Create a scale with the given mode. The pattern is matched as above. For each number of steps that is in the given mode, a corresponding interval must be given, as a ratio or in cents. If the scale doesn't come out with the right octave, then do MULTIPLY/ABSOLUTE afterwards to stretch or shrink it.
You can do FIT/MODE afterwards to check which equal temperament the resulting scale is a subset of.
   /EQUAL
Create an octave-based subset of an equal temperament with the given mode. The division of the equal temperament is equal to the sum of the interval steps in the mode. You can do FIT/MODE afterwards to check which equal division the resulting scale is a subset of. Also both a name and a mode pattern in numbers may be given.
   /FACTOR
Create a scale with the given mode. For each number of steps that is in the given mode, a corresponding factor must be given. These factors are relative and may be given as a ratio or floating point value. To obtain the same mode equal tempered, the same number as the number of steps can be given. Then the octave is asked for. You can do FIT/MODE afterwards to check which equal temperament the resulting scale is a subset of.
   /SEQUENCE  size  factor  [add-constant]
Create an octave-based subset of an equal temperament by a mode specified as a spectrum sequence: floor(n * factor + add-constant), n = 1 .. size.
The first parameter is the number of tones. The second and third parameter determine the pattern of steps and may be given as floating point value or ratio. Floor truncates to the nearest integer not exceeding the number. The default value for the additional constant is 0. This function produces scales which are often distributional even. It does not take a subset of the current scale. These sequences are also called Christoffel words.
Example: MODE/SEQUENCE 7 7/4 1/2 will generate the major mode in 12-tET. If you want another formal octave, then do MULTIPLY/ABSOLUTE afterwards to stretch or shrink the scale. See also SAMPLE/SEQUENCE.
   /SHOW
Show the given mode. Only the first occurrence of a match is shown. To show all modes that match the pattern, use /ALL_SHOW instead. Note that a mode or a name-pattern may be given. If a mode is given for which there is no name, then only the same mode is displayed. The current scale remains unaffected. See also FIT/MODE.
   /ALL_SHOW  [name-pattern-or-number]  [size]
Show all modes from the file if no parameter is given. If a name pattern is given, show all modes having a name that matches the pattern. In this case there is only one parameter, the pattern, which may contain spaces. If a number is given, show all modes with the sum of their step count equal to that number, for example to show all 19 tone modes do MODE/ALL 19. This can be restricted further to only give modes with a given number of notes. To show all modes with a certain number of notes, make the first parameter 0, for example to show all modes with 10 notes do MODE/ALL 0 10.
   /FIND  name-or-number  [size]
Performs a fuzzy string comparison with the given name and shows all modes having approximately that name. Wildcards are not permitted. A full name must be given. To match a partial name, use /ALL_SHOW with wildcards. Lower case letters h are ignored. This function may be used for example to find Indian raga names which have different northern and southern spellings. If a number or size is given, it works the same as with /ALL_SHOW.


MODULATE

MODULATE
Make a scale containing the frequencies of the spectrum of (a) modulated sine wave(s). In general, the spectra resulting from amplitude or frequency modulation are inharmonic.
The command works by adding sidebands for each pitch in the current scale, except degree 0. First the modulation frequency factor will be asked. This must be a positive floating point or rational value, usually smaller than 1. The modulation frequency that this factor represents is the factor multiplied by the base frequency set with SET FREQUENCY, in other words it is relative to the 1/1. Then the number of sidebands is asked. The number below and above the scale frequency are set separately. Let f be the frequency of a scale degree and fm the modulation frequency. If the number of sidebands below is 2 for example, then f - 2 fm and f - fm are added, and if the number above is 1, then f + fm is also added to the scale. Negative frequencies are turned into a positive value.
So if the current scale contains only one pitch then the resulting scale will contain the spectral frequencies of a sine wave frequency modulated by another sine wave. Note that the process may be repeated which corresponds to modulating a modulated wave. See also HARMONIC.
   /GENERATOR  position  [steps]
Make a different distribution of the scale intervals by doing an exchange of two intervals in the cycle of a given generating interval. One of them is the interval that has the most extreme size and which is unique in the cycle. This may either be the smallest or the largest, whichever one is unique or has the highest difference from the average interval of the cycle. If there is no such interval then you will be notified. To see if there is one beforehand, use SHOW INTERVALS.
The first parameter is the interval class of the generator. It must be a positive scale degree that has no common factor with the scale size. The second parameter is the number of steps away from the position of the most extreme interval in the cycle. It may be any integer number, and is taken modulo the scale size. The default value is 1.
For example, the scale is 1/1 6/5 4/3 8/5 16/9 2/1. Take degree 2 as generator (fourth 4/3), the successive fourths are 4/3 4/3 27/20 4/3 5/4. The most extreme interval is 5/4. Take 1 for parameter steps, which changes the series of fourths into 5/4 4/3 27/20 4/3 4/3. This makes the scale 1/1 9/8 5/4 3/2 5/3 2/1. If you keep repeating this command with the same parameters then the number of different scales this generates can be quite large. See also PERMUTE/GENERATOR.
   /INTERVAL
This changes intervals of the current scale according to the sine function. Values of the sine function are added in cents to the intervals. The parameters are given interactively. The order in which degrees are mapped to the angle parameter is determined by the generator. This must be a positive number which has no common factors with the size of the scale. For example, if the size is 12 and the generator 7, then the order of the degrees is that from the circle of fifths. The next parameter is the count downwards for the generator. It has the same function as with the command LINEARTEMP. Default value is 0. Then the interval class must be given. This determines which interval's size will be modulated. The default value is the same as the generator. Another value may be given, but it may also not have a factor in common with the scale size. Then the amplitude is asked, it may be a ratio or a cents value. Subsequently the relative frequency must be given. This is the angular frequency for the sine function. If the default value one is given, then there is one revolution for the number of notes in the scale. Two will give two revolutions, but any positive ratio or fraction may be given. If it is an integer number then the earlier given count downwards doesn't matter. Then the phase offset must be given. This will be the phase for the interval on degree 0. It must be given in degrees. So if 90.0 is given, then the maximum value is added to the interval at degree 0, or if -90.0 is given then the maximum value will be subtracted from that interval.


MORPH

MORPH  scalenr.  factor
Move the pitches of the current scale towards or away from pitches of another scale. If the factor parameter is zero, the scale will remain unchanged. A factor of 1.0 will make it equal to the given scale. Any other factor will replace each pitch with a logarithmically weighted average of the current value and the value in the same degree of the given scale. The new pitch will be 2^((1-factor)*log P1 + factor*log P2). The scales don't have to have the same size; octave equivalence is assumed.
The given scale may also be a filename and the factor may be given as a floating point value or a ratio. A factor of 1/2 will give the geometric mean. Factors lower than 0 or greater than 1 are also permitted. The factor can also be taken from a pitch memory, see help of $. See also DOUBLE.
   /ABSOLUTE  scalenr.  position  pitch
Instead of giving a factor, enter a desired pitch for a given position in the current scale. The operation will be the same and the factor will be implicitly calculated from the difference of pitches at the given position in the two scales. These two pitches may not be the same, otherwise the factor would be infinite. The given position may lie outside the scale's range since octave equivalence is assumed. It may not be degree zero.
   /ARITHMETIC
Combine the pitches not logarithmic but linear, thereby taking an arithmetic average. The new pitch will be (1-factor)*P1 + factor*P2. Can only be combined with /ABSOLUTE.
   /GEOMETRIC
This is the default qualifier. Takes the logarithmic mean as described above. Can only be combined with /ABSOLUTE.
   /SUBC_HARMONIC
Takes a weighted subcontrary to harmonic mean. Can only be combined with /ABSOLUTE.
   /RMS
Takes a weighted root mean square. Can only be combined with /ABSOLUTE.
   /RHSM
Takes a weighted root harmonic square mean. Can only be combined with /ABSOLUTE.


MOS

MOS
Generates a Moment Of Symmetry from the current scale. The program asks first the generating interval, which must be a scale degree number and have no common factor with the scale size. Then the series index is asked which must be a natural number and indicates which scale in the MOS series is desired. The default is the last and longest one. You can do MOS/SHOW or MOS/ALL_SHOW first to see the modes, and decide which index of the series you want.
Note that this command deletes pitches from the current scale. It can also be applied twice to make an interesting category of scales. MOS and Myhill's property are equivalent. Another way to create a scale with this property is with LINEARTEMP. See also FIT/MODE.
   /CREATE
Create a Moment Of Symmetry scale by giving two intervals. The program asks first the scale size and then the generator, which must be a scale degree number and have no common factor with the scale size. Then the first interval is asked which will be the first pitch in the scale and subsequently the second generating interval. Afterwards you can stretch or shrink the scale to give it another formal octave with the command MULTIPLY/ABSOLUTE. See also MODE/CREATE.
   /SHOW  parent-size  generator
Show successive members of a MOS series. The first parameter is the number of notes the MOS is taken from and the second the generating scale degree. On each pair of lines, the scale degrees are shown first with the number of large and small intervals. On the second line the numbers are interval sizes in number of steps. The number of notes of the resulting scale is shown between parentheses. Note that any transposition of the shown ones is also a MOS. The current scale is not affected.
   /ALL_SHOW  parent-size  [size]
As above but show MOS series for all possible generators. If the second parameter is given, only show the MOS with the same number of tones, for all possible generators. The current scale is not affected.


MOVE

MOVE  interval  [position]
Increase the pitches of the current scale with the given interval. The position is the first degree to be altered, lower degree will be unchanged. The default is 1 (all pitches). It must be greater than or equal to 0. If it is 0, then a new 1/1 note will be inserted.
   /ABSOLUTE  pitch  [position]
Increase the pitches of the current scale such that the formal octave will become the given pitch value. If the second parameter is specified, only that and higher degrees will be altered.
   /KEY  position-or-note-name
Decrease all pitches of the current scale with the pitch at the given position. The resulting 1/1 of that and possibly other degrees will be removed from the scale. The degree parameter may be any integer value. It may also be a note name in the current notation system, see SET NOTATION. Cannot be combined with other qualifiers.
   /LENGTH  part  [first-position]
Increase all reciprocal pitches (cf. string lengths) with the given part, including degree 0 by default, unless the given position is otherwise. The part may be a rational or floating point number and be positive and negative but not less than -1.0. It is considered relative to the 1/1 of degree 0. The effect of this operation is that of moving the bridge on a string instrument.
Can only be combined with /ABSOLUTE. If combined with /ABSOLUTE, the second parameter is the degree for which the first parameter, the pitch, is specified. The default is the last pitch, the formal octave.
   /FREQUENCY  part  [first-position]
Increase all pitches with the given linear term including degree 0 by default, unless the given position is otherwise. This is done by addition. The parameter may be a rational or floating point number and be positive and negative but not less than -1.0. It is considered relative to the 1/1 of degree 0. The result is that intervals become smaller when their frequencies are increased with the same value. For example if the scale is 1/1 2/1 and 1 is added then it becomes 2/1 3/1 which is 1/1 3/2 because degree 0 is always 1/1.
Can only be combined with /ABSOLUTE. If combined with /ABSOLUTE, the second parameter is the degree for which the first parameter, the pitch, is specified. The default is the last pitch, the formal octave.


MULTIPLY

MULTIPLY  factor
Change all pitches of the current scale logarithmically by the given factor. The values in cents are multiplied with the factor which may be given as a fraction, a floating point value, or a pitch memory. For example, if the scale in cents is 0-100-300-500, then a multiply with 11/10 makes it 0-110-330-550. Rational values will therefore turn into floating point values if the factor is non-integer. See also EXPONENTIATE and STRETCH.
To increase pitches with a fixed interval, use MOVE.
   /ABSOLUTE  pitch
Change all pitches of the current scale by a factor that is such that the formal octave will become the given pitch value.
   /MATCH  scalenr.
Change all pitches of the current scale by a factor that is such that the least-squares difference with the nearest pitches in another scale is minimal. The given scale may have a different size than the current scale. Instead of a scale number, a filename may also be given. See also PROJECT/MATCH.


NORMALIZE

NORMALIZE  [octave]  [scalenr.]
Reduce all pitches of the current or given scale with the given octave, sort and take unique values, and append the octave if it's absent. This command is a shortcut for the combination of commands that do the above operations. The default is 2/1. It is useful for doing after CPS, HARMONIC, LATTICE/LOAD, PIPEDUM, etc. See also REDUCE.


PAUSE

PAUSE  [duration]
When no duration is given, prompts for the enter key to be pressed. Otherwise, waits the given number of seconds. This is useful for in external command files. The current pause setting must be ON, if it's OFF then nothing will happen. See also SET PAUSE.


PERMUTE

PERMUTE  [count]
Take the next permutation of the scale intervals for count equals 1 which is default. For -1 the previous permutation is taken, larger values give further permutations. The permutation order is the lexicographic one. If the count is too high or low, the message "no more permutations" will be given and the scale be left unchanged. Qualifiers cannot be combined.
   /ATTRIBUTE
Take a permutation of the scale intervals such that the sum of the attribute values of the pitches for the current attribute is minimized. There is no parameter. Only attributes which give a numerical value are allowed, so attributes like PRIMES, SEP_PRIMES and VECTOR are not allowed. INTERVAL and OTHER_SCALE are also not allowed. If there are many different intervals, this operation will take a long time.
   /EGALIZE
Take a permutation of the scale intervals such that the scale has the minimum deviation from equal tempered with the first pitch unchanged. There is no parameter. By doing repeatedly KEY and PERMUTE/EGALIZE one may find a permutation with a slightly less deviation.
   /GENERATOR  position  [count]
Take a permutation of the scale intervals by doing a rotation of a cycle of a given generating interval. The first parameter is the interval class of the generator. It must be a positive scale degree that has no common factor with the scale size. The second parameter is the cycle count for the rotation, which may be any integer number, and is taken modulo the scale size. The default value is 1.
For example, the scale is 1/1 6/5 4/3 8/5 16/9 2/1. Take degree 2 as generator (fourth 4/3), the successive fourths are 4/3 4/3 27/20 4/3 5/4. Take 1 for parameter count, which changes the series of fourths into 4/3 27/20 4/3 5/4 4/3. This makes the scale 1/1 6/5 4/3 3/2 9/5 2/1. So the original intervals 6/5 10/9 6/5 10/9 9/8 are permuted to 6/5 10/9 9/8 6/5 10/9. See also MODULATE/GENERATOR.
   /MATCH  scalenr.
Take a permutation of the scale intervals in such a way that the least-squares difference with the nearest pitches in another scale is minimal. The given scale may have a different size than the current scale. For scales with many different interval sizes it may take a lot of computing time. Instead of a scale number, a filename may also be given. See also BISTEP/PERMUTATION.
   /RANDOM
Take a random permutation of the scale intervals. There is no parameter. Each permutation has the same probability. See also SEED.


PIPEDUM

PIPEDUM  [scalenr.]
Create a scale with the lattice having the shape of the inside of a parallelepiped (Fokker periodicity block). A number of rational defining intervals must be given, whose prime number components represent the homophonic vectors (also called unison vectors) that span up the parallelepiped. The number of different primes in the defining intervals must be equal to the given number of intervals, or one prime more that can be ignored (default is 2/1, to have octave equivalence. If this is the case, one would do NORMALIZE 2/1 afterwards). Defining intervals are the intervals considered to vanish in the scale, usually commas or other small intervals. For instance when the syntonic comma (81/80 = 34.5-1) is given, the homophonic vector is (4, -1) with octave equivalence, namely four fifths up and a major third down.
The defining intervals must also be independent, i.e. their vectors must span up a space with dimension equal to their number, or an interval cannot be a linear combination with integer amounts of other intervals. The number of notes that will be in the scale is equal to the absolute value of the determinant that is formed by the homophonic vectors. For example: Type pipedum enter, 2 enter, 2048/2025 enter, 34171875/33554432 enter, 2/1 enter and the scale will be 1/45 1/3 5/1 15/1 75/1 225/1 1125/1 3375/1 50625/1. The vectors are (-4, -2) and (7, 6) resp., so it has 10 pitches which is the value of determinant
| 7 6 |
| -4 -2 |
The resulting scale can be treated with NORMALIZE afterwards, or INVERT, and a (formal) octave appended. To move the tonic more to the middle of the lattice, use KEY/CENTRE or MOVE. Last but not least, it is possible to optimise the scale with APPROXIMATE/MOULD. When this is intended, use the /SCALE qualifier below to reuse the list of defining intervals. See also EQUALTEMP/VANISH.
   /SCALE  [scalenr.]
Does not ask for the defining intervals, but gets them from the current or given scale. Only asks if there is a prime number to be ignored. The resulting scale will be put in the current scale. Can be combined with /TETRA and /VERTICES.
   /TETRA
Does not get a whole parallelepiped but instead only the notes that represent the lattice points inside the tetrahedron (or triangle, etc.) with the origin 1/1 as a vertex. Cannot be combined with /VERTICES.
   /VERTICES
Also include the other parallelepiped's vertices in the scale, besides 1/1. This gives a choice of equivalent pitches for degree 0. Cannot be combined with /TETRA.


PLAY

PLAY  filename
On Windows and OSX, start playing a MIDI file to the preferred MIDI Music Playback device. If a file is already playing, it will be stopped first. The default file extension is '.mid'. The trackname of the first track of the file, if present, will be shown.
In Windows the preferred device can be changed in the Control Panel under Sounds and Multimedia Properties:Audio. It's not the same as the output device in the Sound Settings dialog in Scala 2.x. You usually cannot use the same device at the same time to play in other Scala dialogs.
On Linux, this command is not implemented. Use "@play" instead.
   /STOP
Stop playing if a MIDI file is playing, otherwise do nothing. The Stop button in the main window of Scala 2.x can also be used.


POLYCHORD

POLYCHORD  [scalenr.]
Create a polychordal scale in the default or given scale memory. This is the general term for tritriadic, tetratriadic, tritetradic, etc. scales. First it asks the chord which is to be chained. The intervals in the chord are to be separated by spaces or by colons. In the latter case the values with decimal points are read as linear factors instead of cents values, for example: 4:5:6:7. Then enter the formal octave, like 2/1, default is no octave wrapping. Next the multiplicity, which is the number of times the chord occurs in the scale. The last parameter is the number of times the chord is to be chained downwards from 1/1. This of course cannot be greater than the multiplicity. If you want disjunct chaining of a chord, append an extra interval to it, or use the PRODUCT command.
   /SCALE   scalenr.  [scalenr.]
Instead of entering a chord, give a scale number or filename and the scale will be used for the chord.


POLYNOMIAL

POLYNOMIAL  [scalenr.]
Create a scale where the pitches are defined by a polynomial of some order. First the size of the scale is asked. Then the order (highest power in a term) of the polynomial is asked, followed by the coefficients of the terms from high to low order. The coefficients may be entered as a fraction or floating point value. A term in the polynomial is the coefficient times the scale degree to some power. Coefficient number 0 is the constant term. For instance a harmonic scale will result if one takes order 1 and coefficient number 1 equal to 1.0. After the coefficients, an operand offset can be given. The default value is 0 which means that the operand for degree 1 is 1, etc. An offset of 5 for example will cause the operand for degree 1 to be 6. When the polynomial evaluates to a negative number, the result is discarded and the operand incremented by one until there is a nonnegative result. If the created scale contains pitches below 1/1, they can be deleted with DELETE/SMALLER. Afterwards, REDUCE or NORMALIZE may be done to bring the pitches within a smaller range.
   /LOGARITHMIC
Same as the above except that the polynomial is not evaluated as being linear, but logarithmical with base 2. For instance an equal tempered scale will result if one takes order 1 and coefficient number 0 equal to 0. For 12-tET, coefficient 1 equals 1/12.
   /POWER
Enables entry of all the powers in the terms. Strictly speaking the expression is not a polynomial anymore, because in a polynomial the powers are non-negative integers. The powers may be entered as a fraction or floating point value. Coefficient number 0 is the constant term. First the number of power terms must be entered, that is the number of terms without the constant term. Use this qualifier if negative or fractional exponents are present. Can be combined with /LOGARITHMIC and /SOLVE. See below for its use.
   /SOLVE
Does not create a scale but tries to find a nonnegative real root of the polynomial. If one is found, it is stored in pitch memory 0. A second solution will be tried. If found, it is stored in pitch memory 1. Solving a polynomial equation is sometimes required for calculating the fifth of a meantone scale with certain properties (regarding beat rates or otherwise). For other cases, see CALCULATE/LEASTSQUARE. Can be combined with /LOGARITHMIC and with /POWER but not with both. Solving with /POWER is useful for calculating non-octave (or near-octave) equal temperaments with equal or proportional beat rates.


POP

POP
Copy scale number 1 to 0, 2 to 1, etc. The current scale will be lost. The highest scale memory is set in scala.ini (default 30). See also COPY and PUSH. Qualifiers cannot be combined. To restore the last directory, use CD -.
   /PITCH
Copy pitch number 1 to 0, 2 to 1, etc. The current pitch will be lost. The highest pitch memory is set in scala.ini (default 10). See also COPY/PITCH.
   /ATTRIBUTE
Restore the attribute to what it was when PUSH/ATTRIBUTE was done. Useful for command files. There is no stack, only one attribute memory.
   /FREQUENCY
Restore the base frequency to what it was when PUSH/FREQUENCY was done. Useful for command files. There is no stack, only one frequency memory.


PRODUCT

PRODUCT  [scalenr.]
Calculate the "Carthesian product" of the current scale and the given scale by multiplying each pitch of the current scale with all other pitches from the given scale. This is also called a cross-product set. The result will be sorted and identical pitches removed. If no scale is given, the current scale is multiplied with itself.
To do division of each pitch instead of multiplication, do INVERT and REVERSE first on the other scale. Another possibility is to multiply another scale's intervals with each pitch of the current scale. Do this with COLLAPSE to the other scale first before doing PRODUCT.
   /ADD
Instead of multiplying the pitches, take the summation tones.
   /MEDIANT
Instead of multiplying the pitches, take their mediant value, i.e. (num(a) + num(b)) / (den(a) + den(b)). All pitches must be rational.
   /MEANSQUARE
Instead of multiplying the pitches, take the mean of their squares, i.e. (a2 + b2) / 2.
   /POWER
Instead of multiplying the pitches, take the pitches of the current scale to the power of all pitches of the given scale.


PROJECT

PROJECT  factor  new-value  [factor  new-value  ...]
All instances of the given factor in the rational pitches of the current scale will be replaced by the new value. How much a pitch changes depends on how many multiples it has of the factor. If after division by the given factor still factors with the primes involved remain, then nothing happens, because replacement cannot be done unambiguously.
More than one factor/new-value pair may also be given, eight is the maximum. Then all factor parameters must be prime numbers. Otherwise Illegal parameter will be given, also if the number of command parameters is odd. For example, the fifths in a scale can be tempered by doing PROJECT 3 1900.0. Then for pitches with a factor 9 in the numerator, this is replaced by 3800 cents, and other prime exponents by ratio. Factors of other primes are left the same. See also LATTICE/LOAD.
This command can also be used to "warp" a just scale into an equal temperament (or subset). To do so, replace the prime factors with their corresponding pitches in that equal temperament. An alternative and easier way to do this is with REPLACE/NOTATION.
Another example: if the given factor is 5/3 then 5/3, 6/5, 25/18, etc. will be changed but not 10/9, 25/24, etc. If more than one factor is to be replaced with a non-rational value, it must be done in one evocation of the command because once the pitch has become non-rational, it cannot be split into prime factors anymore. The factors must then be prime, so 3/2 is not allowed but 3/1 is.
A factor can be completely removed from a scale by replacing it with 1/1. The scale lattice can be mirrored in the axis of a prime by replacing the prime with its reciprocal. See also FLIP.
   /ADD
Instead of replacing by new values, they will be added to the current scale. Cannot be combined with other qualifiers.
   /MATCH  prime  scalenr.
All instances of the given prime factor in the rational pitches of the current scale will be replaced by a new value which minimizes the least squares difference with the nearest pitches in the given scale. Pitches without the given prime factor and floating point pitches will not be affected. Any prime may be used, 2 included. This can be used to change rational scales into well temperaments. Instead of a scale number, a filename may also be given. See also CALCULATE/LEASTSQUARE and MULTIPLY/MATCH. Cannot be combined with other qualifiers.
   /TEMPER  comma-list
Temper out one or more commas by distributing the tempering equally over the prime factors in the comma. If the formal octave is not to be tempered as well, then it can be given at the question "Enter ratio not to be tempered". For example if it is 2/1 then prime 2 will not be tempered, but it can be any rational number.
For example if the commas are 81/80 and 2 then the tempering will be 1/5 syntonic comma (same tempering for major thirds and perfect fifths). It will be applied to all rational pitches in the current scale. The purpose is to increase the number of consonant chords in the scale. Any number of commas can be tempered out simultaneously, as long as they are not mutually dependent. Then an "Invalid argument" message will be given. For suggestions which commas to temper out, use SHOW/DIFFERENCE INTERVALS.
This operation could produce identical pitches. To remove those, use UNIQUE. Cannot be combined with /ADD or /MATCH. See also CALCULATE/MINIMAX.
   /LOGARITHMIC
This qualifier is only allowed in combination with /TEMPER. The tempering is distributed proportionally to the log of the prime factors in the comma.
   /MINIMAX
This qualifier is only allowed in combination with /TEMPER. The tempering has minimax logarithmic error (i.e. cents deviation) in the primes for the given comma(s). The factor not to be tempered may also be any ratio. When only one comma is to be given and it contains more than one prime, then it's sufficient to use PROJECT/TEMPER, otherwise "No solution" might be the result.
   /MSR
This qualifier is only allowed in combination with /TEMPER. As above, except the tempering has minimax logarithmic error in the superparticular ratios of the primes (2/1, 3/2, 5/4, 7/6, etc.) for the given comma(s), not the primes themselves. MSR stands for Minimax Superparticular Ratios.
   /FROBENIUS
This qualifier is only allowed in combination with /TEMPER. The tempering is called Frobenius because it is the solution to the minimal Euclidean norm of the temperament matrix, also called the Frobenius norm, which is the least squares distance to the identity matrix. It's sometimes also called pseudoinverse temperament. The factor not to be tempered may be any ratio.
   /RMS_TOP
This qualifier is only allowed in combination with /TEMPER. It is like /FROBENIUS, but the primes are weighted proportionally to the inverse of their logarithm, so larger primes are given less weight. It's also called TOP-RMS. The factor not to be tempered may be any ratio.
See also CALCULATE/RMS_TOP.
   /TOP
This qualifier is only allowed in combination with /TEMPER. The tempering is "Tenney optimal" or TOP, which means with minimax logarithmic error relative to each prime. So the log of the highest error for each prime divided by the log of the prime will be minimal. The factor not to be tempered may be any ratio. TOP tuning results if this is omitted. If it's 2, so octaves are not tempered, the result is the so-called Kees-optimal tuning. When only one comma is to be given and it contains more than one prime, then it's sufficient to use PROJECT/TEMPER/LOGARITHMIC, otherwise "No solution" might result.
See also CALCULATE/TOP.
   /WEIGHTED
This qualifier is only allowed in combination with /TEMPER. The tempering is distributed proportionally over the prime factors in the comma using the harmonicity constants as weighting factors. See SET HARMCONST. A clever choice of prime weighting factors can significantly reduce the maximum error of the tempering, but /TOP will be better. For example if the comma is 81/80 and you want 1/4 comma tempering, set the harmonicity constant of 5 to zero. If more than one comma is given containing the same prime(s), then the combined tempering of the commas prevails over prime weighting however.


PUSH

PUSH
Copy scale number 0 to 1, 1 to 2, etc. The scale with the highest number will be lost. The current scale will be unchanged. See also COPY and POP. Qualifiers cannot be combined.
   /PITCH
Copy pitch number 0 to 1, 1 to 2, etc. The pitch with the highest number will be lost. The current pitch will be unchanged. See also COPY/PITCH.
   /ATTRIBUTE
Save the current attribute. Then it can be restored with POP/ATTRIBUTE. Useful for command files. There is no stack, only one attribute memory.
   /FREQUENCY
Save the current base frequency. Then it can be restored with POP/FREQUENCY. Useful for command files. There is no stack, only one frequency memory. See also SHOW FREQUENCY.


PYTHAGOREAN

PYTHAGOREAN  [scalenr.]
This is the older name and synonym of the LINEARTEMP command.


QUANTIZE

QUANTIZE  resolution  [octave]
Replace all pitches in the current scale with a near multiple of an interval which is 1200 cents (default) divided by the given logarithmic resolution. If an octave parameter is given, then it's this interval divided by the given resolution. It may be given as a fraction or floating point value. To round off all pitches to the nearest whole cents value one does QUANTIZE 1200. To make the scale a subset of the 31-tone equal division of the octave for instance one does QUANTIZE 31. To quantize without affecting the current formal octave, do QUANTIZE <resolution> %n.
   /PITCH  step
Provide the step size as a ratio or in cents instead of as an octave division. For instance to quantise in schismas one does QUANTIZE/PITCH $s. This can also be used to quantise to an equal nonoctave temperament. For example to a 41-tone division of the current scale's octave do first CALCULATE %n\41 and then QUANTIZE/PITCH $0.
This qualifier can be combined with all qualifiers below, except /LINEAR.
   /LINEAR  step
Replace all pitches in the current scale with a near multiple of a small interval which is the given linear step. The default quantisation method is rounding: the nearest step is chosen. For truncation, combine this qualifier with /TRUNCATE. It may not be combined with other qualifiers than /ROUND and /TRUNCATE. The parameter may be a ratio or floating point value. It must be positive. When step is of the form 1/n, then n will be a common denominator of the resulting scale. So a common fundamental is set. To set a common guide tone instead, do INVERT prior to and after QUANTIZE/LINEAR. Quantisation to zero will not take place. See also FIT/HARMONIC. Can only be combined with /ROUND and /TRUNCATE.
   /ROUND
This is the default quantisation method. The nearest interval step is chosen. Can only be combined with /LINEAR and /PITCH.
   /TRUNCATE
The interval step that is lower than or equal to the pitch is chosen. Can only be combined with /LINEAR and /PITCH.
   /BEST
The formal octave of the current scale must be a multiple of the step size that belongs to the resolution. It finds the least-squares optimal quantisation. It uses the same algorithm as FIT/MODE. Can only be combined with /PITCH.
   /CONSISTENT
For floating point pitches the nearest interval step is chosen. For rational pitches the step will be the sum of the rounded approximations to the constituent primes. If for one of the scale pitches this is not the same step as the nearest rounded step, then a message is given that the quantisation is not consistent, but it is made anyway. See also DIVIDE/CONSISTENT. Can only be combined with /PITCH.


RATIO

RATIO  pitch  [highest-prime]
Approximate the given pitch with the nearest ratio for successive prime limits starting with 2, and show the results. With the /LIMITED qualifier the search can be limited to a certain range for the prime exponents. If the prime parameter is not a prime number, then the next higher prime will be the limit. The prime count is set up in scala.ini. The last approximation is stored in pitch memory 0 and an intermediate one if the command is interrupted. See also APPROXIMATE.
   /FAREY  pitch  highest-order  [highest-prime]
Approximates the pitch with Farey fractions up to the given order. A Farey order is the maximum denominator. Also shown are the differences in cents, the factorisation and the continued fraction representation. The best approximation is stored in pitch memory 0.
The beat frequencies are given in Hertz and relative to the base frequency set with SET FREQUENCY.
The values called certainties, indicate likelihood of the interval being heard as such. The first assumes a precision of pitch perception of 0.006 (0.6%, fine), the second of 0.012 (coarse). The likelihood decreases with the difference and with the denominator of the approximation. In order to see the ratio with the highest certainties, be sure to supply a high enough Farey order so that the certainties decrease with increasing denominator after having increased.
If it is combined with /LIMITED, then the prime limit must be given which will restrict the ratios found to the given limit. The same happens if the prime limit is given without the extra /LIMITED qualifier. The computing time will then rise quickly for orders higher than 10000.
If it is combined with /LOGARITHMIC, the nearest Farey fraction of the binary logarithm of the pitch will be found. So the result will be some step of an equal octave division whose cardinality does not exceed the given order.
Can only be combined with /LIMITED, /LOGARITHMIC and /NOOUTPUT. See also CONVERGENTS.
   /LIMITED  pitch  [highest-prime]
Consider only the fractions in which the prime exponents of numerator and denominator do not exceed the limits set by SET EXPLIMIT. If the prime parameter is not a prime number, then the next higher prime will be the limit.
   /LOGARITHMIC  pitch  highest-order
See /FAREY.
   /NOOUTPUT
Stores the last approximation in pitch memory 0 only and does not show the results.
   /SUPER  pitch
Approximates the pitch with a superparticular ratio. Shows the ratio lower than or equal and the one above the given pitch. The best approximation is stored in pitch memory 0. A superparticular ratio is one of the form (n+1)/n. Therefore only small intervals can have good approximations.
If combined with /LIMITED, superparticular approximations containing successively higher prime factors will be given, until prime number 31. If less are desired, a second parameter with a highest prime can be given. Can only be combined with /LIMITED and /NOOUTPUT.
   /CHILDREN  pitch
The given pitch must be rational. Shows the two children of the ratio in the Farey tree, also called Stern-Brocot tree. Can only be combined with /PARENTS. If combined with /PARENTS, then first the parents and then the children are shown. See also EXTEND/CHILDREN.
   /PARENTS  pitch
The given pitch must be rational. Shows the parents of the ratio in the Stern-Brocot tree. If the value is an integer number then there are no parents, otherwise there are two. Can only be combined with /CHILDREN. If combined with /CHILDREN, then first the parents and then the children will be shown. See also EXTEND/PARENTS.
   /STERN  pitch  [maximum-depth]
Shows all the convergents of the given pitch following the Stern-Brocot tree. An 'L' indicates branches to the left, an 'R' to the right. If no maximum depth is given, then the pitch will be approximated until the difference is very small, otherwise no more approximations than the given number will be given. If the given pitch is rational and no maximum depth is given, approximation will continue until the result is exact. If the given pitch is higher than 16, the integer convergents from 1 to the floor of that number will be skipped. The last approximation is stored in pitch memory 0.
Cannot be combined with other qualifiers. See also CONVERGENTS. This command is similar in that not only the full convergents are given, but also the semi-convergents.


RECTANGLE

RECTANGLE
Create a rational scale where numerators and denominators are each within given separate ranges. The parameters are given in the following order: lower bound of numerator, higher bound of numerator, numerator step (default 1), lower bound of denominator, higher bound of denominator, denominator step (default 1). If a step is given, then numbers are skipped if it is higher than 1. This value may also be noninteger, in which case the numerators or denominators will obey this formula : floor(lower-bound + n * step), n >= 0.
For example, if the numerator is in 7 .. 9 and the denominator in 4 .. 6 and the step is 1, then the scale will be 7/4 8/4 9/4 7/5 8/5 9/5 7/6 8/6 9/6.
The pitches can be reduced by an octave with the NORMALIZE command, which also removes duplicate pitches. If the scale is only to be sorted (because 1/1 will be at degree 0), do the following: APPEND 1/1
SORT
DELETE 0
If LATTICE/DIAMOND is done after this command, it will show a rectangular diagram, hence the name of this command. See also HARMONIC and SQUARE.


REDUCE

REDUCE  pitch  [scalenr.]
Divide all pitches in the current or given scale by the given pitch as many times as needed to make the resulting pitch lower than the given pitch. Otherwise if a scale pitch is smaller than 1/1, it is multiplied so the result is greater than or equal to 1/1. The given pitch parameter must be greater than 1. See also NORMALIZE.
   /UPPER
Does the above except that pitches below 1/1 are not changed.


REMOVE

REMOVE  file-mask
Remove the file with the given name from disk. There is no default file extension. If wildcards are given, the first file that matches will be deleted. To remove the last scale file loaded or saved, do REMOVE %scl.
   /ALL
Instead of deleting only one file, delete all files that match the given filename mask. No messages will be shown.


REPLACE

REPLACE  position  pitch
Replace the pitch in the current scale at the given position with another pitch. The position must be a number not higher than the number of notes in the scale. If degree 0, the 1/1 is changed then all pitches shift by the inverse of the given amount. See also help of :=.
   /EQUAL  interval  new-interval
Replace the given one step interval(s) in the current scale with the given new interval. The other intervals will remain the same. The scale must be non-empty. See also EXCHANGE/EQUAL.
   /FREQUENCY  position  frequency
Replace the pitch by specifying the frequency relative to the base frequency (see SET FREQUENCY and SHOW/FREQUENCY).
   /GIVENBEATS  position  interval  frequency
Replace the pitch at the given position by specifying its beat frequency against a given rational interval. The scale degree at the other side of the interval does not have to be inside the scale as octave equivalence is assumed. The beat frequency is relative to the base frequency of 1/1. When a negative beat frequency is given, the resulting pitch will be lower than the given interval, otherwise higher. See also SHOW BEATS and APPEND/GIVENBEATS.
   /INTERVAL  position  new-interval
Replace the pitch in the current scale at the given position by specifying a new interval with the previous degree. The position must be greater than 0 and not higher than the number of notes in the scale. To see the current scale intervals, do SHOW/INTERVAL.
   /LARGEST  new-interval
Replace the largest one step interval(s) in the current scale with the given new interval. The other intervals will remain the same. The scale must be non-empty.
   /NEAREST  pitch
Replace the pitch in the current scale with the smallest absolute difference from the given pitch, with the given pitch. The scale may not be empty. Degree 0 will not be replaced even if 1/1 is closest to the given pitch.
   /SMALLEST  new-interval
Replace the smallest one step interval(s) in the current scale with the given new interval. The other intervals will remain the same. The scale must be non-empty.
   /MODEL  scalenr.
Replace the pitches in the current scale with the nearest pitches in the given scale. This means that for each pitch in the given scale, the nearest pitch from the current scale is replaced. This only happens if the pitch in the given scale is also the nearest pitch for the current scale. So there may be pitches in the current scale that remain unchanged. Instead of a scale number, a filename may also be given. The file intnam.par is useful because it contains many rational pitches. See also SELECT/MODEL and SHOW/NEAREST DIFFERENCE.
   /NOTATION  source-notation  target-notation
Replace the pitches in the current scale with pitches having the same notation in a different notation system. The pitch is replaced with the corresponding value for that name in the target notation system. If the target system does not contain the name, then the pitch is not replaced. If the source system has no name for the pitch, then it is not replaced either. Note that whether a notation system contains a certain name can depend on the value set by SET TOLERANCE. For each pitch the shortest name is taken for the given source notation system (if there are enharmonic equivalents). If the equivalents have the same length, then names which are closer to C in the cycle of fifths have priority, so Eb comes before D# for example.
For the list of notation systems, see SET NOTATION. For equal temperaments the behaviour is similar to, but not the same as QUANTIZE. When the consistency level of either equal temperament is low, the result will be different. For some notation systems this command is not useful because the names are different than in other systems, like P7, I22 and S31 for example. Double pitches resulting from this operation can be removed with UNIQUE. Example: to change pitches to 3-limit Pythagorean (or 5-limit just), use JI as target notation system.
   /LT_GENS  generator  [octave]
Change the pitches according to the LT notation with parameters set with SET LT_PARS where another pair of generators is given as command parameters. The default octave value is 2/1. If a pitch has no note name, because of the tolerance setting, then it's not replaced. For example with the default LT parameters a pitch of 400.0 cents is notated as "4.-2". So if the given generator and octave are 699.0 and 600.0 cents respectively, this pitch will become 4 * 699 - 2 * 600 = 1596 cents. The current notation system does not need to be LT. See EXAMPLE for the similar lt_gens statement.
   /REPEAT  position  pitch
Replace all integer multiples of the given position in the current scale with corresponding multiples of the given pitch. The position cannot be 0. For position 1, an equal temperament will result.


REVERSE

REVERSE  [scalenr.]
Reverse the order of all pitches in the current or given scale. To take the reciprocal of all pitches: do INVERT after REVERSE.


SAMPLE

SAMPLE  pattern-or-steps
Select degrees according to a mode pattern from the current scale and delete the intermediate degrees. Degree 0 and the last degree (formal octave) will not be deleted. For instance if a single number is given it means that every so many pitches are taken from the scale and the rest deleted. A single number can also be a ratio or floating point number. If it's smaller than 1, extra scale degrees will be inserted, so if for example it's 1/2 then each pitch will be copied once and the scale becomes twice larger. For example to stretch a pentatonic scale to 12 tones, do SAMPLE 5/12.
If more than one number is given, this pattern repeats as often as is necessary. Example: with 12-tone equal temperament, doing SAMPLE 2 1 will give the Whole-Half step scale. The size of the scale does not need to be a multiple of the sum of the pattern. Use SAMPLE 2 to undo a DOUBLE operation. See also MODE, SIEVE and SELECT.
   /COMPLEMENT  pattern
As above but selects the complementary pattern.
   /RANDOM  count
Take a random sample of the scale degrees from the current scale. Each degree has the same probability. If the scale is not in ascending order then the order is not preserved. The last degree may be deleted. Degree 0 will be unaffected and is also not counted. See also DELETE/RANDOM, SIEVE/RANDOM and SEED.
   /SEQUENCE  factor  [add-constant]
Specify a sample pattern as a spectrum sequence: floor(n * factor + add-constant), n = 1 .. scale size.
The parameters may be given as floating point value or ratio. Floor truncates to the nearest integer not exceeding the number. The default value for the additional constant is 0. The last degree will not be deleted. See also MODE/SEQUENCE.


SAVE

SAVE  filename  [scalenr.]
Write the given or current scale to a file on disk with the given filename. If a filename without extension is given, the extension will be '.scl'. Then a description must be given on a single line. More decription text can be added with an editor if the lines begin with an exclamation mark.
The name of the last scale file loaded or saved is contained in the lexical function %scl(). It can be used to save with the last file name or a variation thereof, see ECHO.
   /KEEP_TEXT
Save the scale with the description that it got from loading from a file, or the SET DESCRIPTION command, even if it's empty or not previously set. Can only be combined with /CENTS.
   /CENTS
Write the given or current scale to a text file on disk with the given filename. The filename has no default extension. The pitch values are written in cents, one value per line. The first line will contain the description. The file can so be used as input file for spreadsheet or other programs. For rational pitches the value is also written in cents, but followed by the numerator and denominator of the fraction. The numbers are separated by horizontal tabs. In a spreadsheet, this will get the numbers in adjacent columns (if the tab character is selected as separator). Such a file can be loaded again with LOAD/CENTS, but only as floating point values. Can only be combined with /KEEP_TEXT.
   /CSV
Write the given or current scale to a file on disk with the given filename. The default extension is '.csv'. The format is a vertically oriented semicolon-delimited text file which can be read in a spreadsheet like Excel for example. The fields are the description, the scale size, and the pitches in cents. If a file already exists, it will be overwritten. Cannot be combined with other qualifiers.
   /EXCEL
Write the given or current scale to an Excel file with the given filename. The default extension is '.xls'. The worksheet will have one column with the scale description in the first row, and the pitches written in cents in row 3 and down. If a file already exists, it will be overwritten. Cannot be combined with other qualifiers.


SEED

SEED  [number]
Gives the random number generator that is used for the aleatoric commands a new seed to prevent getting the same sequence of results each time the program is started. The number must be an integer number. If it is omitted, the computer's clock is used to obtain a value. It's also used for TIP. See also PERMUTE/RANDOM, SAMPLE/RANDOM, SIEVE/RANDOM and VARY.


SELECT

SELECT  [scalenr.]
Enter a set of scale degrees to keep for the given or current scale and delete the degrees not entered. The program will prompt for the scale degrees. Then type each degree number followed by a <return>. Continue doing this until all degrees that need to be kept are entered and then enter a zero to stop the program from prompting. Instead of scale degrees, also note names of the current notation system may be entered, see SET NOTATION. This is sometimes a more convenient way of deleting pitches from a scale than with the DELETE command. If you might decide to keep the scale, or in case a wrong number was typed, you can enter -1 instead of a zero, which will cause a stop and do nothing.
Modes can also be selected with the MODE command. See also SAMPLE and SIEVE.
   /MODEL  scalenr.  [scalenr.]
Change the second scale number to the structure of the first scale number. This means that for each pitch in the first scale, the nearest pitch from the current or second scale is taken. So there may be pitches from the current or second scale removed or duplicates inserted. If two pitches are equally distant from a pitch in the first scale, (within half a cent) then the highest one will consistently be selected. After the operation the current or second scale has the same number of notes as the first scale. Instead of a scale number, a filename may also be given as first parameter. See also DELETE/MODEL and REPLACE/MODEL.


SEND

SEND  [parameters]
Send a tuning to a synthesizer (via MIDI). This command invokes "@send", so the command file send.cmd must be present in the current directory. The contents of send.cmd should be adapted for the computer platform used by invoking an appropriate external MIDI file player program or the internal PLAY command. An exception are software synthesizers or soundcards which are tuned via a text file (see the output of command SHOW SYNTHESIZER). When such is the current synthesizer type, the command file sendtext.cmd will be invoked instead. Any parameters given will be passed to the command file.
See also Mappings, LOAD/MAP, SET SYNTHESIZER, SET MAP_FREQ, SET ADJUSTMENT, SET DEVICE_ID and SET PRESET.
   /FILE  filename  [scalenr.]
Write the tuning data as one or more system exclusive tuning messages to a MIDI file with the given filename, using the current keyboard mapping and according to the currently selected synthesizer type. Warning: the MIDI file will not contain anything audible, just tuning messages. For software synthesizers generally a text file will be produced with tuning data instead of a MIDI file. Instead of a scale number a filename can also be given. The default extension for the output file is '.mid' for MIDI files and something else for text file dumps, depending on the synthesizer type. If the current keyboard mapping is empty then a linear mapping (scale degrees one-to-one to MIDI keys) is used.
Some synthesizer types only allow 12-note tuning. If you want to tune a scale with less than 12 tones, you should use a keyboard mapping that maps some scale degrees to more than one key. Or if you want to use an empty mapping, extend the scale by duplicating some pitches.
When it allows a (short) description, the current scale description or part of it will be put in, see SET DESCRIPTION. Read synth.par to see how the dump format is adaptable for different synthesizer types, although it is of very limited use since most dumps do not have such a simple form.
The two Reaktor formats are just a single line with semitones or frequencies. They can be loaded into a Reaktor event table. Then connect the incoming note events to both the RX and R inputs of the event table module.
The name of the last scale file loaded or saved is contained in the lexical function %scl(). It can be used to save with the last file name or a variation thereof, see ECHO.
   /HEXADECIMAL  filename  [scalenr.]
Write the tuning data to a text file with the given filename, using the current keyboard mapping and according to the currently set synthesizer type. The synthesizer type can only be one defined in synth.par, see SET SYNTHESIZER. This is used to create tuning dumps for unsupported synthesizer types. Only the MIDI tuning numbers will be written to the file, in hexadecimal format. MIDI codes in synth.par for prefix and suffix are ignored. The file written can then be included in another file containing a text representation of surrounding MIDI system exclusive codes. Then it can be transformed into a MIDI file with the program T2MF (text to MIDI file).
If the current keyboard mapping is empty then a linear mapping is produced. Instead of a scale number a filename can be given which then sends the scale in the file, without affecting the current scale. The default file extension is '.txt'.
   /SCREEN  [scalenr.]
Write the scale data in numbers to the screen so putting them in the synthesizer can be done by hand. If a tuning number is inappropriate (i.e. too high, too low, or too far from the equal tempered value for the synthesizer) then it is marked with an asterisk. The keyboard map determines which note numbers will be shown. In order to write the data to a file, for example to print, use command FILE first. The frequency corresponding to the tuning number may be different in reality because it may also depend on the usual master frequency setting of the instrument. And it depends on the resolution which is not taken into account in the value shown.
The scale pitch and notation in the current notation system are then shown for valid tuning numbers. Instead of a scale number a filename can also be given.


SET

SET (ATTRIBUTE | ADJUSTMENT | CALC_OUTPUT | CONTROLLER | DESCRIPTION |
     DEVICE_ID | DIFF_DEGREE | EXCLUDE | EXPLIMIT | FIFTH | FIRST | 
     FREQUENCY | HARMCONST | INDEX | INT_FILE | INT_STEPS | LIMIT | LT_PARS |
     MAP_FREQ | MAXDIFF | MIDDLE | NAME | NOTATION | OFFSET | ONERROR | 
     PAUSE | PITCH_BEND | PRESET | PROGRAM | RECIPROCAL | SAGITTAL | 
     SEPARATOR | STEP_UNIT | SYNTHESIZER | TOLERANCE | UNIT | WEIGHTING)
SET ATTRIBUTE  attribute  [parameter]
Change the pitch attribute shown with
SHOW SCALE, SHOW/INTERVAL SCALE or SHOW/ATTRIBUTE INTERVALS. The attribute value is also used in APPROXIMATE/WEIGHTED and APPROXIMATE/MOULD among others.
The possible attributes are:
CENTS : the cents value
CONVERGENTS : the denominators of successive convergents [1]
DENOMINATOR : the denominator
DEPTH : the length of the continued fraction expansion [2]
DIFF_ET : the difference in cents with the equal tempered value [3]
DISSONANCE : the sensory dissonance of the dyad with 1/1 [4]
ENTROPY : the Erlich harmonic entropy value [5]
EPIDEN : the Epimoric Denominator [6]
EPIMERICITY : the comma complexity log(|num-den|)/log(den)
ET_STEP : the number of consistent steps of an equal temperament [7]
EUCLID : the rectangular distance in lattice space (without 2's) [8]
EXPONENTS : the harmonic vector of primes including 2
EXPRESSION : the result of a user-definable pitch expression [9]
FACTOR : the frequency ratio as a linear decimal factor [10]
FM_CAR : the frequency modulation carrier frequency [11]
FM_MOD : the frequency modulation modulator frequency [11]
FRACTION : the continued fraction expansion
FREQUENCY : the frequency according to the base frequency in Hz
GRADUS : the Gradus Suavitatis of Euler [12]
HARMON : the Barlow harmonicity value [13]
INTERVAL : the interval with previous or other position in cents [14]
INV_HARMON : the absolute reciprocal of Barlow's harmonicity value
LENGTH : the Euclidean length of the harmonic vector (without 2's)
LIMIT : the prime limit
LOG_FRACT : the number of octaves as a ratio [15]
MANN : the arithmetic mean of numerator and denominator (num+den)/2
MAX : the log of the maximum of numerator and denominator
MEAN : the geometric mean of numerator and denominator sqrt(num*den)
MULTIPLE : the integer multiple (all values under denominator 1)
NONE : no attribute
NOTATION : name and accidentals according to a given system [16]
OCTAVE : the number of octaves (oct value of Csound and SAOL) [17]
OTHER_SCALE : the same degree of another scale [18]
PERRY : the Perry harmonic complexity value [19]
PITCH_BEND : semitone roundoff and pitch bend values (-2048..2047) [20]
PRIMES : the prime factorisation
PROOIJEN : the van Prooijen harmonic expressibility value [21]
RECIPROCAL : the reciprocal ratio with degree 0, (rel. string length) [22]
REDUCED : the octave reduced pitch
SEMITONE : the semitone roundoff value and remainder (-50..49 c.)
SEP_PRIMES : the prime factors except 2 all separately (i.e. 3.3.5.7)
STEP_DIFF : the difference in cents with the nearest e.t. step [23]
STERN : the length of the path in the Stern-Brocot tree
SUBMULTIPLE : the inverse multiple (all values under numerator 1) [24]
TENNEY : the Tenney harmonic distance value: log(num*den)
TRIANGLE : the distance in triangular lattice space (less factor 2) [25]
TR_LOG : the triangular logarithmic complexity (less factor 2)
TWELVE : the nearest semitone name and difference (-50..49 c.)
VECTOR : the harmonic vector of primes other than 2
VOGEL : the Vogel harmonic complexity value [26]
WILSON : the Wilson harmonic complexity value (sum of primes except 2)
number : the interval size in <number> per octave units [27]

Remarks:

  1. An extra parameter can be given for another octave value than 2, for example: SET ATTRIBUTE CONVERGENTS 3/1. This parameter is shared with attributes LOG_FRACT and OCTAVE. It shows the denominators of the full convergents of the logarithmic pitch divided by the log of the given octave, reduced to the range 0..1. The first value 1 is skipped, unless it's the only value. See also CONVERGENTS.
  2. See also the FRACTION attribute and the STERN attribute.
  3. DIFF_ET is different from STEP_DIFF in that it doesn't refer to the nearest equal tempered step but to the equal tempered value for the same pitch class (scale degree). The values given depend on the setting of SET DIFF_DEGREE. But an extra parameter may be given to change the reference class with the same command. See also SHOW ET_DIFF if you want to compare to other equal temperaments than the current scale size.
  4. An extra parameter is used to set the scale number which contains the frequencies of the partials to calculate the Plomp-Levelt dissonance with. The initial scale number is 1. The next scale, one number higher, is used as an array of amplitudes of the corresponding partials. Degree 0 in these scales is not used. For example to use scales 1 and 2, suppose the partial frequencies are: 500, 1000, 1500, 2000 Hz. Then do INPUT 1, 4 (number of notes), 1/1, 2/1, 3/1, 4/1 (or 1, 2, 3, 4). Then do SET FREQUENCY 500. Then do INPUT 2, 4 (number of notes), 10.0, 8.8, 7.7, 6.6 (the cents will be interpreted as amplitudes; don't forget the decimal point). Then do SET ATTRIBUTE DISSONANCE 1 and then SHOW. For each note in the current scale the dissonance value is given. To get an impression of the dissonance curve of the given timbre, make an equal tempered scale with many notes and do SHOW. The values depend on the base frequency. If the partials and amplitudes scales don't have the same size, only the smallest number is taken.
  5. The order may be set with an extra parameter. A positive value sets the Tenney version of harmonic entropy, which is also default. The order is the highest product of numerator and denominator of ratios in a set which forms the "alphabet" for the entropy calculation. Default is a Tenney order of 1500. For a negative value, it is the Farey version of harmonic entropy. The Farey order is the highest numerator and denominator of the ratios in the set. A useful Farey order is 80 (so the parameter is -80).
    The default hearing resolution sigma (standard deviation) for the entropy formula is 1%. It can be altered by adding the key Entropy_Sigma to scala.ini with the desired percentage. A fine perception precision would be 0.6%, a coarse one 1.2%.
  6. This is 1/(F-1) where F is the linear factor. It shows how close the pitch is to 1/1. For superparticular (epimoric) ratios it's equal to the denominator. Also at which frequency the difference is 1 Hz. The term's name is by Petr Parízek.
  7. An extra parameter must be given to set the number of steps per octave. This doesn't need to be an integer number. If the pitch is a rational value, the integer number of steps in this equal temperament is given which is consistent with the prime factorisation of the ratio and based on the nearest steps for the primes, see also DIVIDE/CONSISTENT. If the pitch is a cents value, the nearest number of steps is given. The given parameter also influences the STEP_DIFF attribute, or can be set with SET STEP_UNIT (as cents, not as octave division). The parameter can also be "n", which means the current scale size. This value is also known as "val". The counterpart which gives the non-integer number of steps is OCTAVE.
  8. This is also known as the Minkowski or "city block" distance; the shortest distance along lattice lines between two points in an Euclidean lattice being like city blocks. See also SET ATTRIBUTE TRIANGLE.
  9. The extra parameter must be an expression that the CALCULATE command must be able to evaluate. Each pitch in the scale will first be copied to pitch memory number 1, so that it can be referred to in the expression with $1. This can make it a user-definable function of the scales pitches. The initial value in pitch memory 1 will be lost. The linear value of the result will be shown. If no extra parameter is given, the last expression will be used. The expression is initially empty. If there's a syntax error in it, or the result or arguments are out of range, then nothing will be shown. It best to check them with CALCULATE first. See also Expressions.
  10. The value for FACTOR depends on the setting of SET FACTOR. But an extra parameter may be given to change the multiplication factor with the same command. The initial value is 1.0. Being a linear value, it represents relative frequency. See also SET FREQUENCY and SET ATTRIBUTE MULTIPLE.
  11. This represents the FM carrier frequency for FM_CAR, (F+1)/(F-1) where F is the linear value of the pitch, and the FM modulator frequency (F-1)/(F+1) for FM_MOD. It's multiplied by the value given as the second parameter or as set with SET FACTOR. That value then represents the modulator frequency for FM_CAR or the carrier frequency for FM_MOD. For example if the modulator frequency is 100 Hz, then the carrier frequency will be 500 Hz for a 3/2 interval, because the sum and difference frequencies will be 600 and 400 Hz, making this interval.
  12. This value increases with interval complexity, so a better name would be Gradus Dissuavitatis.
  13. The value for HARMON depends on the setting of SET HARMCONST. See also SHOW HARMCONST.
  14. The value for INTERVAL depends on the setting of SET INT_STEPS. This sets the number of steps for the interval, default is -1. However an extra parameter may be given to set it with the attribute, for example: SET ATTRIBUTE INTERVAL 4.
  15. The values of LOG_FRACT have a maximum denominator of 999. If there is no near ratio, then nothing is shown. The numerator can be interpreted as degree number and the denominator as number of equal tempered tones per octave. An extra parameter can be given for another octave value, for example: SET ATTRIBUTE LOG_FRACT 3.
  16. An extra parameter must be given to change the current system for NOTATION. To see the legal values do SHOW NOTATION. The initial value is E12. The pitch must not be further removed from a degree than the part of the corresponding step size set with SET TOLERANCE. Otherwise no name will be given. For the JI, JI2 and SAJI* notations where the pitch must be rational, there is no range of tolerance. See SET NOTATION for the meaning of the symbols. See SET OFFSET how to change the name for degree 0.
  17. An extra parameter can be given which will be multiplied to the number of octaves. Such value can also be set directly as attribute, like this: SET ATTRIBUTE 31. This will show the pitches in terms of real number of steps in 31-tone equal temperament. This parameter is shared with attributes CONVERGENTS and LOG_FRACT. The counterpart which gives the nearest integer number of steps is ET_STEP.
  18. An extra parameter must be given to select which other scale to show. The initial value is 1.
  19. Robin Perry's harmonic complexity is defined as follows: PC(1) = 0, for primes p, PC(p) = PC(p - 1) + 1 and for composite positive numbers n, PC(n) is the sum of PC(p) of the constituent prime factors times their exponents. For ratios, PC(num/den) = PC(num) + PC(den).
  20. An extra parameter can be given for the pitch bend resolution, which must be greater than or equal 0. If not, then the default pitch bend resolution is used, which is from -8192 to 8191 for -/+ 2 semitones, so 4096 steps per 100 cents. The value given is rounded off to the nearest semitone however. The default pitch bend resolution can be changed in scala.ini:
    MIDI_Pb_Resolution 4096
  21. This is the base-10 log of the maximum of numerator and denominator with factors of 2 removed, a harmonic complexity value proposed by Kees van Prooijen.
  22. The value for RECIPROCAL depends on the setting of SET RECIPROCAL. But an extra parameter may be given to change the multiplication factor with the same command. The initial value is 1.0. Being the inverse of frequency, it represents relative string lengths. More accurate values for some strings can be obtained with SHOW STRINGLEN. The multiplication factor used is the same as for SET ATTRIBUTE FACTOR.
  23. The value for STEP_DIFF depends on the setting of SET STEP_UNIT. But an extra parameter may be given to change the unit with the same command. See also SHOW ET_DIFF for a similar operation. The parameter also influences the ET_STEP attribute.
  24. For the value of SUBMULTIPLE, one needs to imagine "one divided by" in front of the value, i.e. the real value is the reciprocal of the number shown.
  25. This is the shortest distance along lattice lines between two points in a triangular lattice. This means that p, q and p/q all have distance 1 to 1/1 if p and q are prime. See also SET ATTRIBUTE EUCLID.
  26. Vogel's harmonic complexity is the sum of prime factors except 2, plus the number of factors of 2.
  27. A number can be given instead of one of the above options. This will show the interval size in units of the given number per octave. It may be a floating point value. For example, the tuning resolution of a certain synthesizer could be taken to show the pitch in terms of that unit, or for millioctave units do SET ATTRIB 1000. An interval value that begins with a $ or a % can also be given. For instance to specify schisma-units do SET ATTRIB $s. The option SET ATTRIBUTE OCTAVE is the same as this one, with a default unit of 1. If you want values shown rounded to the nearest integer, then use SET ATTRIBUTE ET_STEP instead.
See also LIMIT/ATTRIBUTE, PUSH/ATTRIBUTE, SORT/ATTRIBUTE and SHOW/ALL ATTRIBUTE.

SET ADJUSTMENT
Change the reference frequency of the current keyboard mapping to the value which minimises the deviation from 12-tone equal temperament. Influences the SEND command. See the current value with SHOW MAPPING. This is intended for instruments with a tuning restriction, for example the Yamaha XG series, where each key can be detuned only -64..+63 cents. This changes the pitch of all keyboard keys, depending on the current scale, to get as many tones as possible within the restricted detuning range. It can be done for any middle key, see SET MIDDLE. To check whether it succeeded and how much shift was applied, do SEND/SCREEN. Repeat this command after changing the scale or middle key. See also SET MAP_FREQ. Look at SAMPLE to duplicate pitches if the scale's 12th degree is not approximately 2/1, because for example the scale has less than 12 tones.

SET CALC_OUTPUT  (ALL | LONG | SHORT | NONE)
Modify the amount of values given by the CALCULATE command. Default option at startup is LONG. SHORT only gives the linear and log values of the result and the interval name, if any. With NONE it gives no output, like when the /NOOUTPUT qualifier is used. With ALL it is like LONG plus the note names of all implemented notation systems. The pitch must not be further removed from a degree than the part of the corresponding step size set with SET TOLERANCE. Otherwise no name will be given. See also SET NOTATION. The parameter cannot be abbreviated.

SET CONTROLLER  (ON | OFF)
Influences the commands EXAMPLE/MIDI and EXAMPLE/CREATE. If it is OFF, then no MIDI parameter (control) messages will be put in the output file. The initial setting is ON.

SET DESCRIPTION  [scalenr.]
Change the description line for the current or given scale. This line is shown with SHOW SCALE and CATALOGUE amongst others and replaced when LOAD is done. Enter the description as a single line after giving the command. It can be saved with the scale by using SAVE/KEEP_TEXT. See also SHOW DESCRIPTION. In Scala 2.x the description can be changed in the Edit:Edit scale dialog.

SET DEVICE_ID  number
Some synthesizer types have a device ID number in the MIDI tuning dump format. For example the MIDI Tuning Standard has a number from 0 to 127, where 127 means all devices. The Yamaha XG format has a number from 0 to 15. The Roland GS format calls it a Part number, which starts at 1, so the number 0 will correspond to part 1, and so on. The initial value is 0.
Use this command to set this number prior to using the SEND command. The current value is shown with SHOW SETTINGS. No checking is done whether the number is in the supported range for the synthesizer type. If the synthesizer does not have a device ID then this setting is ignored. See also SET PRESET and SET SYNTHESIZER.

SET DIFF_DEGREE  position
Change the base class for the comparison of the scale with an equal tempered scale. The initial setting is 0, which means that for degree 0 a zero difference will be shown. For example, with a twelve tone scale when the differences are to be shown with respect to A instead of C, do SET DIFF_DEGREE 9. Remember to do SET ATTRIB DIFF_ET after this for SHOW SCALE.

SET EXCLUDE  [midi-channel-list]
Influences the command EXAMPLE/MIDI. Enter the MIDI channel numbers (between 1 and 16) that are not to be used by this command. Initially no channels are excluded. If you have a soundcard with a standard channel for drum sounds, usually 10, but sometimes 16 (on Soundblaster cards), then use this command to exclude it before doing EXAMPLE/MIDI. Put this command in the startup command file startup.cmd if you usually need to exclude the same channels. To view the excluded channels do SHOW SETTINGS. It has no influence on the command EXAMPLE, where excluded channels are declared in the input .seq file.

SET EXPLIMIT  [prime  exponent-limit]
Modify any exponent limit(s) per prime for rational approximation. Without parameters, a list of prime and exponent limit pairs can be given, ended by entering a zero. Otherwise one pair is given on the command line. The prime count is set by Prime_Count in scala.ini (default 10 which is 29-limit). See also APPROXIMATE.

SET FACTOR  factor
This is a multiplication factor for the factor shown with SET ATTRIBUTE FACTOR. The initial value is 1.0. The given factors represent relative frequencies. It's necessary to do SET ATTRIBUTE FACTOR after this. The value set is the same as used for SET ATTRIBUTE RECIPROCAL, so this command is synonymous with SET RECIPROCAL. It's also used with the attributes FM_CAR and FM_MOD.

SET FIRST  position
Set the lowest scale degree that will be shown with the SHOW SCALE command. It can be any integer. This overrides the default value in scala.ini with key Show_First.

SET FIFTH  position  [notation-system]
Set the scale degree for 'G' in the current or given notation system. Only notations for equal temperaments which are diatonic can be used. Also not supported for Sagittal notations. When 0 is given for the position, the regular degree is restored. It must be a generator for the division of the notation, i.e. have no factors in common. Can also be used to set the generator only for notation LT, without the other parameters. See also SET NOTATION and SET LT_PARS.

SET FREQUENCY  frequency  [position-or-note-name]
Change the base frequency. The frequency is to be entered in Hertz, as a floating point value or ratio. This value influences the following commands: SHOW/FREQUENCY, SHOW BEATS, SHOW DISTANCE, CATALOGUE/PITCH and the beat frequencies calculated with CALCULATE. This and other settings can be viewed with SHOW SETTINGS.
The parameter can also be a pitch memory or scale degree (see help items of $ and %). Then the value is interpreted as a change relative to the current value, so for instance if pitch memory nr.0 contains 3/2 and $0 is given, the frequency will become a just fifth higher.
If a second parameter is given, the frequency will be set such that the given scale degree in the current scale will correspond to that frequency. So the given frequency will be lowered by the interval at the given position in the scale. If this parameter is not a number, it will be interpreted as a note name in the current notation system, and the degree the first scale degree with this note name, or the nearest degree to the nominal value of the given name, if it's within the current tolerance range. If there are no pitches fulfilling this then "parameter error" will be given.
The initial base frequency is set by key C_Freq in scala.ini (default 261.6255653 Hertz). This is the frequency of middle C corresponding to an equal tempered A of 440 Hz. See also PUSH/FREQUENCY.
Warning: it does not influence the SEND command. Instead, to change the reference frequency of the keyboard mapping, use SET MAP_FREQ or COPY/FREQ_MAP.

SET HARMCONST  [prime  coefficient]
Modify any coefficient(s) of the harmonicity function. This influences the harmonicity values shown when SET ATTRIBUTE HARMON or SET ATTRIBUTE INV_HARMON are done, and also the harmonicity values shown by SHOW DATA. The harmonicity function is also used in some other commands, like APPROXIMATE and DISCARD. The initial values are 2*(p-1)2/p, where p is a prime number. This is Barlow's Indigestibility function.
If the coefficients are set to be equal to the prime number, the Gamma-prime function, a modified version of Euler's function is obtained. With no parameters, the coefficients are set interactively.
The prime count is set by Prime_Count in scala.ini (default 10 which is 29-limit). See also SHOW HARMCONST, APPROXIMATE/WEIGHTED and PROJECT/WEIGHTED.

SET INDEX  (ON | OFF)
Enable or disable showing the scale degree index with the SHOW SCALE commands. The initial setting is ON.

SET INT_FILE  filename
Change the parameter file which contains the names of rational intervals. This can be used to change the language of the names. The file initially read at program startup is specified by key Int_File in file scala.ini. See file intnam.par for an example and the other presupplied files int*.par.

SET INT_STEPS  number
Change the relative position of the scale degree with which the interval is shown with SHOW SCALE and SHOW/INTERVAL SCALE. The initial setting is -1, which means the previous degree. Remember to do SET ATTRIB INTERVAL after this for SHOW SCALE; it's not necessary for SHOW/INTERVAL SCALE.

SET LIMIT  highest-prime
Change the default prime limit for the commands APPROXIMATE, CHORDS and LIMIT. If 0 is given, the highest prime which is set in scala.ini is taken.

SET LT_PARS  generator  division  [lower bound]  [octave]
Change the parameters for notation system LT, see SET NOTATION. By default, they are 7, 12, 0 and 2/1 respectively. Division is the number of notes in one formal octave, also called period. The generator is given as a number of steps in the division, so that its logarithmic value is generator*octave/division. It may also be given as a pitch (ratio or cents), in which case the nearest step in the given division will be taken. The generator and division must be mutually prime, otherwise the message "Illegal generator value" will appear. The optional lower bound is for the range of number of generators given by the notation. So for example if the parameters are set to 7, 12, -3 and 2/1, then the gamut of generators is -3 .. 8, therefore corresponding to Eb .. G#. For convenience, using this command will also change the notation system to LT, and the current attribute to notation.
To automatically match the parameters to the current scale, using a lower bound of 0, enter the following command: SET LT_PARS %g n 0 %n. This only works if the current scale is a linear or equal temperament though.
There are two counterpart statements in EXAMPLE files: lt_pars and lt_gens, see EXAMPLE. They determine the actual pitch values that note names in the LT notation represent in these files. See also REPLACE/LT_GENS.

SET MAP_FREQ  frequency  [note-number]
Change the reference frequency of the current keyboard mapping. Influences the EXAMPLE/MIDI and SEND commands. See the current value with SHOW MAPPING. The initial value is 261.6256 Hz. The frequency parameter can also be a pitch memory or scale degree (see help items of $ and %). Then the value is interpreted as a change from the current value, so for instance if pitch memory nr.0 contains 3/2 and $0 is given, the frequency will become a fifth higher. With the optional second parameter, the MIDI note number to which the reference frequency is mapped, can be changed. The initial value is 60 (C). Use 69 for mapping to A. Don't type something like "69.A", but only the number, for example: SET MAP_FREQ 440.0 69
This command does not change the frequency alterable by SET FREQUENCY. See also SET ADJUSTMENT and SET MIDDLE.

SET MAXDIFF  maximum-difference
Change the maximum difference for approximated pitches. The value can be given as ratio or in cents (or with $ or %). The value of 0.0 means no maximum for the command APPROXIMATE, except APPROXIMATE/INSERT. A maximum of 0.0 means to other commands like CHORDS, COMPARE and SHOW LOCATIONS that no approximate comparisons will be done, only exact ones.
Example: to set the schisma as maximum do SET MAXDIFF $s, but depending on the accuracy of the scale, a slightly higher value may be required. This value and other settings can be viewed with SHOW SETTINGS. See also APPROXIMATE, CHORDS, COMPARE and EGALIZE/MODEL.

SET MIDDLE  note-number
Change the middle key of the current keyboard mapping where scale degree 0 is mapped to. The parameter is a MIDI note number. The initial value is 60 (middle C). It influences the EXAMPLE/MIDI and SEND commands. See the current value with SHOW MAPPING. It doesn't change the mapping's reference frequency or its key, for this use SET MAP_FREQ.

SET NAME  (ON | OFF)
Choose whether an interval name will be given with SHOW SCALE for rational intervals. The initial setting is ON.

SET NOTATION  notation-system
This is an abbrevation for SET ATTRIBUTE NOTATION. Legal values are:
Octave based equal temperaments: E5, E7, P8, E9, W9, E10, S10, A12, C12, D12, E12, F12, N12, P12, S12, SA12R, SE12, R13, W13, E14, L14, E15, P15, D15, E16, A16, C16, M16, W16, E17, W18, E19, N19, Y19, E20, R20, Z20, E21, C22, E22, L22, N22, P22, E23, M23, W23, E24, P24, C25, E25, E26, AB26, E27, E28, E29, E30, E31, F31, O31, P31, S31, E32 .. E36, P36, Q36, YA36, E37, M37, E38 .. E41, L41, P41, T41, E42, E43, P43, S43, E44 .. E48, A48, E49, E50, P50, E51 .. E53, L53, E54, E55, P55, T55, E56 .. E58, E59A, M59, E60 .. E64, E64A, E65, E66, E66A, E67 .. E71, E71A, E72, B72, EL72, M72, R72, T72, E73 .. E95, E95A, E96 .. E99, EL99, E100 .. E144, A144, R144, E145 .. E164, E165A, E166 .. E183, E184A, E185 .. E205, E206A, E207, E209, E211, E212, E214, E216, E217, E220, E224, E228, E239, E240, E248, E256A, E265, E270, E277, E282, E289, E296, E306, E311, E388A, E441, EL441, C1200, C1200Q, LT, SA<n> and SA<n>N for many divisions depending on the contents of sag_et.par.
Fifth (3/2) based equal temperaments: Q9, Q11, Q20.
Twelfth or tritave (3/1) based equal temperaments: BP, KL, KD, KG, PBP.
Not equal temperaments: S5, P7, P5, A17, P17, I22, T24, V31, A34, A34N, YA36, T48N, EITZ, JI, JI2, SAJI1, SAJI2, SAJI3, SAHTT.

Names beginning with an E are for equal temperaments with that number of notes per octave and give the note name (C, D, etc.) followed by accidentals. Rapoport's notation system is used which is consistent with Fokker's for 31-tET and Blackwood's for 15-tET. For 16-tET Blackwood's notation is used. For 9-tET and 20-tET a notation of mine is used. Names beginning with an E and ending with an A have an alternative fifth of one step smaller than the best fifth (so second best fifth), to avoid a very large syntonic comma.
For some missing equal temperament notations, one with a double or triple number can be used, for example for 8-tET, use E24 and for 11-tET, use E22 or L22.
An unusual system is E14 with its negative syntonic comma, but alternatives exist in L14 and E28.
Names beginning with SA are notations in the general-purpose Sagittal notation system created by George Secor and Dave an with help from many others on the Yahoo groups "tuning" and "tuning-math". For proper functioning of these systems, some parameter files with names sag*.par have to be installed in the Scala directory. The latest versions of these were included with Scala at the time of release, however these files are maintained independently of Scala and any updated versions of them can be downloaded from the Sagittal website: http://users.bigpond.net.au/d.an/sagittal/. See also SET SAGITTAL and SET LT_PARS.
Names beginning with a W are Wilson's note names for equal temperaments. Its Greek letters are written out or abbreviated with two letters.
S5 gives the Central-Javanese note names for slendro.
P7 gives the Central-Javanese note names for pelog.
P5 gives the West-Javanese note names for pelog.
P8 gives Pseudo-diatonic note names for 8-tET.
Q9 gives names for 9-tone equal division of pure fifth (Carlos alpha).
S10 gives Sethares' 10-tET names.
Q11 gives names for 11-tone equal division of pure fifth (Carlos beta).
A12 gives anhemitonic hexatonic note names for 12-tET.
C12 gives Carnatic note names for the 12-tone mela system.
D12 gives the German note names for 12-tET.
F12 gives numerical names for 12-tET.
N12 gives the Dutch note names for 12-tET.
P12 gives pentatonic note names by Bernet-Kempers.
S12 gives Dutch solmisation names for 12-tET.
SE12 gives English solmisation names for 12-tET.
R13 gives Rapoport's 13-tET names.
L14 gives note names for 14-tET where # and b are a major limma.
D15 gives decimal names for 15-tET.
P15 gives Caratolozzo's Pentadecaphonic 15-tET names.
A16 gives Armodue 16-tET names.
C16 gives Op de Coul's 16-tET names.
M16 gives Miller's 16-tET names.
A17 gives the Arabic note names for al-Urmawi's Arabic 17-tone scale.
P17 gives the Persian note names for the Persian 17-tone scale.
N19 gives Negri's 19-tET names.
Y19 gives Yasser's 19-tET names.
Q20 gives names for 20-tone equal division of pure fifth (Carlos gamma).
R20 gives names for Rothenberg's pseudo-diatonic 20-tET mode.
Z20 gives Zweifel's 20-tET names.
C22 gives Op de Coul's 22-tET names.
I22 gives the Indian sruti names.
L22 gives note names for 22-tET where # and b are a major limma.
N22 gives numerical names for 22-tET by Paul Erlich.
P22 gives Paul Erlich's note names for 22-tET.
M23 gives Miller's 23-tET names.
P24 gives the Persian note names for 24-tET.
T24 gives Turkish names of the Arel-Ezgi-Uzdilek system.
C25 gives Op de Coul's note names for 25-tET.
AB26 gives alphabetic names A to Z for 26-tET.
F31 gives Fokker's names for 31-tET notes.
O31 gives names for the Orwell 31-tET mode.
P31 gives Pythagorean names for 31-tET.
S31 gives Suppig's names for 31-tET notes.
V31 gives note names for 31-tET with 1/4-comma alterations.
A34 gives the Abjad system for two octaves of the Arabic 17-tone scale.
A34N gives the Abjad notes names of Nasir Dede for the Arabic 17-tone scale.
P36 gives quasi-Persian note names for 36-tET.
Q36 gives a quasi-Pythagorean system for 36-tET.
YA36 gives Yarman's note names for Yarman-36 tunings.
M37 gives Miller's 37-tET Porcupine notation, also for 15 and 22-tET.
L41 gives names for 41-tET where # and b are a major limma.
P41 gives Pythagorean names for 41-tET.
T41 gives Breed's Tripod note names for Magic temperaments.
P43 gives Pythagorean names for 43-tET.
S43 gives Sauveur's names for 43-tET notes.
A48 gives another 48-tET name system.
T48N gives Turkish note names of Arel-Ezgi for two octaves.
P50 gives Pythagorean names for 50-tET.
L53 gives names for 53-tET where # and b are a major limma.
P55 gives Pythagorean names for 55-tET.
T55 gives Telemann's names for 55-tET notes.
M59 gives Miller's 59-tET Porcupine notation.
B72 gives Breed's decimal names for the Erlich/an Miracle scale.
EL72 gives ennealimmal names for 72-tET.
M72 gives Op de Coul's alphabetic names for the Erlich/an Miracle scale.
R72 gives Richter Herf's 72-tET names.
T72 gives Breed's Tripod note names for Magic temperaments.
E96S gives names for 96-tET with second-best seventh.
EL99 gives ennealimmal names for 99-tET.
A144 gives another 144-tET and 72-tET name system, compatible with A48.
R144 gives Richter Herf's names adapted to 144-tET.
EL441 gives ennealimmal names for 441-tET.
C1200 gives a cents notation for 1200-tET (fifth = 702).
C1200Q gives a cents notation for 1200-tET based on quarter-tones.
LT gives generator.oct pairs for linear temperaments (SET LT_PARS).
BP gives Bohlen's new names for the Bohlen-Pierce scale.
KL gives Bohlen's names based on the Lambda mode of the Bohlen-Pierce scale.
KD gives Bohlen's names based on the Delta mode of the Bohlen-Pierce scale.
KG gives Bohlen's names based on the Gamma mode of the Bohlen-Pierce scale.
PBP gives van Prooijen's names for the Bohlen-Pierce scale.
EITZ gives Carl Eitz's notation with fractional comma alterations.
JI gives a commatic notation for rational pitches.
JI2 gives a commatic notation for rational pitches with other commas.
SAJI1 gives the Athenian (medium precision) Sagittal notation for scales with mostly rational pitches.
SAJI2 gives the Herculean (high precision) Sagittal notation for scales with mostly rational pitches. (Under construction)
SAJI3 gives the Olympian (extreme precision) Sagittal notation for scales with mostly rational pitches. (Under construction)
SA12R gives the Trojan (medium precision) Sagittal notation relative to 12-ET sized fifths.
SAHTT gives the Sagittal high-tolerance temperament notation.
SA<n> give the Sagittal system equal temperament notations (sometimes using non-native fifth).
SA<n>N give the Sagittal system equal temperament notations (using native fifth).

A scale pitch must not be further removed from an equal tempered step than the relative value set with SET TOLERANCE. Otherwise no name will be given. To increase from its default value of 1/3, do for example SET TOLERANCE 1/2.
In order to obtain names that make sense, it's important to choose a system which has pitches in the neighbourhood of all pitches of the scale. To find out for which equal temperaments that is, you can use FIT/MODE.
The name for scale degree 0 or 1/1 may be changed after doing this command. For example to start at D instead of C, do SET OFFSET D. When the notation system is changed after having changed the offset, remember that the pitch equivalent of the name remains the offset for the new system, unless SET OFFSET is done again.

The number of steps for the fifth in equal temperament based notations, but not the Sagittal ones, can be changed with the SET FIFTH command. It can also be changed in scala.ini if this key is put in first: ET_Notation_Use_Alt 1 And then for example like these: ET_Alt_C1200 696 ET_Alt_E64 38 To view all the note names in one of these systems, use this command to select the system, then get the corresponding equal tempered scale with the EQUALTEMP command (except for the Indian names) and do SHOW. For the Bohlen-Pierce scale do EQUAL 13 3. For the Indian names use LOAD to obtain one from file, or you can do EQUAL 53. For the Persian names do LOAD persian, or do EQUAL 36.

For most names, one enharmonic equivalent is given too. The absence of graphic symbols poses restrictions, so the following equivalents were chosen for the notations whose name begins with an E:
# semitone sharp (Pythagorean semitone)
b semitone flat (Pythagorean semitone)
x two semitones sharp
bb two semitones flat
| semitone fraction sharp (1/n semitone = one step)
; semitone fraction flat (1/n semitone = one step)
#| 1+1/n semitone sharp
b; 1+1/n semitone flat
/ comma sharp
\ comma flat
> comma fraction sharp (1/n comma = one step)
< comma fraction flat (1/n comma = one step)
) diesis sharp
( diesis flat
-) diesis fraction sharp (1/n diesis = one step)
(- diesis fraction flat (1/n diesis = one step)
^ diaschisma sharp
v diaschisma flat
7 septimal comma sharp
L septimal comma flat
] undecimal comma sharp
[ undecimal comma flat

In Scala version 2.2 and higher, the equivalence of the above and graphic symbols is listed for several different notations in Help:Legend: accidentals. For the Carnatic system C12 the uppercase characters represent the natural (suddha) tones. Note that in Hindustanic notation often the lowercase m represents suddha Ma and an uppercase M tivra Ma, just the other way around.

For the Persian system P17 Vaziri's notation is used:
# sharp (about +100 cents)
b flat (about -100 cents)
> sori (about +70 cents)
p koron (about -70 cents)
The same symbols are used for P24, only > and p are then a quartertone.

For the Turkish system T24 the Arel-Ezgi-Uzdilek notation is used. These are the chosen equivalents for the graphic symbols:
| one comma sharp (about 23 cents), a vertical line with two horizontal lines through
d one comma flat (about -23 cents), a reversed flat sign
# small semitone sharp (4 commas, 90 cents)
b- small semitone flat (-4 commas), a flat sign with one horizontal line through
#| large semitone sharp (5 commas, 114 cents), a vertical line with three horizontal lines
b large semitone flat (-5 commas)
## small whole tone sharp (8 commas, 180 cents), two vertical lines with three horizontal lines
b= small whole tone flat (-8 commas), a flat sign with two horizontal lines
x large whole tone sharp (9 commas, 204 cents)
bb large whole tone flat (-9 commas)
It is necessary to use SET OFFSET to change the first tone to the finalis.

For the notation system V31 these extra accidentals are used:
' 1/4 comma sharp (about +5.4 cents)
` 1/4 comma flat (about -5.4 cents)
This notation system is dedicated to Margo Schulter and Nicola Vicentino.

The notation YA36 by Ozan Yarman for Turkish makam music has the following symbols:
| quartertone sharp
d one comma flat
< bakiye (limma) sharp
b- quartertone flat
# mücenneb-i sagir (apotome or minor semitone) sharp
b mücenneb-i sagir (apotome or minor semitone) flat
> mücenneb-i vusta (middle second) sharp
b+ mücenneb-i karin (major semitone) flat
## mücenneb-i kebir (minor tone) sharp
b= mücenneb-i vusta (middle second) flat
x double sharp
bb double flat

In the Richter Herf-system R72 (and R144) the meanings are:
/ 1/12 tone sharp (+16.7 cents)
\ 1/12 tone flat (-16.7 cents)
7 1/6 tone sharp (+33.3 cents)
L 1/6 tone flat (-33.3 cents)
^ 1/4 tone sharp (+50 cents)
v 1/4 tone flat (-50 cents)

The notation system M72 was made by Manuel Op de Coul and can also be used for 31-, 41-, 51- and 72-tone equal temperament and 11-limit just scales or 11-limit based temperaments. It has 11 naturals in the octave. Similar is Graham Breed's decimal notation system which uses 0 .. 9 as names and the comma and diaschisma accidentals. The diaschisma happens to have the same number of steps as Breed's 'q'.

For the notation system A144 these extra accidentals are used:
} 1/6 tone sharp (+33.3 cents)
{ 1/6 tone flat (-33.3 cents)
| 1/4 tone sharp (+50 cents)
d 1/4 tone flat (-50 cents)
This system is by the author, and meant to be useful as an ASCII notation system for 36-, 48-, 72- and 144-tET. The accolade '}' was chosen for its resemblance to the number 3 (it represents 1/3 semitone). The other symbols syntonic comma fraction, syntonic comma and diaschisma are as above.

The notation systems JI and JI2 give names for exact rational pitches with primes not higher than 31. There is no range of tolerance. The 3-limit names are Pythagorean. The accidentals following represent higher limit commas. It's similar to Eitz's notation system. The following symbols were chosen; the '7' is not to be put in a context where it could be confused with an octave number or seventh chord. For primes 13 and higher, the system JI2 uses different commas than system JI:
/ comma sharp, 81/80
\ comma flat, 80/81
) diesis sharp, 128/125
( diesis flat, 125/128
7 septimal comma sharp, 64/63
L septimal comma flat, 63/64
] 33/32
[ 32/33 JI2:
| 27/26 1053/1024
; 26/27 1024/1053
#' 17/16 2187/2176
b' 16/17 2176/2187
% 19/18 513/512
d 18/19 512/513
@ 24/23 736/729
* 23/24 729/736
#! 29/27 261/256
b! 27/29 256/261
|' 32/31 248/243
;' 31/32 243/248

The EITZ notation system gives names to rational pitches with primes not higher than 5 and to pitches which are close to a low denominator fraction of a comma different from just. There is no range of tolerance. The 3-limit names are Pythagorean and they are followed by the number of syntonic commas. If this is zero, it's normally written in the Eitz notation, but omitted here. Fractions of a Pythagorean comma are indicated with a 'p'. This notation system is useful for meantone and circulating temperaments and 5-limit just tunings.
The Sagittal accidentals are too numerous to be explained here. See the Sagittal website for more information.

Setting notation also influences output of the command CHORDS.
See also REPLACE/NOTATION and SET FIFTH.

SET OFFSET  [notename-or-pitch]
Specify the note name to use for scale degree 0 of 1/1. The notation system must be set first with SET NOTATION. The notename parameter must be a name in the current notation system. The pitch belonging to the name will subsequently be used as offset wherever a note name is displayed. Instead of a name, a ratio or value in cents may also be given. Without parameter, the offset is reset to 1/1 which is C in notation systems beginning with an E. When changing notation systems with SET NOTATION, you should do SET OFFSET again, although this is not always required. If the notation system is JI, a rational offset value must be given, otherwise no names will be displayed. To see the current offset, use SHOW NOTATION.
This command does not influence the commands ECHO (output of the lexical functions), EXAMPLE and REPLACE/NOTATION.
SET ONERROR  (STOP | CONT)
Specify to stop or to continue in case of an error while executing an external command file (see @) or ITERATE command. The initial setting is STOP.

SET PAUSE  (ON | OFF)
Enable or disable the pause during scrolling. The initial setting is ON.

SET PITCH_BEND  (ON | OFF)
For the command EXAMPLE/MIDI. If it is OFF, then no MIDI pitch bend messages from the input file will influence the output file. Otherwise they will be added to the pitch bends for the tuning. This is necessary for retuning an already retuned MIDI file. It can also be useful for complex MIDI files. The initial setting is ON.

SET PRESET  number
The MIDI Tuning Standard dump format contains a program/preset number with a range from 0 to 127. The initial value is 0. Instruments sometimes support a number other than 0, for example the MOTM-650 MIDI-CV converter can store 11 tunings. The only Scala synthesizer numbers for which it has effect are 107, 113 and 116. It also stores this setting when creating MIDI files with EXAMPLE/MTS.
Set it before using the SEND command. The current value is shown with SHOW SETTINGS. No checking is done whether the number is in the supported range for the instrument type. See also SET DEVICE_ID and SET SYNTHESIZER.

SET PROGRAM  (ON | OFF)
For the commands EXAMPLE/MIDI and EXAMPLE/CREATE. If it is OFF, then no MIDI program change messages will be put in the output file. This can be useful for instruments that have a slow response to these messages which causes notes to be lost. The initial setting is ON.

SET RECIPROCAL  factor
This is a multiplication factor for the factor shown with SET ATTRIBUTE RECIPROCAL. The initial value is 1.0. If it is set to the string length for degree 0 of 1/1, then the given factors represent absolute string lengths. Remember to do SET ATTRIB RECIPROCAL after this. Remark: more accurate string lengths may be obtained with SHOW STRINGLEN. For lengths of organ pipes, the values are inadequate since they require an end correction. However if the pipes have the same width and shape, a constant end correction can be subtracted from the reciprocal values.
This value is the same as used for SET ATTRIBUTE FACTOR, so this command is synonymous with SET FACTOR.

SET SAGITTAL  (PURE | MIXED | LONG | SHORT)
Switches the graphical (PURE | MIXED) and ASCII (LONG | SHORT) forms of the Sagittal notations. PURE means that the sharps and flats are also Sagittal symbols and combinations with them are always a single symbol. MIXED means that the sharps and flats have the regular symbol and may appear next to a single-shaft Sagittal symbol. In PURE mode, LONG means that multiple shafts are shown in ASCII as multiple copies of the characters "|" (up) or "!" (down), while SHORT shows double shafts as the single character "N" (up) or "U" (down) and triple shafts as "M" (up) or "W" (down). In MIXED mode, only the single-shaft sagittal symbols are used, so in this case SHORT means that the most common single-shaft sagittal symbols are shown using a single ASCII character, e.g. C/|\ becomes C^. Two keywords may be given at the same time and they cannot be abbreviated. The initial settings are PURE and LONG.
See also SET NOTATION. To retain this setting, put this command in startup.cmd.

SET SEPARATOR  [string]
Set a string to be used as separator between output of subsequent commands. Initial value is a vertical bar (|). Default value is an empty string, which gives no separation.

SET STEP_UNIT  interval
This is the equal tempered step size for the difference shown with SET ATTRIBUTE STEP_DIFF. The initial value is 100 cents. Remember to do SET ATTRIB STEP after this. Is also used with the ET_STEP attribute. See SHOW ET_DIFF for a similar operation without this attribute setting.

SET SYNTHESIZER  type
Set the current synthesizer type. Use SHOW SYNTHESIZER to get a list of the supported types and their numbers. The parameter is the type number it has in this program, but a name string may also be given. That will then be searched in the list of names and the first match returned. If you give multiple words, they must be surrounded by quotes. The initial type number is 0, unless another is set in file scala.ini. Type numbers 1 .. 100 can be defined in parameter file synth.par. The rest are hardcoded in the program, and among them are many softsynth formats which produce a text file instead of a MIDI file. If you have a synth that is not yet supported in Scala, please send the technical details to the author, who can then add support. See also SEND and SET DEVICE_ID.

SET TOLERANCE  factor
Set the tolerance value for notation. The value is relative to the corresponding equal tempered step size of the selected notation system. The initial value is 1/3. It means that the absolute logarithmic difference between a pitch and the nearest pitch in the notation system may not exceed the given factor times the step size, or no name will be given. So for an exact match use 0. This value has no effect for notation systems not for equal temperaments which are S5, P7, P17, I22, JI, JI2, SAJI1 .. SAHTT and EITZ. Otherwise this value affects all situations where a notation system is used. See also SET NOTATION, SHOW NOTATION and REPLACE/NOTATION.
Secondly, this value is used to determine the allowable range for chords to be found with the SHOW LOCATIONS command.

SET UNIT  (ON | OFF)
Enable or disable displaying a unit name after a value, like "cents" or "Hertz" for the commands SHOW SCALE, SHOW CYCLE and SHOW BESTCYCLE. The initial setting is ON.

SET WEIGHTING  factor
Change the weighting factor used in the commands APPROXIMATE/WEIGHTED and APPROXIMATE/CONSISTENT. The optimality criterion (which is minimised) is the sum of the absolute pitch difference and the weighting factor multiplied with the attribute value of the tested ratio. So if the weighting factor is higher, then the harmonicity value weighs more and the pitch difference less. It's also used by APPROXIMATE/MOULD. This value and other settings can be viewed with SHOW SETTINGS.


SHOW

SHOW (SCALE | ANGLE | ATTRIBUTE | BEATS | BESTCYCLE | COMBINATION | CYCLE |
      DATA | DESCRIPTION | DIFFERENCE | DISTANCE | ET_DIFF | EXPLIMIT |
      HARMCONST | INTERVALS | LOCATIONS | MAPPING | NEAREST | NOTATION | 
      PITCH | SETTINGS | SHIFTS | STRINGLEN | SYNTHESIZER | TEMPERINGS | 
      TIME | TRANSPOSE | VERSION)
SHOW SCALE  [scalenr.]
Show the pitches of the given or current scale with the attribute that was set with the command
SET ATTRIBUTE and interval name if rational. The option SCALE is default so a SHOW or SH command is enough to show the current scale or a scale memory. Instead of a scale number a filename can be given which then shows the scale in the file, without affecting the current scale. The first degree to be shown can be set with SET FIRST or given in scala.ini. See also SET INDEX, SET NAME and SET UNIT. Pitches can be left-justified or centred, see scala.ini: Show_Centered. If a filename is given with wildcards, then all matching scales will be shown, by implicitly converting the command to an ITERATE command and using the highest scale as storage.
   /CENTS
Show the pitches in cents with the interval name if rational. Can be used in combination with /LINE and /INTERVAL.
   /INTERVAL
Show the intervals between two scale degrees with a constant number of steps in between. The initial setting is between a degree and the previous one. This can be changed by doing SET INT_STEPS. See also SET ATTRIBUTE INTERVAL. The values of attributes shown correspond to the displayed interval sizes. Can be used in combination with /ATTRIBUTE, /CENTS, /ET_DIFF, /LINE and /NOTATION. See also SHOW/LINE INTERVALS to see intervals grouped by scale degree.
   /ET_DIFF
Show the pitches with deviation in cents from the equal tempered values which are derived from the current scale size. It works the same as doing SET ATTRIBUTE DIFF_ET and then SHOW SCALE, but the current attribute is not changed. Can be used in combination with /INTERVAL.
   /FREQUENCY
Show the absolute frequency of the pitches in Hertz and in number of octaves above 1.021975 Hertz. The latter is the same as the oct value of Csound and SAOL, also given with /OCTCPS. The third column is a fictive fractional MIDI note number where Middle C is 60. The fourth column contains the absolute frequencies expressed in Ellis, which is the number of cents relative to the 64-foot C (16.3516 Hz), with the number of octaves written (as a subscript) in front of the number of cents. For example the A at 440 Hz is shown as 4 900 El.
The base frequency used is the one set with SET FREQUENCY. The initial base frequency is set by key C_Freq in scala.ini (default 261.6255653 Hertz). Note that frequency can also be shown as an attribute with SET ATTRIBUTE FREQUENCY. A fixed value independent of SET FREQUENCY can be also used with for example: SET ATTRIBUTE FACTOR 261.6256. Can only be combined with /LINE.
   /HERTZ
As with /FREQUENCY but shows only the value in Hertz. Cannot be combined with other qualifiers.
   /MTS
Shows the frequencies in MIDI Tuning Standard units. Cannot be combined with other qualifiers.
   /OCTCPS
As with /FREQUENCY but shows only the Csound cpsoct value. Cannot be combined with other qualifiers.
   /CHORD
The scale must be rational. Shows the frequency multiples like 4:5:6. Cannot be combined with other qualifiers.
   /LINE
Show pitches or intervals consecutively on one or more text lines. Can be used in combination with /CENTS, /FREQUENCY and /INTERVAL. To see the pitches expressed as factors consecutively, use the command ECHO listfactor(0)
   /ATTRIBUTE
Does not show the pitches but only the attribute value for each degree. Afterwards it shows arithmetical averages of the attribute values. If the attribute is not numerical then no averages are given. Can only be combined with /INTERVAL.
   /NOTATION
Does not show the pitches but only the note name for each degree according to the current notation system. They are shown consecutively on one or more text lines. If there is no note name, a double underscore (__) is shown. See also SET NOTATION. Can only be combined with /INTERVAL.

SHOW ANGLE  pitch  pitch  [ignore-prime]
Show the angle between the harmonic vectors of two rational pitches. By default, prime 2 is ignored, but another prime can be specified. If no primes are to be ignored, enter 1. The angle is given in degrees and will always be between 0 and 180 degrees.

SHOW ATTRIBUTE  [attribute]
Show the current attribute, together with its secondary parameter, if applicable. If an attribute is given, then show its description instead. See also SET ATTRIBUTE and SHOW SETTINGS.

   /ALL
Show the descriptions of all attributes. The current attribute is marked with an arrow.
SHOW BEATS  interval-list
Show the beat frequencies on each tone of the current scale for the given interval(s). The intervals in the list with a maximum of 12 are separated by spaces and only ratios are allowed. But they can be separated by colons as well. In that case the values are read as linear factors, for example: 4:5:6:7. See also
CHORDS. If the interval list is enclosed in parentheses, then this means the inversion, for example (4:5:6) means 10:12:15.
The frequencies are given in Hertz and relative to the base frequency set with SET FREQUENCY. The beats are given for the nearest pitch in the scale that is the given interval away from each degree. If it's lower, then the frequency has a minus sign. Example: to show the beat frequencies of fifths, fourths and major thirds type: SHOW BEATS 3/2 4/3 5/4 To see the beats of more octaves, use SHOW/MAP BEATS with a linear keyboard mapping. Warning: for sounds with an inharmonic spectrum, perceived beat frequencies may be different. See also SHOW TEMPERINGS and REPLACE/GIVENBEATS.
   /RELATIVE
Instead of frequencies in Hz, show the beat frequencies relative to the base frequency, so if one multiplies them with the base frequency, the absolute frequencies are obtained. If the interval list has two intervals, then the ratio between the first and second beat frequencies will also be given. The fourth column then contains the ratio between the beat frequency of the intermediate interval and the beat frequency of the first interval. And the fifth column the ratio between the beat frequency of the intermediate interval and the beat frequency of the second interval.
For example if 5/4 and 3/2 are given, the latter two are the ratios of beat frequencies of 6/5 and 5/4, and 6/5 and 3/2 in the triad. See also brats.cmd. Can only be combined with /SCALE.
   /PBP
Instead of frequencies in Hz, show the beat frequencies relative to the scale pitches themselves, in terms of percentage. Can only be combined with /SCALE.
   /MAPPING
Show the beat frequencies on each keyboard key for the current scale and the current keyboard mapping. The base frequency is determined by the keyboard mapping. If the nearest scale degree for a given interval is not mapped to a key, then "--" is displayed. See also Mappings and SHOW/MAPPING LOCATIONS. Can only be combined with /SCALE.
   /METRONOME
Show metronome markings in cycles per minute, for cycles of 1 to 5 beats. Minus signs will not be shown. For each interval five colums will be given, so with more than one interval you'll get quite wide output. With this method a simple metronome is sufficient to get very accurate temperings. Can only be combined with /SCALE.
   /SCALE  scalenr.
Instead of an interval list, give a scale number or filename and show the beats for the intervals from that scale.
   /TEST
Show pairs of intervals which have an equal beating frequency for intervals in the given interval list. After tuning an instrument, the tuning can be checked for accuracy by comparing the beating frequencies of intervals which should beat in the same tempo. This command will find such possible tests like the Nix tuning test, which compares a major sixth which encloses a major third in equal temperament, for example D-F# inside C-A. For harpsichords, use the following command: SHOW/TEST BEATS 6/5 5/4 4/3 3/2 5/3.
If the beat rates are within 2% of each other, they will be shown. Intervals in the range of one octave below to one octave beyond will be compared. Trivial octave inverse results will not be shown. The frequencies are given in Hertz and relative to the base frequency set with SET FREQUENCY. Only beat frequencies in the range of 0.1 to 16 Hz will be given. The intervals are indicated by the scale degree numbers of the two tones, and their note names in the current notation system. Can only be combined with /SCALE.

SHOW BESTCYCLE  [scalenr.]
Show the difference of the fifths in the current scale from a least-squares optimal fifth. Enter the fifth degree. The difference between each fifth and the optimal fifth is given in cents. Also given is the best starting point for the cycle of fifths and the resulting standard deviation which was optimised. See also SHOW CYCLE.
   /INTERVAL
Show the difference between each fifth and the least-squares fifth instead of the cumulative fifth.

SHOW COMBINATION  interval  [scalenr.]
Show all pairs of pitches in the current or given scale whose sums or differences are equal to the given interval. This can also be done for pairs of intervals in file intnam.par. Instead of a scale number a filename can be given. You can do first LOAD intnam.par but this is not necessary. For example: SHOW COMBINATION 25/24 intnam.par.
The given interval is not automatically reduced by 2/1, if it's larger then you might do this first yourself to get more results.
   /SMALLER  interval  [rel-size]
Show all combinations of two both simpler and smaller intervals than the one given, whose sum is equal to it. With simpler meaning with smaller prime exponents. At least one interval of the pair has to be smaller. If there are no such combinations, nothing will be shown. The treshold for the logarithmic size of the shown intervals can be set with the second parameter whose default value is 1, which means one times the given interval. It can be any positive number.
   /BRIDGE  interval  [rel-size]
Same as /SMALLER, except that the intervals shown on the left will be so-called bridge commas, i.e. the highest prime exponent is either 1 or -1, but they are not necessarily small intervals.

SHOW CYCLE  [scalenr.]
Show the difference of the fifths in the current scale from a given fifth. Enter the formal fifth to compare against and the fifth degree. The default value is 3/2. The default fifth degree is the nearest degree to the given fifth. The difference between each fifth and the cumulative fifth is given in cents. Next to that, the difference is given in Temperament Units. One TU is 1/720 part of a Pythagorean comma. A cycle closing at the octave will therefore have to distribute -720 TU over the complete cycle. A syntonic comma is 660 TU. Also if there is a name for the difference interval, it will be shown. If the fifth degree does not make a complete cycle in the scale then this will be indicated. However the program will try to continue by skipping one scale degree backward or forward, whichever will be nearest to the given formal fifth.
   /CENTS
Show the fifths of the scale in cents instead of as ratio.
   /INTERVAL
Show the difference between each fifth and the given fifth instead of the cumulative fifth.
   /COMMAPARTS
Will show the difference between each fifth and the given fifth expressed as rational parts of either the syntonic comma (shown as a plain ratio or integer), the Pythagorean comma (indicated by 'P'), or the schisma (indicated by 's'). If there is no rational approximation with a denominator smaller than or equal to 36, the difference is displayed in cents. The tones are shown by their note names in the current notation system, but the tolerance setting is ignored.

SHOW DATA  [scalenr.]
Show a list of properties and quantities of the given or current scale. Which properties are presented on the screen depends on the number of notes and whether the scale is rational or partly rational or not. Below is the complete list of it. At the left is the condition where n is the number of notes and "rat" means that the scale must be rational. The trivial condition n>0 is not indicated.

Number of notes
Smallest interval
Average interval
Average / smallest interval
Largest interval
Largest / average interval
Largest / smallest interval
Least-squares average interval
Number of one step interval sizes
Median interval of one step
n>1 Most common interval of one step
Whether scale has Rothenberg's propriety: strictly proper, proper or not
n>1 Whether scale has Myhill's property and which are possible generators
n>1 Whether scale has trivalence property (three interval sizes per interval class)
n>1 Whether scale has maximal or distributional evenness
Whether scale consists of repeating interval blocks or is equal tempered
n>1 Whether scale is a mode of an equal temperament
n>1 Whether scale is a Winograd/Gamer deep scale
n>=1 Whether scale is a Constant Structure
n>1 Whether scale is an Agmon diatonic system
n=2..120 Rothenberg stability (if proper)
n=2..120 Lumma stability
n=2..120 Lumma impropriety factor
n>1 Rothenberg efficiency (if computing time not prohibitive) Interruptable by Ctrl+C.
n>1 Whether scale is an addition chord
n>2 Whether scale is sum-free
n=2..72 Interval pattern ordered alphabetically
n=2..72 Interval pattern ordered by size (A = smallest, or SML = Small, Medium, Large)
n=7 Whether scale is an octave species of an abstract tetrachord and which one(s)
n>=7 Whether scale contains two identical tetrachords
n=12 Whether scale is well-tempered and how many different fifths it has. It means no fifths larger than and major thirds smaller than pure.
n=12 Whether scale is a tempérament ordinaire (certain modified meantone).
n=12 Whether scale has a monotonous distribution of thirds proceeding over the circle of fifths, i.e. growing and shrinking only once
n=2..120 Whether scale is a Constant Structure (Wilson) and by which interval margin
n=2..120 Number of different intervals and ratio to n-1 Interruptable by Ctrl+C.
n=2..120 Interval vector (if scale is mode of ET but not ET)
n=2..120 Smallest interval difference (if not equal temperament)
n=2..120 Most common interval and amount (its inverse is equally common)
n=2..120 Number of recognisable fifths (between 4/7 and 3/5 octave) and their average size
n=2..120 Number of recognisable fourths (between 2/5 and 3/7 octave) and their average size, if octave is not 2/1
n=4..120 Whether scale is a chain of identical triads
n=4..120 Most common triad and amount
n=2..120 Whether scale is differentially coherent
Limited transpositions
Limited inverse transpositions
Inversional symmetry on degrees
Inversional symmetry on intervals
Number of pitches' octave complements present
rat Prime number limit
rat Odd number limit, otonal and utonal odd limit
rat Barlow's harmonicity
rat Barlow's average harmonicity
rat Barlow's specific harmonicity
rat Common denominator and fundamental frequency
rat Common multiple and guide tone frequency
rat Exponens Consonantiae
rat Euler's gradus suavitatis
rat Mersenne's number of equal string divisions
rat Vogel's harmonic complexity
rat Wille's k value
rat Wilson's harmonic complexity
rat Sum of van Prooijen's harmonic expressibility
rat Sum of Tenney's harmonic distance
rat Sum of Mann's harmonic distance
rat Rectangular lattice dimensions
rat Triangular lattice dimensions
rat Lattice compactness
rat Lattice compactness (without prime 2)
rat Whether scale is a complete genus musicum and which one
rat Whether all steps are superparticular
rat Longest harmonic series fragment and where
rat Longest subharmonic series fragment and where
rat Whether scale is JI-epimorphic with which mapping(s)
rat Prime exponents' range, average and prime limit counts
Interval standard deviation
Interval skew (= third moment of mean)
Average distance from equal tempered
Standard deviation from equal tempered
Maximum distance from equal tempered
Geometric average of pitches 0..n
Arithmetic average of pitches 0..n
Harmonic average of pitches 0..n
Geometric average of pitches 1..n
Arithmetic average of pitches 1..n
Harmonic average of pitches 1..n
n>1 Geometric average of pitches 1..n-1
n>1 Arithmetic average of pitches 1..n-1
n>1 Harmonic average of pitches 1..n-1
Instead of a scale number a filename can be given which then shows data of the scale in the file, without affecting the current scale. See Help:Show data info or the file
tips.par for explanations of these properties and quantities.

SHOW DESCRIPTION  [scalenr.]
Show the description of the current or given scale. A filename can also be given. See also SET DESCRIPTION.

SHOW DIFFERENCE  scalenr.
Show the differences of the pitches in the current scale with those of the given scale. If the scales do not have the same number of notes, then the smaller scale is implicitly octave-extended to the size of the larger scale. So the number of notes compared equals the size of the largest scale. Average values are also given. The differences shown are those that would result from a SUBTRACT operation. Instead of a scale number a filename can be given.
   /FREQUENCY
Show the differences of the pitches in terms of beat frequencies (of the tones themselves, not their partials). These are calculated relative to the value given with
SET FREQUENCY.
   /NEAREST
Show the differences not between corresponding scale degrees but between each pitch of the current scale and its nearest counterpart in the given scale. The degree numbers of both scales are shown. The beat frequencies are also shown. At the end the number of pitches which are different is given and the mode is displayed which forms the selection of nearest pitches from the given scale. See also MODE.
The given scale may not be empty. If combined with /FREQUENCY the output is the same.
   /LARGEST
As above, but only show the pitch(es) with the largest deviation from their counterpart in the given scale. Cannot be combined with other qualifiers.

SHOW DISTANCE  pitch  [position]
Show the distance of the given pitch to the nearest pitches and intervals in the current scale and the beat frequencies. The given pitch may be in octaves higher than the scale, but below 1/1 no near degrees will be found unless the scale contains them. This is in case no position parameter is given, the default is degree zero and the pitch is relative to 1/1. Another position can be given to find the degree of the nearest interval starting on that position, which can also be negative. The distance will be displayed in cents and Tuning Units, which is 1/720 part of the Pythagorean comma. The distance to intervals will not be given if the scale has more than 100 tones.
The beat frequencies are calculated relative to the value given with SET FREQUENCY. If the given pitch is rational, then the beat frequencies between the corresponding partials will be given. If the nearest scale pitch is rational, then the beat frequencies for those partials will be given too. See also
SHOW/NEAREST DIFFERENCE and SHOW TEMPERINGS.

SHOW ET_DIFF  division  [octave]
Show for each pitch in the current scale the nearest step of the given equal temperament. This ET is the given formal octave (also called modulus or interval of equivalence) divided into the given number of steps (division). The division may be either a positive integer or floating point number. If the octave parameter is not given, 2/1 is assumed. The differences are given in cents and number of steps. Average values are also given. See also SHOW DIFFERENCE, SHOW/ET_DIFF INTERVALS, SHOW/ET_DIFF SCALE and DIVIDE/FIND.
   /CONSISTENT
Instead of the nearest steps, show the consistent steps for all rational pitches. For nonrational pitches, the nearest steps are shown. See also DIVIDE/CONSISTENT and QUANTIZE/CONSISTENT.

SHOW EXPLIMIT
Show the exponent limit(s) of the primes used for rational approximation. The initial limits are 31 for all primes. Note that the practical limits are lower for each prime other than 2 because the highest integer is 231 - 1. Also the default prime limit is given, see SET LIMIT. The prime count is set by Prime_Count in scala.ini (default 10 which is 29-limit). See also APPROXIMATE.

SHOW FREQUENCY
Show the current base frequency and the one which can be obtained with POP/FREQUENCY. See also SET FREQUENCY and PUSH/FREQUENCY.

SHOW HARMCONST
Show the harmonicity coefficient(s) of the primes used. See also SET HARMCONST.

SHOW INTERVALS  [scalenr.]
Show all intervals between all pairs of pitches in the given or current scale. They are grouped by interval class (distance in position). Instead of a scale number a filename can be given which then shows the intervals of the scale in the file, without affecting the current scale.
   /ATTRIBUTE
Also shows the attribute of each interval, see
SET ATTRIBUTE. If the current attribute is INTERVAL, MULTIPLE, OTHER_SCALE or SUBMULTIPLE, it cannot be shown. If it is CENTS or NONE then the output will not be different. For each interval class, the average of the attribute values (taking the number of occurrences into account) will also be shown. Can only be combined with /DIFFERENCE and /LINE.
   /LINE
Show the intervals grouped by scale degree consecutively on lines. First given is the pitch of the starting degree followed by all the intervals relative to that degree. This is also called the interval matrix of a scale. If it is combined with /ATTRIBUTE, then the current attribute for all the intervals will be shown. Can only be combined with /ATTRIBUTE and /CENTS.
   /CENTS
In combination with /LINE, show the intervals in cents.
   /DIFFERENCE
Show the differences in interval sizes for intervals of the same interval class (distance in position). Only differences between adjacent interval sizes in their sorted order as shown by SHOW INTERVALS is shown. If there's only one size for an interval class, nothing is shown. If scale number 1 is empty, then the sorted list of differences will be copied to it. If not, it will be copied to scale number 2.
This qualifier is useful for finding defining intervals for periodicity blocks, see PIPEDUM. It can only be combined with /ATTRIBUTE.
   /ET_DIFF
Show the difference in cents of the intervals with the equal tempered interval consecutively on lines, grouped by scale degree. First given is the pitch of the starting degree followed by all the intervals relative to that degree. See also SHOW ET_DIFF. Cannot be combined with other qualifiers.
   /RANKING
Show the size ranking of the intervals grouped by scale degree consecutively on lines. First given is the pitch of the starting degree followed by all the ranking numbers of intervals relative to that degree. This is also called the interval rank order matrix of a scale. Cannot be combined with other qualifiers.
   /SPAN
Show the smallest and largest interval in cents for each interval class. In the next column, their difference which is the size of the span is shown. And the last column is the "gap" between the interval class ranges. If it overlaps with the previous class, then this value is smaller than 1/1. Cannot be combined with other qualifiers.
   /TOTAL
Shows all intervals between all pairs of pitches in the given or current scale but they are not grouped by interval class but by interval size. If an interval size is unique to one interval class, then the class number is also given and an asterisk if it is not (then it's called ambiguous). The total number of incidences of each interval is given with it. If there are ambiguous intervals, the number of different ones, and the total number of them is given. Cannot be combined with other qualifiers.
   /TRANSPOSE
Show the difference in cents of the pitches after transposition by consecutive interval classes. Cannot be combined with other qualifiers.

SHOW LOCATIONS  interval-list
Show the degree(s) where the given interval combination (chord) is present in the current scale. For each occurrence the number of steps and the begin and end degree is shown. If one of the intervals only approximates an interval in the scale, the difference(s) are also given. The maximum width of the range is determined by the SET TOLERANCE command, so if the tolerance factor is set to 1/3, then the maximum difference is one sixth of the average one-step interval in the scale.
The intervals in the list are separated by spaces or colons. In the latter case the values with decimal points will be read as linear factors instead of cents values, for example 4:5:6:7. See also CHORDS. If the interval list is enclosed in parentheses, then this means the inversion, for example (4:5:6) means 10:12:15.
If the current attribute is NOTATION then an extra line is shown with the note names of the chord position. See also SET NOTATION. Then the number of chords found is displayed, followed by "covered degrees" which is the number of scale degrees present in any of the chords, followed by the number of degrees present in more than one chord, and the highest coverage (amount of times present). Octave equivalence is assumed here. The interval class pattern (number of steps for each chord interval) doesn't need to be the same for each chord occurrence, so the number of different patterns is displayed. Then the total, average and highest differences are given which is the sum over one chord.
If the current scale is a linear temperament (has Myhill's or pseudo-Myhill's property) or an equal temperament, then the size of the minimal covered scale for the given chord will also be given. This means that the occurrences of the chord in a scale with the same generator of that size will cover all pitches in the scale.
   /DIFFERENCE  [interval-class]
Show the locations of the difference tones on each scale degree of the current scale for the given interval class. The default interval class is 1, which means one scale step. If a location is shown for each degree, then the scale is differentially coherent, see SHOW DATA. The maximum difference is determined by SET MAXDIFF, see above. Because difference tones (beats) will be much lower than scale tones, the shown locations will usually be below degree 0. Shown are the locations of the difference tone between the next (i + class) and the current (i) scale degree. The scale must be in ascending order. See also EQUALTEMP/DIFFERENTIAL. Cannot be combined with other qualifiers.
   /MAPPING  interval-list
Show the MIDI keys where the given interval combination (chord) is present in the current scale and with the current keyboard mapping. Unmapped scale degrees will be skipped in the search. If one of the given intervals only approximates an interval in the scale, the difference(s) are also given. The range is determined by SET TOLERANCE, see above.
See also Mappings and SHOW/MAPPING BEATS. Can only be combined with /SCALE.
   /MODE  name-pattern-or-mode
Instead of an interval list, give a mode pattern as used in the MODE command. A mode name can also be given. The given mode selects the intervals from the current scale, and that interval pattern will be searched. The combination at degree 0 will therefore always be found. So be aware the mode is not from an equal temperament (if the scale isn't), for that purpose use the qualifier below. Cannot be combined with other qualifiers.
   /EQUALMODE  name-pattern-or-mode
Instead of an interval list, give a mode pattern of an equal temperament. The current scale must be a mode of an equal temperament. To see if it is, use FIT/MODE and look if the last scale given has a SD of 0.00 cents. This will also indicate the division selected for this command. A mode name can also be given. Example: check the positions of tetrads with relative interval sizes: SHOW/EQUALMODE LOCATION 2 2 1.
Be careful if you give a mode name that's not a mode of the same division as the scale or a submultiple of it, because then the located intervals may be different from what you expect. A warning message is given then.
If the standard deviation shown with FIT/MODE is not zero, then QUANTIZE can be done first. Cannot be combined with other qualifiers.
   /RANGE  low-interval  high-interval
Show all occurrences of single intervals which are in the given size range. Cannot be combined with other qualifiers.
   /SCALE  scalenr.
Instead of an interval list, give a scale number or filename and use the intervals from that scale to search in the current scale. Cannot be combined with /MODE, /EQUALMODE or /RANGE.
   /SUBSET  interval-list
Also shows partial matches with the interval list. See also SHOW/PRESENT SHIFTS. Cannot be combined with /MODE, /EQUALMODE or /RANGE.

SHOW MAPPING  [filename-or-first-note]  [last-note]
Show the current keyboard mapping if no filename is given, otherwise show the mapping in the file without affecting the current mapping. Middle indicates the MIDI note number to which scale degree 0 is mapped. The initial value is 60. Reference indicates the master frequency and the note number which will receive this frequency. The initial values are 261.6256 Hertz to note number 60. Octave degree is the degree which is considered to be the formal octave. This formal octave is the difference in pitch between two adjacent instances of the mapping pattern. A value of 0 means that the last pitch of the current scale is considered to be the formal octave. The initial value is 0. If the current mapping is not linear, you will see in the left column a list of scale degrees for each MIDI key. An unused key is indicated with two hyphens. The second column contains a list of keys for each mapped scale degree. And if the current scale is not empty, the corresponding scale pitches in the third column. A linear mapping means that successive scale degrees are mapped to successive keys. If the first parameter is a number, then it will be the note number of the first MIDI key shown. A second parameter for the last note can also be given.
See also
LOAD/MAP, SET MIDDLE.

SHOW NEAREST  interval-list
Show the nearest pitches in the current scale to scale pitches incremented by the given intervals. For the format of the interval list, see SHOW LOCATIONS.
If the current attribute is NOTATION then an extra line is shown with the note names of the chord position. See also SET NOTATION and SHOW SHIFTS.
   /REDUCED
If nearest pitches exceed the scale's formal octave or are lower than 0 cents, they are shown reduced to within the range of one formal octave.

SHOW NOTATION  [notation-system-or-division]
Show the names and descriptions of all notation systems or, with a parameter, the description of the given system. The order is octave based systems first, from small to large and then non-octave based systems. It also shows the current active system, even if the attribute is not set to notation. See also SET NOTATION.
The parameter may contain the * and ? wildcards, which makes all system names corresponding to the given pattern to be shown. If the parameter is an integer number instead of a notation system, then all notation systems being based on that equal division will be given. If there are none, then ones which are a multiple will tried to be found. If the parameter is 0 then only the current system is shown. Note that notation LT can be used for any equal temperament, if the division is set accordingly with SET LT_PARS.
To view all the note names in one of these systems, use SET NOTATION to select the system, then get the corresponding equal tempered scale with the EQUALTEMP command (except for the Indian names) and do SHOW. For the Bohlen-Pierce scale do EQUAL 13 3. For the Indian names use LOAD to obtain one from file (indian.scl), or you can do EQUAL 53. For the Persian names do LOAD persian, or do EQUAL 36.
The notation offset and tolerance are also shown, see SET OFFSET and SET TOLERANCE. The tolerance is the maximum allowed deviation for the name to be given. It is shown here in cents, not relative to the step size in which it is set.

SHOW PITCH  [pitch]
Show the value of the given pitch in cents, as a linear value and in Hertz relative to the base frequency. Default is the value in pitch memory 0. See also CATALOGUE to show the values of all used pitch memories.
   /ATTRIBUTE
Show the value of all attributes which are independent of a scale for the given or default pitch. At the end the name in the current notation system is given. To show the attributes for pitch memory 1 for example, do SHOW/ATTRIBUTE PITCH $1.
   /CENTS
Show the value in cents only.
   /UNITS
Show the value expressed in various units plus its interval name in case it has one and it's rational. The unit names and conversion factors are stored in parameter file calcval.par and may be altered as wished.

SHOW SETTINGS
Show the current values and settings of changeable parameters. To make different settings at startup, the files scala.ini and startup.cmd can be edited. See also SET.

SHOW SHIFTS  interval-list
Show the pitches of the current scale incremented by the given intervals. For the format of the interval list, see SHOW LOCATIONS.
With this command one can see which tones exist on a string instrument with straight frets, if the interval list gives the intervals between the tunings of the open strings.
If the current attribute is NOTATION then an extra line is shown with the note names of the chord position. See also SET NOTATION and SHOW TEMPERINGS.
   /PRESENT
Show only shifted pitches whose distance to the nearest scale tone is not greater than the difference set with SET MAXDIFF. See also SHOW/SUBSET LOCATIONS.
   /REDUCED
If shifted values exceed the scale's formal octave or are lower than 0 cents, they are shown reduced to within the range of one formal octave.

SHOW STRINGLEN  [string-file]  [last-position]
Show the positions where frets are to be placed for the degrees of the current scale with high precision. This command needs to read the string length and other parameters of the string and the instrument from a file. The default name of this file can be set in scala.ini with key String_File. It can also be given as parameter.
The pitch of the open string must correspond to scale degree 0. If this is not the case, i.e. degree 0 is also at a fret, then first insert the pitch of the open string (relative to the the current 1/1) to degree 0, see
INSERT. If more frets than scale degrees are to be shown, enter the count as second parameter (in this case the filename must be given too).
In the first column are the distances relative to the nut, in the plane of the fingerboard towards the bridge. The second column has the distance of the point where the string starts to vibrate at the bridge to the fret position. Accurate results are only obtained for metal strings, or strings of a material with a fixed spring constant. Unattainable pitches will be indicated with dashes. If the string is not pressed down, use /MONOCHORD.
   /MONOCHORD  string-length  [last-position]
If the string is not pressed down, so if bridge, nut and fret are in the same plane, then the only relevant parameter is the string length. Then you can use this option. It also shows both distances to bridge and nut. If more distances than scale degrees are to be shown, enter the count as second parameter. Another possibility is to use SET ATTRIB RECIPROCAL followed by the string length. See also SET RECIPROCAL.

SHOW SYNTHESIZER
Show the names of the synthesizer models defined in parameter file synth.par and the ones hard-coded internally. The current synthesizer model is indicated with an arrow. The MIDI Tuning Standard is preferred, but not many synths support it: a list is shown. Also shown are lists of softsynths that can read Scala scale files and standard .tun files, which is selected with SET SYNTHESIZER 112.

SHOW TEMPERINGS  interval-list
Show the differences for the nearest interval on each tone of the current scale with the given interval(s). The intervals in the parameter list are separated by spaces. There can be 12 at most. Colons also act as separator in which case any values with decimal points are read as linear factors, for example: 4:5:6:7. See also CHORDS.
The differences are shown in cents and are relative to the nearest pitch in the scale that is the given interval away from each degree. Note that if you want to see the differences for intervals in the scale, you can use the percent sign with the degree number, for example SHOW TEMPERINGS %4 %5. See also SHOW BEATS.
   /SCALE  scalenr.
Instead of an interval list, give a scale number or filename and show the differences for the intervals from that scale.
   /TOTAL
Instead of showing the differences for each interval, show the sum of the absolute differences for each scale degree, and the average (sum divided by the number of intervals given).
   /UNITS
Instead of showing temperings in cents, they are expressed in Brombaugh's Temperament Units, 1/720th of a Pythagorean comma. See also SHOW CYCLE.

SHOW TIME
Show the current date and time.
   /MSECS
Only show the time, plus milliseconds. See also command file timecmd.cmd.

SHOW TRANSPOSE  [scalenr.]
Show how many pitches of the given or current scale are different resp. identical for the same scale in different keys. The count in the second column is the number of pitches different resp. identical in degree order, and in the third column the number that is different in any order. It then shows the largest deviation, and next the average of deviation for the degrees that are different in order, counting only the different keys and the average deviation counting all keys. Lastly, the normalised autocorrelation values for the logarithmic intervals between consecutive pitches (logarithmic scale steps). It is a measure how similar the interval sequence is when the scale is transposed to the given key. A value of 1.0 means identical, a value of 0.0 means no similarity. If a notation attribute was set, the note names are given too.
For equal tempered scales, obvious values are not given. Instead of a scale number a filename can be given.
   /DIFFERENCE
Show the results sorted by key in order of ascending average deviation, the second one averaged over all keys.
   /SORTED
Show the results sorted by key in order of ascending number of pitches different.

SHOW VERSION
Show the program version.


SIEVE

SIEVE  pattern
Select pitches from the current scale and delete the intermediate pitches. The numbers in the given pattern come in pairs. The first one is the number of steps to proceed upwards with each selected degree. The second one is the degree to start on, which has 0 as default value (may also be negative). For more than one given pair, the union is taken. Degree 0 and the last degree (formal octave) will not be deleted. For instance if a single number is given it means that every so many pitches are taken from the scale and the rest deleted (then it does the same as SAMPLE).
Example: with 12-tone equal temperament, doing SIEVE 2 1 will give the degrees 1 3 5 7 9 11 12. Or SIEVE 3 0 4 0 will give 3 4 6 8 9 12. See also MODE and SAMPLE.
   /COMPLEMENT
As above but instead the selected pitches are not kept but deleted.
   /RANDOM  probability
Take a random selection of the scale degrees from the current scale. Each degree has the given probability of being selected (kept). So the number of notes is not known in advance.
The parameter must be a floating point number or ratio between 0 and 1 inclusive. The last degree may also be deleted. Cannot be combined with /COMPLEMENT. See also SAMPLE/RANDOM and SEED.


SORT

SORT  [scalenr.]
Sort the pitches in the given or current scale in ascending order. For descending order, do REVERSE afterwards.
   /ATTRIBUTE
Sort the pitches according to the current attribute value. Only attributes which give a numerical value are allowed, so the attributes PRIMES, SEP_PRIMES and VECTOR are not allowed and give the message "Invalid attribute for operation". INTERVAL and OTHER_SCALE are also not allowed. EXPONENTS can be used however, which gives a partial ordering based on the sum of absolute exponents and the prime limit, which makes it a ratio complexity function. See also LIMIT/MAX_ATTRIB. Cannot be combined with /INTERVAL.
   /INTERVAL
Sort the consecutive intervals in the given or current scale in ascending order. For descending order, do INVERT afterwards. Cannot be combined with /ATTRIBUTE.


SPAWN

SPAWN  command
Execute an operating system (shell) command and return to the program after it has been completed. To work interactively with the operating system enter
on Linux/Unix/MacOSX: spawn sh (or any other shell name)
on Windows 9x/ME : spawn command
on Windows 2000/XP : spawn cmd
After logging out or exiting control is returned to Scala. For Scala version 2.0 and higher, it's easier if you open another window like this on Linux: spawn xterm
With SPAWN, operating system commands and Scala commands can be mixed in Scala command files. See also @.
   /DETACHED
Execute the operating system command in the background (as a separate process) and/or run it concurrently in a separate window. Control is returned to Scala before the system command has been completed. The command can be a program executable name if it's in the current path, some examples are:
on Linux/Unix/MacOSX: spawn/detached xmms
on Windows 2000/XP : spawn/detached notepad
on Windows 2000/XP : spawn/detached cmd /c start http://www.huygens-fokker.org
   /QUIET
As without qualifier, except it does not show an error message if the command could not be executed.


SQUARE

SQUARE
Create a scale like a Novaro-Partch tonality diamond. This is the Carthesian product of a set of factors with their reciprocals. The diagonal of the diamond consists of only 1/1's. These redundant notes will not be included in the scale. Scales like this are self-inverse.
First is asked Enter number of factors:, which is the number of generating numbers that represent harmonics and subharmonics. Subsequently they must be entered as any ratio or cents value. A tonality diamond has integer factors, but non-integer values may be used here. It makes a difference whether 1 is one of the factors or not. The pitches can be reduced by an octave with the NORMALIZE command, which also removes duplicate pitches. See also RECTANGLE, this is a generalisation of the SQUARE command with integer factors.
   /UPPER
Only create the pitches above the diagonal of 1/1's, i.e. the upper triangular part. If you want the opposite part, do INVERT and REVERSE afterwards.


STRETCH

STRETCH  interval
Increase the formal octave of the current scale with the given interval and all other pitches with a logarithmic proportional part of it with respect to their scale degree. If the number of notes in the current scale is n, then the first degree will be incremented with the 1/n part of the given interval, the second degree with the 2/n part, etc. For example, if the scale in cents is 0-100-300-500, then a stretch with 90 cents makes it 0-130-360-590. The given interval may also be smaller than 1/1. See also EXPONENTIATE and MULTIPLY.
   /ABSOLUTE  pitch
Change the formal octave of the current scale to the given pitch and increase all other pitches with a logarithmic proportional part of the increment to the formal octave.
   /MATCH  scalenr.
Stretch the current scale by an interval such that the least-squares difference with the corresponding degrees in another scale is minimal. The given scale may have a different size than the current scale. Instead of a scale number, a filename may also be given. See also MULTIPLY/MATCH.


SUBTRACT

SUBTRACT  scalenr.
Divide the pitches of the current scale by the corresponding scale degrees of the given scale. Instead of a scale number, a filename may also be given.
For subtracting a constant term from all pitches use MOVE/FREQUENCY with a negative parameter.
   /SUBTRACT
Instead of dividing the pitches, take the difference tones.
   /MEDIANT
Instead of dividing the pitches, take the subtractive mediant value, i.e. the absolute value of (num(a) - num(b)) / (den(a) - den(b)). All pitches must be rational. If either the numerator or denominator becomes zero, then a 1/1 is inserted. If this has happened, you can do UNIQUE to delete them.
   /DIFFERENCE  [scalenr.]
The current scale is replaced by a scale with all difference tones of the current or given scale, using octave equivalence. The size of the new scale will be the square of the number of notes in the given scale, but less if there are duplicate difference tones. Warning: the original 1/1 remains in the scale. To remove it, do DELETE 0. See also ADD/SUMMATION.


SWAP

SWAP  scalenr.  [scalenr.]
Interchange the first with the second given scale. To select another scale as the current scale, use only one parameter with the other scale's number. The command to interchange notes inside a scale is EXCHANGE.
   /PITCH  pitchnr.  [pitchnr.]
Interchange the first with the second given pitch memory. Pitch number 0 is the default.


SYMMETRIZE

SYMMETRIZE  position
Make the current scale symmetrical in some way around the given position. The qualifiers determine in which way. It can be done by replacing pitch pairs around the given position so that their average distance to the pitch at the given position is the same. Or one can be replaced by the other or pitches can be copied to the other side. /GEOMETRIC is default by absence. Qualifiers cannot be combined.
   /GEOMETRIC
Uses the geometric mean, i.e. sqrt(a * b). When this is used, then the symmetry is recognised by the SHOW DATA command. This is the default qualifier.
   /ARITHMETIC
Uses the arithmetic mean, i.e. (a + b) / 2.
   /HARMONIC
Uses the harmonic mean, i.e. 2 * a * b / (a + b).
   /SUBC_HARMONIC
Uses the subcontrary to harmonic mean, i.e. (a2 + b2) / (a + b).
   /LOGARITHMIC
Uses the logarithmic mean, i.e. log(mean) = (b * log(a) + a * log(b)) / (a + b).
   /COUNTER_LOG
Uses the counterlogarithmic mean, i.e. log(mean) = (a * log(a) + b * log(b)) / (a + b).
   /RHSM
Uses the root harmonic square mean, i.e. sqrt(2 * a2 * b2 / (a2 + b2)).
   /RMS
Uses the root mean square, i.e. sqrt((a2 + b2) / 2).
   /SUB1_GEOMETRIC
Uses the first subcontrary to geometric mean, i.e. ((b - a) + sqrt((a - b)2 + 4a2)) / 2.
   /SUB2_GEOMETRIC
Uses the second subcontrary to geometric mean, i.e. ((a - b) + sqrt((a - b)2 + 4b2)) / 2.
   /MEDIANT
Uses the mediant, i.e. (num(a) + num(b)) / (den(a) + den(b)). All pitches must be rational.
   /FIRST
Does not average two pitches but just replaces the second by the first. When this is used the symmetry is recognised by the SHOW DATA command.
   /SECOND
Does not average two pitches but just replaces the first by the second. When this is used the symmetry is recognised by the SHOW DATA command.
   /INSERT
Does not average two pitches but inserts all the octave inversions. Afterwards the command UNIQUE can be used to delete eventual double pitches. However this may change the position of symmetry. When this is used the inversional symmetry is recognised by the SHOW DATA command.
You can use this qualifier when entering a scale that is symmetrical so that only half the values have to be typed. Input the first half, append the octave, and then do SYMMETRIZE/INSERT 0.
   /GOLDEN
Uses the golden mediant, i.e. (num(a) + phi * num(b)) / (den(a) + phi * den(b)), where phi is the golden ratio: 1.61803. All pitches must be rational.
   /EPIDEN
Uses the epimoric mean, i.e. (2 * a * b - a - b) / (a + b - 2). See also SET ATTRIBUTE EPIDEN and DOUBLE/EPIDEN. If both pithes are superparticular (epimoric), then this mean equals the mediant.


TIP

TIP  [tipnr.]
Provide a tip-of-the-day. With no parameter given, a random tip is provided. Tips are written in the file tips.par, which can be read and printed as a text file.


TYPE

TYPE  file-mask
Read a text file. It can be useful to read a command file or keyboard mapping file or something else before executing or loading it. If the file parameter contains a wildcard, all the matching files will be shown on the screen. If the file does not exist, then no error message will be given. The file must be encoded in ASCII or ISO-8859-1.
To show the last scale file loaded or saved, do TYPE %scl.


UNCYCLE

UNCYCLE  position  [down-count]
The position must be a scale degree that has no common factor with the scale size. This command reorders the pitches by putting them in "fifths-order" by considering the current scale to be a cycle of fifths. The given position is the degree of the formal fifth. The down-count is the number of fifths in the downward direction with default value 0.
It can be useful to do certain operations on a cycle of fifths when it is in "straight" form. Afterwards the pitches can be reduced again by octaves using REDUCE,/a> and SORT or NORMALIZE.
   /NEAREST  interval  [down-count]
Instead of using a fixed interval specified by a scale degree, stack the intervals nearest to the given one.


UNDO

UNDO  [count]
After doing a command that changes the current scale, this command can be invoked to get back the scale as it was before the last command. Each time when a command is used that changes the current scale, it is first copied to the first Undo scale memory, unless it is empty. The number of undo-memories is set by key Undo_Slots in file scala.ini, default is 1. If it's greater than one (see SHOW SETTINGS), then UNDO can be invoked repeatedly to get earlier states of the current scale back. Use the CATALOGUE or SHOW SCALE command to examine the contents of the undo-memories. The command works cyclically so the state before UNDO is not lost.
If a count is given, it repeats undoing a number of times. The special value -1 will save an extra copy of the current scale, even if it's empty. The count may not be greater than the number of undo-memories. See also PUSH which is different.
Warning: commands operating on scales other than the current scale cannot be undone, nor can operations on pitch memories and the keyboard mapping. Other commands that cannot be undone are CLEAR/ALL, COPY, PUSH, POP and SWAP. Because command files usually contain more than one command, the whole action of a command file can usually not be undone with a single UNDO.


UNIQUE

UNIQUE  [scalenr.]
Deduplicates pitches in the current or given scale and sorts it in ascending order. Pitches are considered equivalent if their difference is less than approximately the numerical accuracy of floating point numbers in the computer, so it does not matter whether it is a rational pitch or not.


UNRAT

UNRAT  position  [scalenr.]
Change the pitch at the given position (degree) in the current or given scale from a rational to a floating point value. This cannot be done for degree 0. To do this with all pitches, use VARY 0.0 or LIMIT 1.
To change a pitch memory to a floating point value, give as parameter a dollar-sign before a pitch number, like $0 for instance. See also ASSUME, for the inverse operation.


VARY

VARY  deviation  [scalenr.]
Adds a random value with an absolute maximum of the given value to all pitches in the current or given scale except the last one (formal octave). The random values are distributed uniformly between minus and plus the deviation logarithmically. If the last degree is to be changed too, then append an extra temporary degree before doing this command.
If the deviation is 0.0 then all rational pitches in the scale will be made floating point numbers. The deviation may be given as a rational or floating point value. See also SEED.
   /INTERVAL
As above but adds a random value to each interval instead of each pitch. The last degree will be affected too. Can only be combined with /GAUSSIAN.
   /LINEAR
Adds a random frequency value with an absolute maximum of the given value to all pitches in the current or given scale except the last one (formal octave). The random values are distributed uniformly between minus and plus the deviation linearly. The given frequency is relative to the base frequency of SET FREQUENCY. Can only be combined with /GAUSSIAN.
   /GAUSSIAN
Instead of a uniform statistical distribution, use the normal, also called Gaussian distribution. The parameter is the standard deviation and not the maximum deviation then.


@

@<command-file>  [parameters]
An @ preceding a filename executes commands in an external text file called a command file (or "script"). The command file must have one command per line. Execution stops when an empty line is encountered or an error occurs. The default extension for command files is '.cmd'. Lines beginning with an exclamation mark (!) are ignored and can be used for comments. If the command file is not found in the current directory (set with CD), then it is searched in the main Scala directory, the one which contains scala.exe. A command file example:
! Average the pitches of scale 0 with those of scale 1
add 1
multiply 1/2

With commands like INPUT or LINEARTEMP that ask for values, the values must be put separately on lines following the command or alternatively command lines with question marks ('?') will cause prompting for user input, once for each question mark causing each one to be replaced by the response given. Prompting can also be done for parameters that are normally taken from the command line.
A line with two question marks ('??') will cause prompting for user input for all the rest of the parameters. See also help ?. Command files can be used to store scales by definition, versus by value.

It is possible to pass parameters from the invoking command line to the command file. Parameters on the command line are separated by spaces and assigned to symbols p1, p2, .., p9. To translate these symbols inside the command file, surround them by single quote characters. An example: spawn grep 'p1' *.scl. However this translation can only be done in lines with commands, not in lines containing input data to commands which ask for values. If a parameter being passed from the command line contains spaces, then it must be surrounded by double-quotes ("), also if it's a filename that contains forward slashes (/). If the parameter contains double-quotes itself, they must be doubled, but this will occur rarely. It's possible if a whole Scala command is passed as a parameter.

Warnings: Do not invoke command files from other people without checking them first, they could contain malicious code. You can read them with the TYPE command. Remember that command files have the same control over the operating system as the user.
Also do not invoke command files from within themselves or create endless loops otherwise, because the program will then consume all available memory and stop, losing any unsaved scales. Nesting invocations of other command files inside command files can be done to a maximum depth of 10.

If the first command in a command file is ECHO, then this text will be displayed as description with the command DIR *.cmd.

This is a link to the list of presupplied command files.

   @list-file
An @ can also be used in front of a filename, where a file mask can be given. The given name must be the name of a file with a list of filenames inside, one on every line. The default extension of such a list file is '.lst'. The commands to which this can be used as file parameter are COMPARE, DIRECTORY, ITERATE and LOAD/ALL. A set of scales can be defined this way, for instance you could make list files with scales of different categories. A list file can be created with any text editor, and COMPARE/SAVE_LIST or DIRECTORY/SAVE_LIST.


$
A $ preceding a natural number smaller than or equal to the number of pitch memories can be used wherever the user enters a pitch. It means that the value of the corresponding pitch memory will be taken instead of a literal value. The highest pitch memory is set in scala.ini (default 10). A $ preceding any of the following letters can be used as a synonym wherever a pitch is entered.

a : apotome 113.69 cents
b : breedsma 0.7212 cents
c : major diesis 62.57 cents
d : minor diesis 41.06 cents
e : base of natural logarithm (e) 1731.23 cents
f : golden section (phi) 833.09 cents
g : gamelan residu 8.43 cents
h : Harrison's comma 50.72 cents
i : silver ratio 1525.86 cents
k : syntonic comma 21.51 cents
l : limma 90.22 cents
m : MIDI Tuning Unit 0.0061 cents
n : Pythagorean-19 comma 137.15 cents
o : Fokker's semicomma 10.06 cents
p : Pythagorean (ditonic) comma 23.46 cents
q : diaschisma 19.55 cents
r : ragisma 0.40 cents
s : schisma 1.95 cents
t : Temperament Unit 0.0326 cents
w : Würschmidt's comma 11.45 cents
x : major chroma 92.18 cents
y : kleisma 8.11 cents
z : pi 1981.80 cents

See also % for symbols beginning with a %-character and help for expressions.


%
A % preceding an integer number can be used wherever the user enters a pitch. It means that the value of the corresponding degree in the current scale will be taken instead of a literal value. The degree may be outside the scale, a negative value is also allowed, which will give a value properly offset by a number of formal octaves.
For pitches from other scale memories, append a second %. For example degree 3 of scale 1 will be: %3%1. Degree 3 from the current scale is %3 or %3%0. Other symbols are:
%n : the formal octave (pitch of highest degree) of the current scale, or of another scale if written like %n%1.
%g : the formal fifth or generator of the current scale if it has Myhill's property, or of another scale if written like %g%1. The generator with the lowest scale degree will always be given. If the current scale is an equal temperament, then its step size is returned. In all other cases the result is 1/1.
%i : scale degree i of the current scale where i is the i-th iteration while executing ITERATE/KEY, ITERATE/REPEAT or ITERATE/SCALE. It can be from another scale if written like %i%1.
%si: the smallest interval between consecutive pitches of the current scale.
%li: the largest interval between consecutive pitches of the current scale.
%ai: the average interval between consecutive pitches of the current scale.

The symbol n or N can be used to get the number of notes which can be entered where a scale degree or an amount of notes is the parameter. Also an integer can be subtracted or added (without spaces in between), like n-2 or n+1, but the result should of course be in the allowed range for the parameter. Also %n-1 and such can be used.
See ECHO for a list of lexical functions which can be evaluated in ECHO text output. See FILE for functions useable for the output filename. See $ for symbols beginning with a $-character and help for expressions.


[ ]
A pitch expression surrounded by square brackets gets the value of the nearest pitch in the current scale. It can be used wherever the user enters a pitch. The range of the scale is octave extended, so for equal temperaments the number of notes is irrelevant. Warning: if the current scale is not in ascending order then a wrong value may result for degrees outside the scale range. See also help for Expressions.


:=
Assign the result of an arithmetical pitch expression to a pitch memory or scale degree. The left hand side must be a number preceded by a $ or a % for a pitch memory or scale degree respectively. The right hand size can be a pitch expression or arithmetical expression as described under CALCULATE. See help of $, %, Expressions. It does not provide extra functionality but is there for syntactic convenience.
The command CALCULATE/NOOUT 3/2+5/4 is equivalent to $0 := 3/2+5/4.
The command COPY/PITCH $0 1 is equivalent to $1 := $0.
With REPLACE there are two differences. One is that when := is used, this cannot be undone with UNDO. The second is with the latter, the position may be one higher than the number of notes, so := can also be used instead of APPEND. REPLACE 7 3/2 is equivalent to %7 := 3/2.


!
A ! at the beginning of a command line from user input or a command file or parameter file will cause the line to be ignored.


?
A line with only a question mark in a command file will cause the input of a parameter or part of a command line to be input from the keyboard instead of the command file itself. See @.

If two question marks are put inside a command file at the beginning of a line below a command requiring user input, this will cause the rest of the user input to be queried directly, instead of read from the command file. For example, commands like INPUT and CPS ask for a variable amount of pitches. In these cases ?? can be used because with single question marks the amount required cannot be known beforehand.


About...

Scala is the word for scale in Italian (scalae is Latin for ladder). In Dutch it stands for "a wide range" of things, usually possibilities. This is what the program hopes to offer, a large amount of useful functions to suit most needs of both beginners and experts.

Scala was written in the programming language Ada 95. It makes the code very readable, maintainable, bugs very scarce and saved me lots of precious time. If you find a bug nonetheless, please report this with an accurate description of what you were doing and which type of computer you are using to the author (Manuel Op de Coul) via e-mail at coul@huygens-fokker.org.
If the program ends with an exception (error message), then please e-mail the whole text of the exception message. Suggestions for improvements are also welcome.

The first GUI-version was 2.0 and it is made with the Gtk+ toolkit.

Currently there are versions of Scala for Microsoft Windows, GNU/Linux, Mac OS X and Unix.

Disclaimer: Scala is freeware without warranty and may not be sold, modified or distributed for sale or in combination with commercial products.


Commands

Commands are entered as follows. First comes the command verb, which may be abbreviated to the smallest unambiguous length. Then zero or more qualifiers follow which must each be preceded with a slash (/) and may also be abbreviated. Then zero or more parameters follow to be separated by at least one space. Any nonoptional parameters which are omitted are prompted for. Qualifiers always precede parameters. See also Qualifiers and Interruption.

This is a link to the list of all commands.


Errors

When a wrong parameter value is given by the user, this is indicated with the message Illegal parameter. Sometimes a more specific message is given, like Illegal generator value, Illegal directory or some such.

When an operation inserts more notes in a scale than the maximum value in file scala.ini allows, then the message Overflow in scale size is given. When a scale is empty, and an operation expects a non-empty scale, then Scale is empty is given.

Numeric overflows abort the running operation and give the message Computation error. They will never produce meaningless results. They will neither abort the program, unless there is a bug (thanks, lady Ada).

If the program ends with exception Storage_Error raised, it means there is insufficient memory. This may happen under Windows 95; then check the memory options from the DOS-icon properties.

Bugs may cause the program to abort with an exception. If this happens, please e-mail the whole text of the exception message and which operating system you are using to the author at coul@huygens-fokker.org.
The current scale will then be saved in the directory where Scala was installed, with name saved.scl.


Expressions

Pitch expressions can be:

Functions for converting values into text output are used with the command ECHO.


Interruption

The execution of a command can be interrupted by pressing Ctrl+C (console version, pre 2.0) or clicking the Stop button or pressing F5 (GUI version). This does not end the program, only the last command. It may take a short while before the actual interruption occurs. If Ctrl+C is pressed when the program is waiting for user input, this will not be noticed by the program until a enter is given.

To cancel a long output, either press Ctrl+C (click Stop button or F5) or type 'q' followed by enter when the program asks to hit the enter key when it is pausing to scroll.


Introduction

Recipe for new users to retune their synthesizer or sampler. For synthesizers or samplers without tuning table and soundcards, see below.

What if it didn't work?

With a PC soundcard or softsynth:

For soundcards and synthesizers without a tuning table:

Playing directly from Scala to a midi-device can also be done since version 2.03 with virtual keyboards on the screen. This is useful for experimentation, not so much for actual playing. In version 2.05f and higher, you can also relay incoming MIDI messages and retune them via pitch bends in real-time.


Mappings

Keyboard mappings determine the allocation of scale degrees to keys on a MIDI keyboard, or MIDI note numbers in general. They are automatically used when you tune a synthesizer with the SEND command or retune a MIDI file with the EXAMPLE/MIDI command. They can be created by using an external text editor, and the file type should be '.kbm'. They are activated by the command LOAD/MAP. An example template file is available: example.kbm. It contains various parameters on the first few lines and then the mapping defined by scale degrees for consecutive keys. For instance if it is 0, 1, 2, 3, etc., then it will be an ordinary linear mapping. 0, 2, 3 would mean degree 0 will be on the first key (which is the given middle note), degree 2 will be on the second key, degree 3 on the third, etc. Scale degrees can be mapped more than once. If a certain key is not to be tuned, an 'x' must be placed instead of a number. See also SHOW MAPPING, CLEAR/MAP and KEY/MAPPING. This is an example mapping:

! Template for a keyboard mapping
!
! Size of map (greater than or equal to the number of notes in the scale 
! to be mapped). The pattern repeats every so many keys:
12
! First MIDI note number to retune:
0
! Last MIDI note number to retune:
127
! Middle note where scale degree 0 is mapped to:
60
! Reference note for which frequency is given:
69
! Frequency to tune the above note to (floating point e.g. 440.0):
440.0
! Scale degree to consider as formal octave (determines difference in pitch 
! between adjacent mapping patterns):
12
! Mapping.
! The numbers represent scale degrees mapped to keys. The first degree is for
! the given middle note, the next for subsequent higher keys.
! For an unmapped key, put in an "x". At the end, unmapped keys may be left out.
0
1
2
3
4
5
6
7
8
9
10
11
In Scala version 2.0 and higher, mappings can also be created and edited using the Edit->Edit mapping menu. Furthermore they are also used for real-time MIDI relaying (Tools->Microtuning MIDI Relay). There there are two ways to use them. Normally, with a single mapping to be used for one input channel or all (Omni). Or, with a multichannel mapping which consists of a set of single mapping files with the same name followed by an underscore and a MIDI channel number from 1 .. 16. For example, if map_1.kbm, map_2.kbm and map_3.kbm are present in the same directory as the filename given (either one of those) then they function independently for MIDI input channels 1, 2 and 3 and messages from other channels will not be mapped, therefore ignored. This is useful if you stack multiple keyboards or have a microtonal keyboard which uses multiple channels to overcome the 128 note number limitation.


Pitches

The representation of a pitch can be either a floating point value (shown in cents or as a factor) or a ratio. The program does composite arithmetic which means that rational values are tried to be kept in rational form. If not, when an operation gives a numerator or denominator that is too large, then the representation is automatically switched to floating point. This also happens with operations acting on both a rational and floating point pitch. Operations will never produce junk numbers.
Important: where a pitch is entered by the user it may be given as a rational or in cents. If a value entered contains a decimal point, it is interpreted as a value in cents, otherwise not (even if it's zero), unless explicitly stated in the help text. Floating point values may not start with a decimal point, i.e. there is no implicit leading zero. They may however end with one. Rational values can also be given in prime-vector notation, a list of integer exponents of the primes (2, 3, 5, 7, 11, etc.). This notation must begin with '|' and end with '>'. This for example represents 81/80: |-4 4 -1>
This prime-vector notation cannot be used in the CALCULATE and := operations since '|' has another meaning there.

There is a number of pitch memories to hold values outside a scale. They are numbered 0 and higher, and are referred to with the $-sign (see help of $). Their amount is set in file scala.ini (default 10), and can be shown with SHOW SETTINGS. They can be assigned with the := operator. The contents can be examined by CATALOGUE/PITCH. The program stores results of calculations in pitch memory 0 and sometimes 1. The initial value of memory 0 is 3/2 and 1/1 of the others.

See also Scales, % and CALCULATE.


Qualifiers

Qualifiers alter the action of a particular command. They are preceded by a slash (/) and may be abbreviated like commands. On the command line they immediately follow the command verb and precede the parameters, if any. Commands with qualifiers may have different parameters than the command without them.


Scales

A scale consists of zero or more pitches. The terms pitch, note, tone and scale degree are being used interchangeably here. The size of scales (number of notes) is bounded, but the maximum size is configurable. The same goes for the number of scales. Both values Max_Scale_Size and Scale_Count are set in file scala.ini, and can be shown with SHOW SETTINGS.

Each scale memory has a number, and scale number 0 is called the current scale. This is always the default scale upon which commands act. Many but not all commands can also act on other scales than the current one. Commands that don't change scales can take scale filenames as parameter, as well as scale numbers when the parameter is a "scalenr." Then the given file in the current directory will be used for the command, or if it does not exist there Scala tries to find it in the directory from which it was started.

The last note (with the highest degree number) of a scale serves as the formal octave. The terms octave, formal octave, period and interval of equivalence are also used interchangeably. This can be value 2/1 but also any other value. This value is important when the scale is extended and when notes are used outside the range of degrees from 0 to the last degree. For scale degrees outside this range, octave equivalence is always assumed.

The value of the first note (degree 0) is always 1/1 or 0 cents.

Concerning scales which are generated by a fifth, we use the terms fifth, formal fifth and generator interchangeably.

To download a large archive of scales, go to the Scala downloads page.


Screen dimensions

Version 2.0 and higher:
Change the number of lines and columns for output by resizing the main window. The current number of columns and lines can be seen with SHOW SETTINGS.

Version 1.8 and lower:
The number of lines and columns of the screen that the program works with is set automatically at startup. Under Windows the number of lines can be changed by resizing the window or giving the command SPAWN MODE CON LINES=50 (one of 25, 43, 50). Then do CLS afterwards.
Linux/Unix versions automatically recognize the size of an xterm window.
The current number of columns and lines can be seen with SHOW SETTINGS.


Startup

At program startup, one or more command line parameters can be given. If there are no parameters or the first parameter is not a command file name, then the file startup.cmd is searched in the current directory first and then in the Scala directory and the commands in it executed. Usage is as follows:
scala [*.cmd, *.kbm, *.mid, *.scl] [--<scala command> ...] Give any number of existing files with one of these extensions. Depending on that an external command file is executed, a keyboard mapping loaded, a MIDI file played or a scale loaded. The extension cannot be omitted because it determines the action. If filenames contain a wildcard, only the first match is taken.
scala -h will summarise the startup options.
After any filenames, one or more direct Scala commands can be given when preceded by a double hyphen. The command line is read and executed from left to right. So this can be used to CD (change directory) to a scale directory, do SET ATTRIBUTE, TIP, or anything else.

Example: scala ptolemy.scl --show scale --show data
Warning: Filenames cannot contain "--" when used like this.

Version 2.0 and higher read some more files at program startup, see readme.txt.