Viewpoints » History » Version 5

Version 4 (Marcus Pearce, 2014-06-03 07:59 PM) → Version 5/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.

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 (6500 6200 6000 6000 6000 6000 6500 6500 6500 6900 6900 6900 6900 6900 6700
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 6500 6500 6500 6200 6000 6000 6500 6900 6900 6700 6500 6000 6000 6000 6000
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 6500 6500 6500 6500 6900 6900 6900 6900 7200 7200 7700 7400 7200 6900 6900
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 6900 6900 6500 6700 6900 6500 6500 6500 7700 7400 7200 7400 7600 7700 7200
65 65) 7200 7400 7200 7400 7600 7700 7400 7200 7400 7600 7700 7600 7700 7400 7200
6900 6700 6500 6700 7700 7700 7400 7200 7400 7600 7700 7200 7200 7400 7200
7400 7600 7700 7600 7400 7200 6900 6900 6900 6900 6700 6500 6700 6900 6500
6500)

</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 (-300 -200 0 0 0 5 500 0 0 4 400 0 0 0 0 -2 -2 -200 -200 0 0 -3 -2 -300 -200 0 5 4 500 400 0 -2 -2 -5 -200
-200 -500
0 0 0 5 500 0 0 0 4 400 0
0 0 3 300 0 5 -3 -2 -3 500 -300 -200 -300 0 0 0 -4 2 2 -4 -400 200
200 -400
0 0 12 -3 -2 2 2 1 -5 1200 -300 -200 200 200 100 -500 0 2 -2 2 2 1 -3 -2 2 200 -200 200 200 100 -300 -200
2 1 -1 1 -3 -2 -3 -2 -2 2 10 200 200 100 -100 100 -300 -200 -300 -200 -200 200 1000 0 -3 -2 2 2 1 -5 -300 -200 200 200 100
-500
0 2 -2 2 2 1 -1 -2 -2 -3 200 -200 200 200 100 -100 -200 -200 -300 0 0 0
-2 -2 2 2 -4
-200 -200 200 200 -400 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) ((-300 900) (-200 700) (0 7) 700) (0 7) 700) (0 7) (5 700) (500 0) (0 0) (0 0) (4 4) (400 400)
(0 4) 400) (0 4) 400) (0 4)
400) (0 4) (-2 2) (-2 400) (-200 200) (-200 0) (0 0) (0 0) (-3 9) (-2 7) (-300 900)
(-200 700)
(0 7) (5 700) (500 0) (4 4) (400 400) (0 4) (-2 2) 400) (-200 200) (-200 0) (-500 700)
(-2 0) (-5 7) (0 7) 700) (0 7) 700) (0 7) (5 700) (500 0) (0 0) (0 0) (0 0) (4 4) (400 400) (0 4) 400) (0 4) 400)
(0 4) (3 7) 400) (300 700) (0 7) (5 700) (500 0) (-3 9) (-2 7) (-3 4) (-300 900) (-200 700) (-300 400) (0 4) 400)
(0 4) 400) (0 4) (-4 400) (-400 0) (2 2)
(2 4) (-4
(200 200) (200 400) (-400 0) (0 0) (0 0) (12 (1200 0) (-3 9) (-2 7) (2 9) (2 11) (1
(-300 900) (-200 700) (200 900) (200 1100) (100
0) (-5 7) (-500 700) (0 7) 700)
(2 9) (-2 7) (2 9) (2 11) (1 (200 900) (-200 700) (200 900) (200 1100) (100 0) (-3 9) (-2 7) (2 9) (2 11) (1 (-300 900) (-200 700)
(200 900) (200 1100) (100
0) (-1 11) (1 (-100 1100) (100 0) (-300 900) (-200 700)
(-3 9) (-2 7) (-3 4) (-2 2) (-2 (-300 400) (-200 200) (-200 0) (2 2) (10 (200 200) (1000 0) (0 0) (-3 9) (-2 7) (2 9) (-300 900) (-200 700)
(2 11) (1 (200 900) (200 1100) (100 0) (-5 7) (-500 700) (0 7) (2 9) (-2 7) (2 9) (2 11) (1 700) (200 900) (-200 700) (200 900)
(200 1100) (100
0) (-1 11) (-2 9) (-100 1100) (-200 900) (-200 700) (-300 400) (0 400)
(-2 7) (-3 4) (0 4) 400) (0 4) (0 4) (-2 2) (-2 400) (-200 200) (-200 0) (2 2) (2 4) (-4 (200 200) (200 400) (-400 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>