Tuning:
Filter:
Classes | Tuning

Tuning : Object

represents a musical tuning
Source: Scale.sc

Description

Represents a musical tuning (e.g. equal temperament, just intonation, etc.). Used in conjunction with Scale to generate pitch information.

Creation

just, pythagorean, werckmeister, johnston, partch, wcAlpha, bp, etc.

Creates a tuning from the library stored in Tuning.all. For a complete list of available tunings, execute

Class Methods

Tuning.et(pitchesPerOctave: 12)

Creates an equal-tempered scale based on pitchesPerOctave.

Tuning.choose(size: 12)

Creates a random tuning from the library, constrained by size (which defaults to 12).

Tuning.new(tuning, octaveRatio: 2.0, name: "Unknown Tuning")

Creates a Tuning using some or all of the parameters as follows: tuning can be the name of a library tuning (in which case that tuning is returned); an array of floats representing the semitone values of the tuning (in which case pitchesPerOctave will be set to the size of the array regardless of the second parameter); or nil (in which case the default tuning for pitchesPerOctave will be returned). octaveRatio defaults to 2.0, but can be set differently for stretched or compressed tunings.

Inherited class methods

Undocumented class methods

Tuning.all

Tuning.at(key)

Tuning.calcET(pitchesPerOctave)

Tuning.chooseFromSelected(selectFunc)

Tuning.default(pitchesPerOctave)

Tuning.directory

Tuning.doesNotUnderstand(selector, args)

Tuning.etName(pitchesPerOctave)

Tuning.names

Tuning.newFromKey(key)

Instance Methods

.semitones

Returns an array of semitone values for the pitch set. -as(Array) is equivalent; -as(List) returns it as a list, etc.

.cents

Returns a array of cent values for the pitch set.

.ratios

Returns a tuned array of ratios for the pitch set.

Inherited instance methods

Undocumented instance methods

==(argTuning)

.as(class)

.asTuning

.at(index)

.hash

.name

.name = value

.octaveRatio

.size

.stepsPerOctave

.tuning

.wrapAt(index)

Examples

For examples of use, see the Scale help file.