Working with viewpoints » History » Version 14
Marcus Pearce, 2014-06-03 08:52 PM
1 | 9 | Jeremy Gow | h2. Viewpoint values |
---|---|---|---|
2 | 1 | Jeremy Gow | |
3 | 4 | Jeremy Gow | <code>music-data:composition-viewpoint</code> will return the viewpoint values for a specific composition. For example, for composition 3 of dataset 0, pitch interval has the following values: |
4 | 1 | Jeremy Gow | |
5 | 1 | Jeremy Gow | <pre> |
6 | 4 | Jeremy Gow | CL-USER> (music-data:composition-viewpoint 0 3 'cpint) |
7 | 4 | Jeremy Gow | (0 -300 0 -200 -200 0 -100 100 200 -200 500 0 0 0 -100 100 200 -700 0 0 0 400 0 |
8 | 4 | Jeremy Gow | 100 200 0 -700 700 0 200 -200 -300 -400 200 -200) |
9 | 4 | Jeremy Gow | </pre> |
10 | 4 | Jeremy Gow | |
11 | 4 | Jeremy Gow | And the linked viewpoint <code>'(cpint ioi)</code> has: |
12 | 4 | Jeremy Gow | |
13 | 4 | Jeremy Gow | <pre> |
14 | 1 | Jeremy Gow | CL-USER> (music-data:composition-viewpoint 0 3 '(cpint ioi)) |
15 | 1 | Jeremy Gow | ((0 12) (-300 12) (0 12) (-200 12) (-200 24) (0 12) (-100 12) (100 12) (200 12) |
16 | 1 | Jeremy Gow | (-200 24) (500 12) (0 12) (0 12) (0 12) (-100 12) (100 12) (200 12) (-700 60) |
17 | 1 | Jeremy Gow | (0 12) (0 12) (0 12) (400 12) (0 12) (100 12) (200 12) (0 24) (-700 12) |
18 | 1 | Jeremy Gow | (700 24) (0 12) (200 12) (-200 12) (-300 12) (-400 12) (200 12) (-200 12)) |
19 | 1 | Jeremy Gow | </pre> |
20 | 4 | Jeremy Gow | |
21 | 4 | Jeremy Gow | Similarly, <code>music-data:dataset-viewpoint</code> returns the values for all compositions in a specific dataset, as a list of lists: |
22 | 4 | Jeremy Gow | |
23 | 4 | Jeremy Gow | <pre> |
24 | 4 | Jeremy Gow | CL-USER> (music-data:dataset-viewpoint 0 'cpint) |
25 | 4 | Jeremy Gow | ((-300 -200 0 0 0 500 0 0 400 0 0 0 0 -200 -200 0 0 -300 -200 0 500 400 0 -200 |
26 | 4 | Jeremy Gow | ...) |
27 | 4 | Jeremy Gow | (300 -300 100 -300 200 -200 -300 -400 1200 -300 100 -300 0 200 100 200 -300 |
28 | 4 | Jeremy Gow | ...) |
29 | 4 | Jeremy Gow | ...) |
30 | 4 | Jeremy Gow | </pre> |
31 | 4 | Jeremy Gow | |
32 | 4 | Jeremy Gow | You can also count the frequency of each symbol in a dataset (currently only implemented for numeric viewpoints): |
33 | 4 | Jeremy Gow | |
34 | 4 | Jeremy Gow | <pre> |
35 | 4 | Jeremy Gow | CL-USER> (utils:numeric-frequencies (music-data:dataset-viewpoint 0 'cpint)) |
36 | 4 | Jeremy Gow | ((-1400 . 3) (-1200 . 24) (-1100 . 1) (-1000 . 5) (-900 . 28) (-800 . 58) |
37 | 4 | Jeremy Gow | (-700 . 125) (-500 . 251) (-400 . 324) (-300 . 589) (-200 . 1408) (-100 . 341) |
38 | 4 | Jeremy Gow | (0 . 2127) (100 . 414) (200 . 1318) (300 . 432) (400 . 309) (500 . 435) |
39 | 4 | Jeremy Gow | (700 . 120) (800 . 11) (900 . 38) (1000 . 12) (1200 . 25) (1400 . 1) |
40 | 4 | Jeremy Gow | (1900 . 1)) |
41 | 10 | Jeremy Gow | </pre> |