PitchSet Set of intervals expressed as Harmonic Vectors.


   Pitch sets designed for irregular, non octave repeating interval collections. They are partitioned into 'islands' (harmonic and timbral sets) according to whether they lie inside certain paralellepipeds in harmonic space, defined by matrices of so-called 'unison vectors'. Pitch sets are also used to calculate stochastic harmonic fields by making inter-interval matrices where the HarmonicMetrics of the intervals are expressed as probabilities. 

Parts of the implementation inspired by the article: 

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


See also: Dissonance, HarmonicVector, HarmonicMetric, numberExtras


Creation / Class Methods


*with (array of intervals, unisonvector)

Make a pitch set with an array of intervals. Ratios are converted into HarmonicVectors and then the set is partitioned according to a default unisonvector matrix. 

array - Array of [p,q] ratios.

unisonvector - See below for an explanation. The default is PitchSet.unisons.dim3.et12[1] which has 12 notes per octave in prime dimensions 3, 5, and 7.

// Example: 

g = PitchSet.with([[1,1], [5,4], [4,3], [11,8], [3,2], [7,4]]);

g.harmonicSet; //The harmonic set itself made up of harmonic vectors 

g.timbralSet; // 


g = PitchSet.with([[1,1], [5,4], [11,8], [3,2], [7,4]], PitchSet.unisons.dim3.et31[3]);



Accessing Instance and Class Variables

unisons

Explanation including the type of unisons and a link to its help file.

Default value is defaultValue.


ratioM, ranks, weights, currentRanks, metricM, 

setT

Explanation including the type of setT and a link to its help file.

Default value is nil.

ranks_(arg1)

Explanation including the type of ranks and a link to its help file.

Default value is nil.

markovStream_(arg1)

markovStream

Explanation including the type of markovStream and a link to its help file.

Default value is nil.

ratios_(arg1)

ratios

Explanation including the type of ratios and a link to its help file.

Default value is nil.

weights_(arg1)

Explanation including the type of weights and a link to its help file.

Default value is nil.

currentRanks_(arg1)

currentRanks

Explanation including the type of currentRanks and a link to its help file.

Default value is nil.

metricM_(arg1)

metricM

Explanation including the type of metricM and a link to its help file.

Default value is nil.

setH_(arg1)

setH

Explanation including the type of setH and a link to its help file.

Default value is nil.

metric_(arg1)

metric

Explanation including the type of metric and a link to its help file.

Default value is nil.

harmonicSet_(arg1)

harmonicSet

Explanation including the type of harmonicSet and a link to its help file.

Default value is nil.

markov_(arg1)

markov

Explanation including the type of markov and a link to its help file.

Default value is nil.

invweights_(arg1)

invweights

Explanation including the type of invweights and a link to its help file.

Default value is nil.

set_(arg1)

set

Explanation including the type of set and a link to its help file.

Default value is nil.

timbralSet_(arg1)

timbralSet

Explanation including the type of timbralSet and a link to its help file.

Default value is nil.

equweights_(arg1)

equweights

Explanation including the type of equweights and a link to its help file.

Default value is nil.

Doing Some Task (optional)


A short bit of prose explaining something about the task.

init

Short prose description of method.

// inline example

g = PitchSet.init;

g.doSomething; // explanation

g.cleanUpMethod;



add (item)

Short prose description of method.

item - Explanation of item. Default value is nil. Other information.

// inline example

g = PitchSet.add;

g.doSomething; // explanation

g.cleanUpMethod;



play (fund)

Short prose description of method.

fund - Explanation of fund. Default value is 440. Other information.

// inline example

g = PitchSet.play;

g.doSomething; // explanation

g.cleanUpMethod;



partition (unisonvector)

Short prose description of method.

unisonvector - Explanation of unisonvector. Default value is nil. Other information.

// inline example

g = PitchSet.partition;

g.doSomething; // explanation

g.cleanUpMethod;



makeProbMatrix (pwr, add, metric)

Short prose description of method.

pwr - Explanation of pwr. Default value is 15. Other information.

add - Explanation of add. Default value is 1. Other information.

metric - Explanation of metric. Default value is nil. Other information.

// inline example

g = PitchSet.makeProbMatrix;

g.doSomething; // explanation

g.cleanUpMethod;



calcPolarity (polarity, filteredScale)

Short prose description of method.

polarity - Explanation of polarity. Default value is nil. Other information.

filteredScale - Explanation of filteredScale. Default value is nil. Other information.

// inline example

g = PitchSet.calcPolarity;

g.doSomething; // explanation

g.cleanUpMethod;



asString

Short prose description of method.

// inline example

g = PitchSet.asString;

g.doSomething; // explanation

g.cleanUpMethod;



postcs

Short prose description of method.

// inline example

g = PitchSet.postcs;

g.doSomething; // explanation

g.cleanUpMethod;



gradusSuavitatis

Short prose description of method.

// inline example

g = PitchSet.gradusSuavitatis;

g.doSomething; // explanation

g.cleanUpMethod;



asHarmonicSeries

Short prose description of method.

// inline example

g = PitchSet.asHarmonicSeries;

g.doSomething; // explanation

g.cleanUpMethod;



asScale

Short prose description of method.

// inline example

g = PitchSet.asScale;

g.doSomething; // explanation

g.cleanUpMethod;



asRatios

Short prose description of method.

// inline example

g = PitchSet.asRatios;

g.doSomething; // explanation

g.cleanUpMethod;



plotHarmonicField (what, hollow, minval, title)

Short prose description of method.

what - Explanation of what. Default value is 'metric'. Other information.

hollow - Explanation of hollow. Default value is true. Other information.

minval - Explanation of minval. Default value is 0.010000. Other information.

title - Explanation of title. Default value is nil. Other information.

// inline example

g = PitchSet.plotHarmonicField;

g.doSomething; // explanation

g.cleanUpMethod;



plotHarmonicSpace (type)

Short prose description of method.

type - Explanation of type. Default value is '235'. Other information.

// inline example

g = PitchSet.plotHarmonicSpace;

g.doSomething; // explanation

g.cleanUpMethod;



Examples


// what this example does

e = PitchSet.new;

e.instanceMethod(someObject);

e.cleanUp;


...






z = Object.readArchive("/docs/supercolaider/Dissonance\ Curves/pitch_sets/even\ harmonics\ \[16,\ 1\ oct\].dis"); 


z.ratios = [ [ 1, 1 ], [ 35, 32 ], [ 7, 6 ], [ 6, 5 ], [ 5, 4 ], [ 35, 27 ], [ 4, 3 ], [ 11, 8 ], [ 7, 5 ], [ 3, 2 ], [ 11, 7 ], [ 8, 5 ], [ 5, 3 ], [ 7, 4 ], [ 9, 5 ], [ 28, 15 ] ];


b = PitchSet.with(z.ratios);

b.timbralSet.size;

w = b.harmonicSet.choose;


a = PitchSet.with(z.ratios, PitchSet.unisons.dim3.et19[2]);

a.harmonicSet



b.asScale

b.asHarmonicSeries

b.gradusSuavitatis


b.partition(PitchSet.unisons.dim4.et41[1])

b.harmonicSet.size

b.timbralSet.size

b.setH.cents.round(0.1)


b.plotHarmonicSpace

b.makeProbMatrix

b.plotHarmonicField