1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #ad140d; min-height: 12.0px}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #ad140d}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
16 span
.s1
{font: 18.0px Helvetica
}
17 span
.s2
{text-decoration: underline
}
18 span
.s3
{color: #ad140d}
19 span
.s4
{color: #001bb9}
20 span
.s5
{color: #2c7014}
21 span
.Apple-tab-span
{white-space:pre
}
25 <p class=
"p1"><span class=
"s1"><b>convertRhythm
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>convert a rhythm-list to durations
</b></p>
26 <p class=
"p2"><br></p>
27 <p class=
"p1">message for SequenceableCollection
</p>
28 <p class=
"p3"><br></p>
29 <p class=
"p3"><br></p>
30 <p class=
"p1">supports a variation of Mikael Laurson's rhythm list RTM-notation.
<span class=
"Apple-converted-space"> </span></p>
31 <p class=
"p2"><br></p>
32 <p class=
"p1">see Laurson and Kuuskankare's
2003,
"From RTM-notation to ENP-score-notation"</p>
33 <p class=
"p1"><span class=
"s2">http://jim2003.agglo-montbeliard.fr/articles/laurson.pdf
</span><span class=
"Apple-converted-space"> </span></p>
34 <p class=
"p2"><br></p>
35 <p class=
"p2"><br></p>
36 <p class=
"p1">The method converts a collection of the form
<b>[beat-count, [rtm-list], repeats]
</b> to a List of Floats. A negative integer within the rtm-list equates to a value tied over to the duration following. The method is recursive in that any subdivision within the rtm-list can itself be a nested convertRhythm collection (see Example below). The repeats integer has a default value of
1.
</p>
37 <p class=
"p2"><br></p>
38 <p class=
"p1">If the divisions in the rtm-list are events, the event durations are interpreted as relative durations, and a list of events is returned.
</p>
39 <p class=
"p3"><br></p>
40 <p class=
"p4">// Examples
</p>
41 <p class=
"p3"><br></p>
42 <p class=
"p4">// using numbers as score
</p>
43 <p class=
"p5"><br></p>
44 <p class=
"p6">[
3, [
1,
2,
1],
1].convertRhythm;
<span class=
"s3">// List[
0.75,
1.5,
0.75 ]
</span></p>
45 <p class=
"p5"><br></p>
46 <p class=
"p6">[
2, [
1,
3, [
1, [
2,
1,
1,
1]],
1,
3],
1].convertRhythm;
</p>
47 <p class=
"p5"><br></p>
48 <p class=
"p6">[
2, [
1, [
1, [
2,
1,
1,
1]]],
1].convertRhythm;
</p>
49 <p class=
"p5"><br></p>
50 <p class=
"p6">[
2, [
1, [
1, [
2,
1,
1,
1]]],
2].convertRhythm;
<span class=
"s3">// repeat
</span></p>
51 <p class=
"p5"><br></p>
52 <p class=
"p6">[
2, [
1, [
1, [
2,
1,
1, -
1]]],
2].convertRhythm;
<span class=
"s3">// negative value is tied over.
</span></p>
53 <p class=
"p5"><br></p>
54 <p class=
"p5"><br></p>
55 <p class=
"p4">// sound example
</p>
56 <p class=
"p5"><br></p>
57 <p class=
"p6"><span class=
"s4">Pbind
</span>(
<span class=
"s5">\degree
</span>,
<span class=
"s4">Pseries
</span>(
0,
1,
<span class=
"s4">inf
</span>),
<span class=
"s5">\dur
</span>,
<span class=
"s4">Pseq
</span>([
2, [
1, [
1, [
2,
1,
1, -
1]]],
2].convertRhythm)).play;
</p>
58 <p class=
"p5"><br></p>