Viewpoints » History » Version 6

Version 5 (Marcus Pearce, 2014-06-03 08:48 PM) → Version 6/7 (Marcus Pearce, 2014-06-03 08:48 PM)

h1. Viewpoints

{{>toc}}

Viewpoints are representations of musical structure. A number of functions are provided to help the user work with viewpoints and viewpoint data.

The [[List of Viewpoints|available viewpoints]] are described in "Pearce [2005]":http://webprojects.eecs.qmul.ac.uk/marcusp/papers/Pearce2005.pdf and implemented in the <code>derived-viewpoints/</code> directory in amuse-viewpoints. It is easy to implement new viewpoints, the examples in the code and [[Adding Viewpoints]] should help you get started.

h2. h1. Viewpoint sequences

The function <code>viewpoint-sequence</code> returns a representation of a melody (composition 0 in dataset 0) corresponding to the supplied viewpoint (chromatic pitch: cpitch). The output corresponds to the pitch of each note in the melody.

<pre>
CL-USER> (viewpoints:viewpoint-sequence
(viewpoints:get-viewpoint 'cpitch)
(md:get-event-sequence 0 0))
(65 62 60 60 60 60 65 65 65 69 69 69 69 69 67 65 65 65 62 60 60 65 69 69 67 65
60 60 60 60 65 65 65 65 69 69 69 69 72 72 77 74 72 69 69 69 69 65 67 69 65 65
65 77 74 72 74 76 77 72 72 74 72 74 76 77 74 72 74 76 77 76 77 74 72 69 67 65
67 77 77 74 72 74 76 77 72 72 74 72 74 76 77 76 74 72 69 69 69 69 67 65 67 69
65 65)
</pre>

h2. Derived viewpoints

We can also use viewpoints which represent derived features such as pitch interval (cpint) or IOI ratio (ioi-ratio). Note that because these two derived viewpoints represent relationships between notes, they are undefined for the first note in the sequence (which has no predecessor).

<pre>
CL-USER> (viewpoints:viewpoint-sequence
(viewpoints:get-viewpoint 'cpint)
(md:get-event-sequence 0 0))
(-3 -2 0 0 0 5 0 0 4 0 0 0 0 -2 -2 0 0 -3 -2 0 5 4 0 -2 -2 -5 0 0 0 5 0 0 0 4 0
0 0 3 0 5 -3 -2 -3 0 0 0 -4 2 2 -4 0 0 12 -3 -2 2 2 1 -5 0 2 -2 2 2 1 -3 -2 2
2 1 -1 1 -3 -2 -3 -2 -2 2 10 0 -3 -2 2 2 1 -5 0 2 -2 2 2 1 -1 -2 -2 -3 0 0 0
-2 -2 2 2 -4 0)
</pre>

<pre>
CL-USER> (viewpoints:viewpoint-sequence
(viewpoints:get-viewpoint 'ioi-ratio)
(md:get-event-sequence 0 0))
(1 1/2 1 1 1 2 1/2 1 1 1 1 1 2 1 1/2 1 2 1 1/2 1 2 1/2 1 3 1/3 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 2 1/2 1 1 1 2 3/2 1/3 1 1 1 1 2 1/2 1 1 1 1 1 4 1/4 1
1 1 1 1 1 1 1 1 1 1 2 1/2 1 1 1 1 1 2 1/2 1 1 1 1 1 2 1/2 1 1 1 1 1 1 1 1 1 2
1)
</pre>

h3. Linked viewpoints

Linked viewpoints are represented as a list of component viewpoints. Here is an example of linking pitch interval (cpint) with scale degree (cpintfref):

<pre>
CL-USER> (viewpoints:viewpoint-sequence
(viewpoints:get-viewpoint '(cpint cpintfref))
(md:get-event-sequence 0 0))
((-3 9) (-2 7) (0 7) (0 7) (0 7) (5 0) (0 0) (0 0) (4 4) (0 4) (0 4) (0 4)
(0 4) (-2 2) (-2 0) (0 0) (0 0) (-3 9) (-2 7) (0 7) (5 0) (4 4) (0 4) (-2 2)
(-2 0) (-5 7) (0 7) (0 7) (0 7) (5 0) (0 0) (0 0) (0 0) (4 4) (0 4) (0 4)
(0 4) (3 7) (0 7) (5 0) (-3 9) (-2 7) (-3 4) (0 4) (0 4) (0 4) (-4 0) (2 2)
(2 4) (-4 0) (0 0) (0 0) (12 0) (-3 9) (-2 7) (2 9) (2 11) (1 0) (-5 7) (0 7)
(2 9) (-2 7) (2 9) (2 11) (1 0) (-3 9) (-2 7) (2 9) (2 11) (1 0) (-1 11) (1 0)
(-3 9) (-2 7) (-3 4) (-2 2) (-2 0) (2 2) (10 0) (0 0) (-3 9) (-2 7) (2 9)
(2 11) (1 0) (-5 7) (0 7) (2 9) (-2 7) (2 9) (2 11) (1 0) (-1 11) (-2 9)
(-2 7) (-3 4) (0 4) (0 4) (0 4) (-2 2) (-2 0) (2 2) (2 4) (-4 0) (0 0))
</pre>

<pre>
CL-USER> (viewpoints:viewpoint-sequence
(viewpoints:get-viewpoint '(cpintfref dur metaccent))
(md:get-event-sequence 0 0))
((0 24 5) (9 24 4) (7 12 5) (7 12 3) (7 12 4) (7 12 3) (0 24 5) (0 12 4)
(0 12 3) (4 12 5) (4 12 3) (4 12 4) (4 12 3) (4 24 5) (2 24 4) (0 12 5)
(0 12 3) (0 24 4) (9 24 5) (7 12 4) (7 12 3) (0 24 5) (4 12 4) (4 12 3)
(2 36 5) (0 12 3) (7 12 5) (7 12 3) (7 12 4) (7 12 3) (0 12 5) (0 12 3)
(0 12 4) (0 12 3) (4 12 5) (4 12 3) (4 12 4) (4 12 3) (7 12 5) (7 12 3)
(0 12 4) (9 12 3) (7 12 5) (4 12 3) (4 12 4) (4 12 3) (4 24 5) (0 12 4)
(2 12 3) (4 12 5) (0 12 3) (0 24 4) (0 36 5) (0 12 3) (9 12 5) (7 12 3)
(9 12 4) (11 12 3) (0 24 5) (7 12 4) (7 12 3) (9 12 5) (7 12 3) (9 12 4)
(11 12 3) (0 36 5) (9 12 5) (7 12 3) (9 12 4) (11 12 3) (0 12 5) (11 12 3)
(0 12 4) (9 12 3) (7 12 5) (4 12 3) (2 12 4) (0 12 3) (2 24 5) (0 12 4)
(0 12 3) (9 12 5) (7 12 3) (9 12 4) (11 12 3) (0 24 5) (7 12 4) (7 12 3)
(9 12 5) (7 12 3) (9 12 4) (11 12 3) (0 24 5) (11 12 4) (9 12 3) (7 12 5)
(4 12 3) (4 12 4) (4 12 3) (4 12 5) (2 12 3) (0 12 4) (2 12 3) (4 24 5)
(0 24 4) (0 36 5))
</pre>

h2. Listing defined viewpoints

<code>viewpoints:list-viewpoints</code> returns a list of currently defined viewpoints::

<pre>
CL-USER> (viewpoints:list-viewpoints)
(VIEWPOINTS::ARTICULATION VIEWPOINTS::COMMA VIEWPOINTS::VOICE
VIEWPOINTS::ORNAMENT VIEWPOINTS::DYN
...)
</pre>

Similarly, particular categories of viewpoints can be listed using <code>viewpoints:list-basic</code>, <code>viewpoints:list-derived</code>, <code>viewpoints:list-linked</code> and <code>viewpoints:list-threaded</code>.

The function <code>predictors</code> lists the viewpoints which are derived from (and therefore capable of predicting) the supplied basic viewpoints:

<pre>
CL-USER> (viewpoints:predictors '(bioi))
(VIEWPOINTS::BIOI-RATIO VIEWPOINTS::BIOI-CONTOUR VIEWPOINTS::BIOI)
</pre>