Index
RegularTemperament
DB
RegT
Defines databases for chords, scales and intervals in arbitrary octave-repeating regular temperaments.

NOTE: recommendation when using a regular temperament: reduce the domain of all pitch classes (e.g., of notes, chord/scale roots and transpositions) to the tones of the current temperament using ReduceToTemperament. This is of course not necessary if all pitch classes are already reduced to some determined scale that only consists of temperament PC (which is not automatically the case with all scales and transpositions!).

Functor

Import

Export

Define

proc{ReduceToTemperament MyScore}
Reduces all chord/scale pitch class sets and roots as well as all note pitch classes to the pitch classes of the current temperament.


fun{MakeFullDB Args}
Returns a full database specification that can be given as argument to HS.db.setDB. MakeFullDB internally generates a regular temperament (using HS.db.makeRegularTemperament), and "matches" the chord/scale/interval databases defined in this functor so that they are approximated to (i.e. can be played by) this regular temperament. Dublicate database entries (e.g., if the approximation results in the same pitch classes) are removed (reported at standard out).

Args:
'generators': list of generators (ints). See HS.db.makeRegularTemperament for details.
'generatorFactors': list of generator factor specifications (pairs of ints). See HS.db.makeRegularTemperament for details.
'generatorFactorsOffset' (default 0): See HS.db.makeRegularTemperament for details.
'pitchesPerOctave' (default 1200): See HS.db.makeRegularTemperament for details.
'removeFromTemperament' (default nil): list of pitch classes (ints, or ratios i.e. floats or pairs of ints) that would be part of the temperament as defined by 'generators' and 'generatorFactors' but that nevertheless should be excluded from the resulting temperament.
'maxError' (int): maximum error of any original JI pitch classes in a tempered chord/scale/interval. The error's unit of measurement depends on pitchesPerOctave. Any database entry with an approximation error that exceeds maxError is removed (reported at standard out).
'minOccurrences': the minimum number an interval needs to occur in the regular temperament in order to be taken into account for forming chords etc.

'chords'/'scales'/'intervals' (each tuple of records, default of each is unit): additional chord/scale/interval database entries that are appended before the entries defined internally in this functor.
'chordFeatures'/'scaleFeatures'/'intervalFeatures' (each list of atoms, default of each is nil): additional features required in database entries (example: essentialPitchClasses). Database entries that do not contain all the required features are removed from the output (reported at standard out).

'accidentalOffset'
'octaveDomain'

See examples/RegularTemperaments.oz for usage examples.

Note: in current implementation chord and scale database may contain entries where all the chord/scale intervals are available in the temperament, but not in the arrangement of the chord/scale -- so some chord/scale database entries are actually impossible in the temperament.




End