List of viewpoints » History » Version 6

Jeremy Gow, 2013-02-22 04:13 PM

1 6 Jeremy Gow
Based on "Pearce [2005]":http://webprojects.eecs.qmul.ac.uk/marcusp/papers/Pearce2005.pdf especially table 5.2, p 80 and the relevant source code - mostly in amuse-viewpoints. Entry order is based on category, then order of appearance in source file.
2 1 Marcus Pearce
3 2 Marcus Pearce
h1. Basic Viewpoints 
4 1 Marcus Pearce
5 2 Marcus Pearce
Unless otherwise indicated, these give information about the last event in the sequence
6 1 Marcus Pearce
7 3 Marcus Pearce
* *onset:* Start time (using <code>amuse:timepoint</code>)
8 3 Marcus Pearce
* *cpitch:* Midi pitch number, where chromatic notes are counted up and down from middle C = 60 (uses <code>amuse:chromatic-pitch-number</code>)
9 3 Marcus Pearce
* *dur:* Duration (using <code>amuse:duration</code>)
10 3 Marcus Pearce
* *keysig:* Integer indicating the position of the key signature on a line of fifths with C major = 0. Roughly corresponds to a positive count of the number of sharps or a negative count of the number of flats (corresponds exactly if the range is limited as indicated in the table to +/-7, since this avoids double accidentals, but that limitation appears unjustified in the general case). Uses <code>amuse:key-signature-sharps</code>.
11 2 Marcus Pearce
* *mode:* Major = 0, minor = 9 (the choice of 9 is based on an article about pitch sets in modes, allowing a crude representation of the simpler common modes: Dorian is 2, Lydian 5, etc).
12 2 Marcus Pearce
* *tempo:* Currently applicable tempo in bpm.
13 3 Marcus Pearce
* *pulses:* Beats/pulses/tactus units in a bar (uses <code>amuse:beat-units-per-bar</code> on the applicable time signature - this may give interesting results for unusual cases).
14 2 Marcus Pearce
* *barlength:* Basic time units (ticks) in a bar, based on the timebase (N.B. Viewpoints export information to a database and so avoid the arbitrary fractions used in amuse as a whole)
15 2 Marcus Pearce
* *deltast:* Gap between last note and its predecessor (returns 0 for first note).
16 2 Marcus Pearce
* *bioi:* Basic Inter Onset Interval between ultimate and penultimate onsets (returns 0 for first note).
17 2 Marcus Pearce
* *phrase:* 1 if event begins a phrase, -1 if it ends a phrase. Otherwise 0.
18 1 Marcus Pearce
19 2 Marcus Pearce
_Additional viewpoints (since Pearce, 2005)_
20 1 Marcus Pearce
21 2 Marcus Pearce
* *mpitch:* Meredith's morphetic pitch - count of name-notes (white notes) up or down from middle C = 35 (N.B. This number itself is 12 greater than the one used for the same purpose by AMuSE. I don't remember why or which DM himself uses - DL)
22 3 Marcus Pearce
* *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. Uses <code>amuse:diatonic-pitch-accidental</code>
23 1 Marcus Pearce
24 2 Marcus Pearce
_Viewpoints awaiting a general Amuse implementation_
25 1 Marcus Pearce
26 2 Marcus Pearce
*  *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
27 2 Marcus Pearce
*  *voice:* voice number in a score (voice 0 assumed to be the monody)
28 2 Marcus Pearce
*  *ornament:* note ornaments (0 = no ornament; 1 = accacciatura; 2 = mordent; 3 = trill)
29 2 Marcus Pearce
*  *comma:* 0 = no comma; 1 = comma (breath mark)
30 2 Marcus Pearce
*  *articulation:* 0 = no articulation mark; 1 = staccato; 2 = staccatissimo; 3 = sforzando; 4 = marcato
31 1 Marcus Pearce
32 3 Marcus Pearce
(These have _to do_ notes in <code>viewpoint-definitions.lisp</code>.)
33 1 Marcus Pearce
34 2 Marcus Pearce
h1. Derived Viewpoints 
35 1 Marcus Pearce
36 2 Marcus Pearce
h2. Primitive derived viewpoints 
37 1 Marcus Pearce
38 2 Marcus Pearce
* *ioi:* (onset) - Like bioi, though giving +undefined+ for one-event sequence.
39 2 Marcus Pearce
* *posinbar:* (onset) - Time offset from beginning of bar.
40 2 Marcus Pearce
* *dur-ratio:*  (dur) - Duration of last / duration of previous
41 2 Marcus Pearce
* *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.
42 2 Marcus Pearce
* *cpint:*  (cpitch) - Chromatic pitch interval
43 2 Marcus Pearce
* *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&rsquo;s code]).
44 2 Marcus Pearce
* *cpitch-class:*  (cpitch) - cpitch modulo 12 (so C = 0, D = 2, etc.)
45 2 Marcus Pearce
* *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. (It looks like this was originally calculated as cpcint-size and then redefined when cpcint-size was added. This makes it more consistent with cpint.)
46 2 Marcus Pearce
* *cpintfref:* (cpitch) - Chromatic interval from tonic (0 = tonic, 4 mediant, 7 dominant, etc.)
47 2 Marcus Pearce
* *cpintfip:*  (cpitch) - Chromatic interval from first event in piece.
48 2 Marcus Pearce
* *cpintfiph:*  (cpitch) - Chromatic interval from first event in phrase.
49 2 Marcus Pearce
* *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).
50 2 Marcus Pearce
* *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).
51 1 Marcus Pearce
52 2 Marcus Pearce
_Additional viewpoints (not in Pearce 2005)_
53 1 Marcus Pearce
54 2 Marcus Pearce
* *ioi-ratio:* (onset) - ioi divided by the previous ioi (requires at least 3 events).
55 2 Marcus Pearce
* *bioi-ratio:* (bioi) - bioi divided by the previous ioi (requires at least 3 events).
56 2 Marcus Pearce
* *bioi-contour:* (bioi) - whether bioi gets larger, smaller or stays the same between consecutive events
57 2 Marcus Pearce
* *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.
58 5 Marcus Pearce
* *cpint-size:* (cpitch) - Absolute value for <code>cpint</code> (not to be confused with <code>pint-size</code>, which is 20fl.oz.)
59 4 Marcus Pearce
* *newcontour:* (cpitch) - Returns 1 if contour is unchanged from preceding contour, 0 if it is different.
60 2 Marcus Pearce
* *cpcint-size:* (cpitch) - Absolute value for cpcint.
61 2 Marcus Pearce
* *cpcint-2:*  (cpitch) - cpcint-size modulo 2. No, I don't know why.
62 2 Marcus Pearce
* *cpcint-3:*  (cpitch) - cpcint-size modulo 3.
63 2 Marcus Pearce
* *cpcint-4:*  (cpitch) - cpcint-size modulo 4.
64 2 Marcus Pearce
* *cpcint-5:*  (cpitch) - cpcint-size modulo 5.
65 2 Marcus Pearce
* *cpcint-6:*  (cpitch) - cpcint-size modulo 6.
66 3 Marcus Pearce
* *octave:* (cpitch) - Octave number, where middle C (and the 11 notes above) is 5 (based on chromatic pitch, so the same as (but 1 higher) <code>amuse:octave</code>, but different from <code>amuse:diatonic-pitch octave</code>, which takes spelling into account)
67 2 Marcus Pearce
* *tessitura:*: (cpitch) Apparently based on something from the Bach chorales. 0 if lower than F# above middle C (probably including the complete range of Bach basses), 1 if between that F# and the D above it (no idea) and 2 if above that D (probably rare for altos in chorales, otherwise, top voice only).
68 2 Marcus Pearce
* *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).
69 6 Jeremy Gow
* *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.
70 2 Marcus Pearce
* *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.
71 2 Marcus Pearce
* *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.
72 2 Marcus Pearce
* *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)
73 2 Marcus Pearce
* *mpitch-class:* (mpitch) 0-7, representing the diatonic pitch set.
74 1 Marcus Pearce
75 2 Marcus Pearce
h2. Test viewpoints 
76 1 Marcus Pearce
77 2 Marcus Pearce
So called because they return a boolean value testing whether a condition is satisfied at a particular point in a melody:
78 1 Marcus Pearce
79 2 Marcus Pearce
* *fib* (onset): First In Bar (is this the first note in the current bar?)
80 2 Marcus Pearce
* *crotchet* (onset): is this note on a crotchet pulse?
81 2 Marcus Pearce
* *tactus* (onset): is this note on tactus pulse?
82 2 Marcus Pearce
* *fiph* (phrase): is this note the first in a phrase?
83 2 Marcus Pearce
* *liph* (phrase): is this note the last in a phrase?
84 1 Marcus Pearce
85 2 Marcus Pearce
h2. Threaded viewpoints 
86 1 Marcus Pearce
87 2 Marcus Pearce
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)
88 2 Marcus Pearce
89 2 Marcus Pearce
* *thrbar* (cpitch onset): cpint % fib
90 2 Marcus Pearce
* *thrfiph* (cpitch onset): cpint % fiph
91 2 Marcus Pearce
* *thrliph* (cpitch onset): cpint % liph
92 2 Marcus Pearce
* *thrqu* (cpitch onset): cpint % crotchet
93 2 Marcus Pearce
* *thrtactus* (cpitch onset): cpint % tactus
94 2 Marcus Pearce
* *thrintfrefliph* (cpitch onset): cpintfref % liph
95 2 Marcus Pearce
96 2 Marcus Pearce
h2. Linked viewpoints 
97 2 Marcus Pearce
98 2 Marcus Pearce
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.