Based on Pearce [2005] especially table 5.2, p 80 and the relevant source code - mostly in the subdirectory viewpoints
. Entry order is based on category, then order of appearance in source file.
Basic Viewpoints¶
Unless otherwise indicated, these give information about the last event in the sequence
- onset: Start time in basic time units (by default a crotchet, or quarter note, is 24 units)
- cpitch: Midi pitch number, where chromatic notes are counted up and down from middle C = 60
- dur: Duration in basic time units
- keysig: Integer indicating the position of the key signature on a line of fifths with C major = 0. Corresponds to a positive count of the number of sharps or a negative count of the number of flats (as long as the range is limited to +/-7, avoiding double accidentals).
- mode: Major = 0, minor = 9 (reflecting the fact that the minor mode corresponds to rotation of the pitch class set corresponding to its relative major scale by 9 semitones (see Balzano, 1982). This allows a crude representation of the simpler common modes: Dorian is 2, Lydian 5, etc)
- tempo: Currently applicable tempo in bpm.
- pulses: Number of beats/pulses/tactus units in a bar (essentially the numerator of the time signature).
- barlength: Basic time units (ticks) in a bar, based on the timebase and the denominator of the time signature
- deltast: Gap between last note and its predecessor (returns 0 for first note).
- bioi: Basic Inter Onset Interval between ultimate and penultimate onsets (returns 0 for first note).
- phrase: 1 if event begins a phrase, -1 if it ends a phrase. Otherwise 0.
Additional viewpoints (since Pearce, 2005)
- mpitch: Meredith's morphetic pitch - count of name-notes (white notes) up or down from middle C = 35
- accidental: Inflection of name note, so 0 for a natural, 1 for a single sharp, 2 for a double sharp, -1 for a flat and so on.
- dyn: (dynamics): ppppp = -11; pppp = -9; ppp = -7; pp = -5; p = -3; mp = -1; mf = 1; f = 3; ff = 5; fff = 7; ffff = 9; fffff = 11
- voice: voice number in a score (voice 1 assumed to be the monody)
- ornament: note ornaments (0 = no ornament; 1 = accacciatura; 2 = mordent; 3 = trill)
- comma: 0 = no comma; 1 = comma (breath mark)
- articulation: 0 = no articulation mark; 1 = staccato; 2 = staccatissimo; 3 = sforzando; 4 = marcato
Derived Viewpoints¶
Primitive derived viewpoints¶
- ioi: (onset) - Like bioi, though giving undefined for the first event in a sequence.
- posinbar: (onset) - Time offset from beginning of bar.
- dur-ratio: (dur) - Duration of last / duration of previous
- referent: (keysig) - Chromatic interval of tonic from C (e.g. C major gives 0, F minor gives 5, F major also 5, Bb minor 10). Necessary for deriving scale degree.
- cpint: (cpitch) - Chromatic pitch interval
- contour: (cpitch) - -1 for a descending interval, 0 unison, 1 ascending (equivalent to d, r and u respectively in [http://en.wikipedia.org/wiki/Parsons_code Parson’s code]).
- cpitch-class: (cpitch) - cpitch modulo 12 (so C = 0, D = 2, etc.)
- cpcint: (cpitch) - equivalent to cpint modulo 12 (so both perfect unison and perfect octave = 0), but preserving sign, so ascending and descending intervals are still discriminated. (This was originally calculated as cpcint-size and then redefined when cpcint-size was added, making it consistent with cpint.)
- cpintfref: (cpitch) - Chromatic interval from tonic (0 = tonic, 4 mediant, 7 dominant, etc.)
- cpintfip: (cpitch) - Chromatic interval from first event in piece.
- cpintfiph: (cpitch) - Chromatic interval from first event in phrase.
- cpintfib: (cpitch) - Chromatic interval from event at time 0 in bar (undefined if event is itself at time 0 or if there is nothing at time 0).
- inscale: (cpitch) - Returns 1 if event would not require an accidental as a result of the prevailing key signature and 0 if it would (i.e. in A minor, members of the set {A, B, C, D, E, F, G} return true, with all others, including the leading note returning 0).
Additional viewpoints (not in Pearce 2005)
- ioi-ratio: (onset) - ioi divided by the previous ioi (requires at least 3 events).
- ioi-contour (onset) - whether ioi get larger, smaller or stays the same between consecutive events
- metaccent (onset) - metrical accent (5 = downbeat, smaller integers fall on weaker metrical beats)
- bioi-ratio: (bioi) - bioi divided by the previous ioi (requires at least 3 events).
- bioi-contour: (bioi) - whether bioi gets larger, smaller or stays the same between consecutive events
- lphrase: (phrase) - I think that this finds the duration of the preceding phrase iff the last event in the sequence is at a phrase boundary.
- cpint-size: (cpitch) - Absolute value for
cpint
(not to be confused withpint-size
, which is 20fl.oz.) - newcontour: (cpitch) - Returns 1 if contour is unchanged from preceding contour, 0 if it is different.
- cpcint-size: (cpitch) - Absolute value for cpcint.
- cpcint-2: (cpitch) - cpcint-size modulo 2. Just because.
- cpcint-3: (cpitch) - cpcint-size modulo 3.
- cpcint-4: (cpitch) - cpcint-size modulo 4.
- cpcint-5: (cpitch) - cpcint-size modulo 5.
- cpcint-6: (cpitch) - cpcint-size modulo 6.
- octave: (cpitch) - Octave number, where middle C (and the 11 notes above) is 5 (based on chromatic pitch)
- tessitura:: (cpitch) Based on pitch tessitura of the Soprano voice of the Bach chorales (see Pearce, 2005, p. 206). 0 if more than one standard deviation below the mean pitch (F# above middle C), 2 if more than one standard deviation above the mean pitch (the D above middle C) and 2 if between these pitches.
- mpitch-class: (mpitch) 0-7, representing the diatonic pitch set.
Viewpoints based on the Implication Realisation model (Narmour, 1990; Krumhansl, 1995; Schellenberg, 1996)
- registral-direction: (cpitch) Is a large (>= perfect fifth) jump followed by a direction change? Is a small (<= perfect fourth) jump followed by a move in the same direction? If the answer to either is yes, return 1, otherwise 0. (N.B. a tritone move is undefined, I think because it isn't really relevant to the theory - the movement after a tritone is almost always to resolve a harmonic issue. Also, since this is based on chromatic intervals, despite my use of diatonic ones in the description, a diminished fifth and an augmented fourth would look the same).
- intervallic-difference: (cpitch) Is a large jump followed by a smaller (3 semitones smaller if in the same direction or 2 semitones if reversing the direction) jump? Is a small jump followed by a similar interval? I think this returns 1 in these cases, and 0 otherwise. I could be wrong.
- registral-return: (cpitch) If the last three notes form a move away from and then back to a pitch returns 3. If the returned to pitch is only a semitone away, returns 2, if a tone returns 1. Otherwise returns 0. The pitch contour must be an arch (\/ or /\), with a rising or falling contour or with any pitch repeated, this returns 0.
- proximity: (cpitch) 6 minus the number of semitones in the last interval: 0 if the last interval is a tritone or greater; 1 for a perfect fourth; 4 for a tone; 6 for a unison.
- closure: (cpitch) Also based on the shape defined by the last 3 notes. Scores 1 point for a change of direction, 1 point for an interval that is more than a tone smaller than the preceding one (so score can be 0, 1, 2)
Test viewpoints¶
So called because they return a Boolean value testing whether a condition is satisfied at a particular point in a melody:
- fib (onset): First In Bar (is this the first note in the current bar?)
- crotchet (onset): is this note on a crotchet pulse?
- tactus (onset): is this note on tactus pulse?
- fiph (phrase): is this note the first in a phrase?
- liph (phrase): is this note the last in a phrase?
Threaded viewpoints¶
So called because they return the value of any viewpoint at locations defined by a test viewpoint (and are undefined wherever the test viewpoint is false)
- thrbar (cpitch onset): cpint % fib
- thrfiph (cpitch onset): cpint % fiph
- thrliph (cpitch onset): cpint % liph
- thrqu (cpitch onset): cpint % crotchet
- thrtactus (cpitch onset): cpint % tactus
- thrintfrefliph (cpitch onset): cpintfref % liph
Linked viewpoints¶
Any viewpoints, basic or derived, may be linked into product type whose domain (or alphabet) is the Cartesian product of the domains of the component viewpoints. Pearce (2005) limited himself to a fixed collection of links between two component (basic or primitive derived) viewpoints but a link may contain any number of component viewpoints.