ExtensionPitch sets are designed for the handling of irregular, non octave-repeating interval collections like those produced by dissonance curves. Each interval they contain is represented as a HarmonicVector. The set is partitioned into harmonic and timbral subsets, according to whether they lie inside certain parallelepipeds in harmonic space. These 'periodicity blocks' are defined by matrices of so-called 'unison vectors'.
Pitch sets are also used to calculate stochastic harmonic fields by computing inter-interval matrices according to a HarmonicMetric. The probabilities for choosing interval are proportional their metric, which can be generated accordance with the field's 'strength' (from -1 to 1).
Dissonance objects represent their scales as PitchSets with the Dissonance: -harmonicAnalysis method. PitchSets can also be created directly from ratios. Visualization of the sets in harmonic space as well as the harmonic fields can be done with the aid of the GNUPlot quark. A few other niceties are possible with these objects. See below.
This is an implementation of Adriaan Fokkers 'Periodicity Blocks'. See Fokker, A, “Unison vectors and periodicity blocks in the three-dimensional (3-5-7-)harmonic lattice of notes”, Koninklijke Nederlandse Akademie van Wetenschappen - Amsterdam, Proceedings, Series B 72, No. 3, 1969 available at: http://www.huygens-fokker.org/docs/fokkerpb.html
This are default unison vector matrixes used to determine how the pitch set is partitioned into timbral and harmonic subsets. They are accessed as a dictionary of dictionaries: the first key is the number of dimensions, either dim2 or dim3, corresponding to 5 and 7-limit harmonic lattices. There are also two a 4-dimensional unison matrices representing Harry Partch's 43 tone 11 limit scale (approximating it to 41 degrees instead of 43). The next key corresponds to an equal division per octave: et12, et19, et22, et31, et41 or et53. Here an the unison matrices are accesed. The first key is \num which contain the number of options, the following are numbers with an index (beginning from 1) that selects between different unison matrixes that divide harmonic space into those divisions. There are generally 2 options, each having a different center for the parallelepiped.
These dictionaries are fed when creating a pitch set. The default is 12ET in 3 dimensions (7-limit). The dictionary can be accesed in the class definition of PitchSet. Other options for matrices are possible.
Example:
The main method for creating pitch sets from an array of [p,q] ratios.
| array |
something like |
| unisonvector |
The unison matrix for partitioning. Defaults to |
a PitchSet object.
This example is used to illustrate some of the instance methods below.
It posts:
Harmonic Set[ 8/7, 1/2, 7/5, 7/4 ] Timbral Set[ 7/6 ]
Same intervals with other unison matrix:
The timbral and harmonic sets are different from the first PitchSet:
Harmonic Set[ 1/2, 7/5, 7/4 ] Timbral Set[ 8/7, 7/6 ]
Instance variable with the current unison matrix.
A set of intervals, each represented as a HarmonicVector.
The set of the harmonic intervals, the ones that fall inside the parallelepiped defined by the unison matrix.
The set of 'timbral' intervals, the ones that fall outside the the parallelepiped defined by the unison matrix.
An array containing the harmonic set intervals in the form of an array of [p,q] ratios.
An array containing the timbral set intervals in the form of an array of [p,q] ratios.
An array with all the ratios of the PitchSet.
The ratio matrix, not for direct access by the user.
Metric matrix. Private.
Likewise. The ranks of the intervals.
Private.
Private.
Private.
Private.
The markov chain for the probability matrix. Not directly usable.
Likewise.
The pitch sets' metric. See HarmonicMetric.
Add a ratio to the pitch set.
| item |
The [p,q] ratio. |
Plays the pitch set as a scale.
Plays the set as a chord.
Partition the intervals into timbral and harmonic subsets. Normally this is done when creating a PitchSet or when adding a ratio to it.
Say we want to change the partitioning of our pitch set.
posting:
Harmonic Set[ 1/2, 7/4, 7/5 ] Timbral Set[ 7/6, 8/7, 12/7 ]
Use this method to be able to play harmonic fields (choosing intervals from probabilities derived from their harmonic measures). It creates a inter-interval matrix with harmonicities between each pair of intervals.
The harmonicities are converted into probability weights by the formula: (rank + add)^pwr
| pwr |
The degree of differentiation between the harmonic measures. The default of 15 works well, higher values make the inharmonic intervals less probable. |
| add |
Probably there is no need to change this parameter. |
| metric |
The harmonic metric. Either |
does not return a value, just calculates the matrices that are held as instance variables.
Once the matrix has been calculated, this method permits the interpolation between the values matrices by means of the polarity argument. This value corresponds to the strength of the harmonic field. At 0 all intervals are equally probable (atonal), at 1 the most harmonic are more probable (tonal, where the contrast between harmonic and inharmonic intervals being defined by the pwr argument in makeProbMatrix), at -1 the most inharmonic are more probable (antitonal).
| polarity |
A float from -1 to 1. |
| filteredScale |
If not given, all the ratios in the pitch set are used. If given (as an array of [p,q] ratios) then only those intervals are taken into account. |
an array of probabilities corresponding to each ratio of the pitch set. This array can used as an argument to wchoose or in a Pwrand pattern.
Example (first evaluate the code in the previous method):
Euler's gradus function can give the total harmonicity for sets of intervals. This method calculates that for the whole pitch set as well as its partitions.
Outputs the different partitions as harmonic series.
Posts:
complete: 1/2, 8/7, 7/6, 7/5, 12/7, 7/4 harmonic: 1/2, 7/5, 7/4 timbral: 8/7, 7/6, 12/7 Complete: [ 210, 480, 490, 588, 720, 735 ] Harmonic: [ 10, 28, 35 ] Timbral: [ 48, 49, 72 ] Harmonic Set[ 1/2, 7/4, 7/5 ] Timbral Set[ 7/6, 8/7, 12/7 ]
The pitch set.
(describe method here)
The complete pitch set expressed as a harmonic series.
Order the ratios of the complete pitch set according to a harmonic metric (default harmonicity).
Compare:
an array of [p,q] ratios.
Posts a lot of information regarding the pitch set. The complete and adjacency ratios, cent values, octave reduced ratio and adjacency ratios and notes.
| ffreq |
A frequency to anchor the ratios to some fundamental, default: 440. |
A useful method to approximate the intervals in the pitch set to degrees of some equal division of the octave (default: 53). A highest prime argument can be used filter intervals containing higher prime factors than this threshold.
an array of degrees corresponding to the harmonic and the timbral partitions.
Posts:
53-TET Harmonic Ratios: 1/2, 7/5, 7/4 Harmonic Degrees: [ 0, 26, 43 ] Timbral Ratios: 8/7, 7/6 Timbral Degrees: [ 10, 12 ] [ [ 0, 26, 43 ], [ 10, 12 ] ]
Compare to:
Posts:
31-TET Harmonic Ratios: 1/2, 7/5, 7/4 Harmonic Degrees: [ 0, 15, 25 ] Timbral Ratios: 8/7, 7/6 Timbral Degrees: [ 6, 7 ] [ [ 0, 15, 25 ], [ 6, 7 ] ]
Show the probability matrix in 3D using GNUPlot (requires the GNUPlot quark).
| what |
Can be |
| hollow |
If true (default), it will hollow out the main diagonal in the plot (not in the matrix itself) so this diagonal doesen't get in the way of the visualization. |
| minval |
The minimum value to plot against with. |
| title |
A title for the plot. |
Plot a 3D harmonic space with GNUPlot. If the pitch set has more than 3 dimensions (larger than 7-limit intervals) then the space will not correspond correctly to the pitch set. See makeMDSfile for those cases. The intervals are shown as little figures. It is complicated to print them out as proportions (though possible). Another drawback: couldn't find a way to plot the lattice axes between the intervals. This method shows a nice plot but is not very useful.
| type |
Defaults to |
For pitch sets in more than 3 dimensions, a multidimensional scaling analysis can project their relative distances in harmonic space into a plane. I tried and almost succeeded in implementing the MDS 'smacof' algorithm in SC, but somehow it does not work (the class is included in the DissonanceLib though). This method writes a file that can be read by other visualization programs for rendering the MDS analysis. I use http://orange.biolab.si/
| path |
Selects all the intervals in the pitch set containing the selected prime in their ratio.
| prime |
Defaults to 7 |
an array of [p,q] ratios.
The negative of the previous method.
Separates a pitch set into subsets based on the maximum prime numbers contained in their ratios. Useful for separating the 'colors' or fundamental intervals of a pitch set.
an array of arrays, each with its own prime limit.