This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/SequenceableCollection.schelp is in supercollider-common 1:3.8.0~repack-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
CLASS::SequenceableCollection
summary::Abstract superclass of integer indexable collections
categories::Collections>Ordered

DESCRIPTION::
SequenceableCollection is a subclass of Collection whose elements can be indexed by an Integer. It has many useful subclasses; link::Classes/Array:: and link::Classes/List:: are amongst the most commonly used.

CLASSMETHODS::

copymethod:: Collection *fill

method::series
Fill a SequenceableCollection with an arithmetic series.
code::
Array.series(5, 10, 2);
::

method::geom
Fill a SequenceableCollection with a geometric series.
code::
Array.geom(5, 1, 3);
::

method::fib
Fill a SequenceableCollection with a fibonacci series.
code::
Array.fib(5);
Array.fib(5, 2, 32); // start from 32 with step 2.
::
argument::size
the number of values in the collection
argument::a
the starting step value
argument::b
the starting value

method::rand
Fill a SequenceableCollection with random values in the range strong::minVal:: to strong::maxVal::.
code::
Array.rand(8, 1, 100);
::

method::rand2
Fill a SequenceableCollection with random values in the range -strong::val:: to +strong::val::.
code::
Array.rand2(8, 100);
::

method::linrand
Fill a SequenceableCollection with random values in the range strong::minVal:: to strong::maxVal:: with a linear distribution.
code::
Array.linrand(8, 1, 100);
::

method::exprand
Fill a SequenceableCollection with random values in the range strong::minVal:: to strong::maxVal:: with exponential distribution.
code::
Array.exprand(8, 1, 100);
::

method::interpolation
Fill a SequenceableCollection with the interpolated values between the strong::start:: and strong::end:: values.
code::
Array.interpolation(5, 3.2, 20.5);
::



INSTANCEMETHODS::


method::|@|
synonym for link::Classes/ArrayedCollection#-clipAt::.
code::
[3, 4, 5]|@|6;
::

method::@@
synonym for link::Classes/ArrayedCollection#-wrapAt::.
code::
[3, 4, 5]@@6;
[3, 4, 5]@@ -1;
[3, 4, 5]@@[6, 8]
::

method::@|@
synonym for link::Classes/ArrayedCollection#-foldAt::.
code::
[3, 4, 5]@|@[6, 8];
::

method::first
Return the first element of the collection.
code::
[3, 4, 5].first;
::

method::last
Return the last element of the collection.
code::
[3, 4, 5].last;
::

method::putFirst, putLast
Place strong::item:: at the first / last index in the collection. Note that if the collection is empty (and therefore has no indexed slots) the item will not be added.
code::
[3, 4, 5].putFirst(100);
[3, 4, 5].putLast(100);
::

method::indexOf
Return the index of an strong::item:: in the collection, or nil if not found.
code::
[3, 4, 100, 5].indexOf(100);
[3, 4, \foo, \bar].indexOf(\foo);
::

method::indexOfEqual
Return the index of something in the collection that equals the strong::item::, or nil if not found.
code::
[3, 4, "foo", "bar"].indexOfEqual("foo");
::

method::indicesOfEqual
Return an array of indices of things in the collection that equal the strong::item::, or nil if not found.
code::
y = [7, 8, 7, 6, 5, 6, 7, 6, 7, 8, 9];
y.indicesOfEqual(7);
y.indicesOfEqual(5);
::

method::indexOfGreaterThan
Return the first index containing an strong::item:: which is greater than strong::item::.
code::
y = List[ 10, 5, 77, 55, 12, 123];
y.indexOfGreaterThan(70);
::

method::selectIndices
Return a new collection of same type as receiver which consists of all indices of those elements of the receiver for which function answers code::true::. The function is passed two arguments, the item and an integer index.

code::
#[a, b, c, g, h, h, j, h].selectIndices({|item, i| item === \h})
::

If you want to control what type of collection is returned, use link::#-selectIndicesAs::

method::selectIndicesAs
Return a new collection of type emphasis::class:: which consists of all indices of those elements of the receiver for which function answers code::true::. The function is passed two arguments, the item and an integer index.

code::
#[a, b, c, g, h, h, j, h].selectIndicesAs({|item, i| item === \h}, Set)
::


method::rejectIndices
Return a new collection of same type as receiver which consists of all indices of those elements of the receiver for which function answers code::false::. The function is passed two arguments, the item and an integer index.

code::
#[a, b, c, g, h, h, j, h].rejectIndices({|item, i| item === \h})
::

If you want to control what type of collection is returned, use link::#-rejectIndicesAs::

method::rejectIndicesAs
Return a new collection of type emphasis::class:: which consists of all indices of those elements of the receiver for which function answers code::false::. The function is passed two arguments, the item and an integer index.

code::
#[a, b, c, g, h, h, j, h].rejectIndicesAs({|item, i| item === \h}, Set)
::

copymethod:: Collection -maxIndex

copymethod:: Collection -minIndex


method::find
If the strong::sublist:: exists in the receiver (in the specified order), at an offset greater than or equal to the initial strong::offset::, then return the starting index.
code::
y = [7, 8, 7, 6, 5, 6, 7, 6, 7, 8, 9];
y.find([7, 6, 5]);
::

method::findAll
Similar to link::#-find:: but returns an array of all the indices at which the sequence is found.
code::
y = [7, 8, 7, 6, 5, 6, 7, 6, 7, 8, 9];
y.findAll([7, 6]);
::

method::indexIn
Returns the closest index of the value in the collection (collection must be sorted).
code::
[2, 3, 5, 6].indexIn(5.2);
::

method::indexInBetween
Returns a linearly interpolated float index for the value (collection must be sorted). Inverse operation is link::#-blendAt::.
code::
x = [2, 3, 5, 6].indexInBetween(5.2);
[2, 3, 5, 6].blendAt(x);
::

method::blendAt
Returns a linearly interpolated value between the two closest indices. Inverse operation is link::#-indexInBetween::.
code::
x = [2, 5, 6].blendAt(0.4);
::

method::copyRange
Return a new SequenceableCollection which is a copy of the indexed slots of the receiver from strong::start:: to strong::end::. If strong::end:: < strong::start::, an empty collection is returned.
code::
(
var y, z;
z = [1, 2, 3, 4, 5];
y = z.copyRange(1, 3);
z.postln;
y.postln;
)
::
warning:: code::x.copyRange(a, b):: is strong::not:: equivalent to code::x[a..b]::. The latter compiles to link::Classes/ArrayedCollection#-copySeries::, which has different behavior when strong::end:: < strong::start::. ::

method::copyToEnd
Return a new SequenceableCollection which is a copy of the indexed slots of the receiver from strong::start:: to the end of the collection.
code::x.copyToEnd(a):: can also be written as code::x[a..]::

method::copyFromStart
Return a new SequenceableCollection which is a copy of the indexed slots of the receiver from the start of the collection to strong::end::.
code::x.copyFromStart(a):: can also be written as code::x[..a]::

method::remove
Remove strong::item:: from collection.

method::take
Remove and return strong::item:: from collection. The last item in the collection will move to occupy the vacated slot (and the collection size decreases by one). See also takeAt, defined for link::Classes/ArrayedCollection#-takeAt::.
code::
a = [11, 12, 13, 14, 15];
a.take(12);
a;
::

method::obtain
Retrieve an element from a given index (like link::Classes/SequenceableCollection#-at::). This method is also implemented in link::Classes/Object::, so that you can use it in situations where you don't want to know if the receiver is a collection or not. See also: link::Classes/SequenceableCollection#-instill::

argument::index
The index at which to look for an element

argument::default
If index exceeds collection size, or receiver is nil, return this instead

code::
(
a = [10, 20, 30];
b = [10, 20];
c = 7;
);

 // obtain third element, if outside bounds return 1
a.obtain(2, 1);
b.obtain(2, 1);
c.obtain(2, 1);
::

method::instill
Put an element at a given index (like link::Classes/SequenceableCollection#-put::). This method is also implemented in link::Classes/Object::, so that you can use it in situations where you don't want to know if the receiver is a collection or not. It will always return a new collection. See also: link::Classes/SequenceableCollection#-obtain::

argument::index
The index at which to put the item

argument::item
The object to put into the new collection

argument::default
If the index exceeds the current collection's size, extend the collection with this element

code::
(
a = [10, 20, 30, 40];
b = [10, 20];
c = 7;
);

a.instill(2, -1);
b.instill(2, -1);
c.instill(2, -1);
// providing a default value
c.instill(2, -1, 0);
::

method::keep
Keep the first strong::n:: items of the array. If strong::n:: is negative, keep the last -strong::n:: items.
code::
a = [1, 2, 3, 4, 5];
a.keep(3);
a.keep(-3);
::

method::drop
Drop the first strong::n:: items of the array. If strong::n:: is negative, drop the last -strong::n:: items.
code::
a = [1, 2, 3, 4, 5];
a.drop(3);
a.drop(-3);
::

method::join
Returns a link::Classes/String:: formed by connecting all the elements of the receiver, with strong::joiner:: inbetween. See also link::Classes/String#-split:: as the complementary operation.
code::
["m", "ss", "ss", "pp", ""].join("i").postcs;
"mississippi".split("i").postcs;
::

method::flat
Returns a collection from which all nesting has been flattened.
code::
[[1, 2, 3], [[4, 5], [[6]]]].flat;
::

method::flatten
Returns a collection from which strong::numLevels:: of nesting has been flattened.
code::
[[1, 2, 3], [[4, 5], [[6]]]].flatten(1).postcs;
[[1, 2, 3], [[4, 5], [[6]]]].flatten(2).postcs;
::

method::flop
Invert rows and columns in a two dimensional Collection (turn inside out). See also: link::Classes/Function::.
code::
[[1, 2, 3], [4, 5, 6]].flop;
[[1, 2, 3], [4, 5, 6], [7, 8]].flop; // shorter array wraps
[].flop; // result is always 2-d.
::
Note that the innermost arrays are not copied:
code::
a = [1, 2];
x = [[[a, 5], [a, 10]], [[a, 50, 60]]].flop;
a[0] = pi;
x // pi is everywhere
::


method::flopWith
Flop with a user defined function. Can be used to collect over several collections in parallel.
code::
[[1, 2, 3], [4, 5, 6]].flopWith(_+_);
[[1, 2, 3], 1, [7, 8]].flopWith{ |a,b,c| a+b+c }; // shorter array wraps

// typical use case (pseudocode)
[synths, buffers].flopWith{ |a,b| a.set(\buf, b) }
::
argument::func
A function taking as many arguments as elements in the array.

method::flopTogether
Invert rows and columns in a an array of dimensional Collections (turn inside out), so that they all match up in size, but remain separated.
code::
(
a = flopTogether(
	[[1, 2, 3], [4, 5, 6, 7, 8]] * 100,
	[[1, 2, 3], [4, 5, 6], [7, 8]],
	[1000]
)
);

a.collect(_.size); // sizes are the same
a.collect(_.shape) // shapes can be different
::


method::flopDeep
Fold dimensions in a multi-dimensional Collection (turn inside out).

argument::rank
The depth (dimension) from which the array is inverted inside-out.

code::
[[1, 2, 3], [[41, 52], 5, 6]].flopDeep(2);
[[1, 2, 3], [[41, 52], 5, 6]].flopDeep(1);
[[1, 2, 3], [[41, 52], 5, 6]].flopDeep(0);
[[1, 2, 3], [[41, 52], 5, 6]].flopDeep; // without argument, flop from the deepest level

[[[10, 100, 1000], 2, 3], [[41, 52], 5, 6]].flopDeep(2); // shorter array wraps
[].flopDeep(1); // result is always one dimension higher.
[[]].flopDeep(4);
::

note::Note that, just like in flop, the innermost arrays (deeper than rank) are not copied.::

code::
a = [1, 2];
x = [[[a, 5], [a, 10]], [[a, 50, 60]]].flopDeep(1);
a[0] = pi;
x // pi is everywhere
::

method::maxSizeAtDepth
Returns the maximum size of all subarrays at a certain depth (dimension)

argument::rank
The depth at which the size of the arrays is measured

code::
[[1, 2, 3], [[41, 52], 5, 6], 1, 2, 3].maxSizeAtDepth(2);
[[1, 2, 3], [[41, 52], 5, 6], 1, 2, 3].maxSizeAtDepth(1);
[[1, 2, 3], [[41, 52], 5, 6], 1, 2, 3].maxSizeAtDepth(0);
[].maxSizeAtDepth(0);
[[]].maxSizeAtDepth(0);
[[]].maxSizeAtDepth(1);
::

method::maxDepth
Returns the maximum depth of all subarrays.

argument::max
Internally used only.

code::
[[1, 2, 3], [[41, 52], 5, 6], 1, 2, 3].maxDepth
::

method::isSeries
Returns true if the collection is an arithmetic series.

argument::step
Step size to look for. If none is given, any step size will match.

code::
[ 0, 1, 2, 3, 4, 5 ].isSeries; // true
[ 1.5, 2.5, 3.5, 4.5, 5.5, 6.5 ].isSeries; // true
[ 0, 1, 4, 5 ].isSeries; // false
[ 0, 3, 6, 9, 12, 15 ].isSeries; // true
[ 0, 3, 6, 9, 12, 15 ].isSeries(1); // false
[ 2 ] // true
[ ] // true (empty sequence)
::

method::resamp0
Returns a new Collection of the desired length, with values resampled evenly-spaced from the receiver without interpolation.
code::
[1, 2, 3, 4].resamp0(12);
[1, 2, 3, 4].resamp0(2);
::

method::resamp1
Returns a new Collection of the desired length, with values resampled evenly-spaced from the receiver with linear interpolation.
code::
[1, 2, 3, 4].resamp1(12);
[1, 2, 3, 4].resamp1(3);
::

method::choose
Choose an element from the collection at random.
code::
[1, 2, 3, 4].choose;
::

method::wchoose
Choose an element from the collection at random using a list of probabilities or weights. The weights must sum to 1.0.
code::
[1, 2, 3, 4].wchoose([0.1, 0.2, 0.3, 0.4]);
::

method::sort
Sort the contents of the collection using the comparison function argument. The function should take two elements as arguments and return true if the first argument should be sorted before the second argument. If the function is nil, the following default function is used. { arg a, b; a < b }
code::
[6, 2, 1, 7, 5].sort;
[6, 2, 1, 7, 5].sort({ arg a, b; a > b }); // reverse sort
::

method::sortBy
Sort the contents of the collection using the key strong::key::, which is assumed to be found inside each element of the receiver.
code::
(
a = [
	Dictionary[\a->5, \b->1, \c->62],
	Dictionary[\a->2, \b->9, \c->65],
	Dictionary[\a->8, \b->5, \c->68],
	Dictionary[\a->1, \b->3, \c->61],
	Dictionary[\a->6, \b->7, \c->63]
]
)
a.sortBy(\b);
a.sortBy(\c);
::

method::order
Return an array of indices that would sort the collection into order. strong::function:: is treated the same way as for the link::#-sort:: method.
code::
[6, 2, 1, 7, 5].order;
::

method::swap
Swap two elements in the collection at indices strong::i:: and strong::j::.

method::pairsDo
Calls function for each subsequent pair of elements in the SequentialCollection. The function is passed the two elements and an index.
code::
[1, 2, 3, 4, 5].pairsDo({ arg a, b; [a, b].postln; });
::

method::doAdjacentPairs
Calls function for every adjacent pair of elements in the SequentialCollection. The function is passed the two adjacent elements and an index.
code::
[1, 2, 3, 4, 5].doAdjacentPairs({ arg a, b; [a, b].postln; });
::

method::separate
Separates the collection into sub-collections by calling the function for each adjacent pair of elements. If the function returns true, then a separation is made between the elements.
code::
[1, 2, 3, 5, 6, 8, 10].separate({ arg a, b; (b - a) > 1 }).postcs;
::

method::split
Separates the collection into sub-collections at the separator element or subarray. The separator is a link::Classes/Collection::, or anything that can be converted into the class this method is called on. It is strong::not:: included in the output array. The default separator is $/, for the common use in link::Classes/String::.
code::
[1, 2, 1, 2, 3, 1, 2, 1, 3].split([2, 1])
::

method::clump
Separates the collection into sub-collections by separating every groupSize elements.
code::
[1, 2, 3, 4, 5, 6, 7, 8].clump(3).postcs;
::

method::clumps
Separates the collection into sub-collections by separating elements into groupings whose size is given by integers in the groupSizeList.
code::
[1, 2, 3, 4, 5, 6, 7, 8].clumps([1, 2]).postcs;
::

method::curdle
Separates the collection into sub-collections by randomly separating elements according to the given probability.
code::
[1, 2, 3, 4, 5, 6, 7, 8].curdle(0.3).postcs;
::

method::integrate
Returns a collection with the incremental sums of all elements.
code::
[3, 4, 1, 1].integrate;
::

method::differentiate
Returns a collection with the pairwise difference between all elements.
code::
[3, 4, 1, 1].differentiate;
::

method::reduce
Applies the method named by operator to the first and second elements of the collection - then applies the method to the result and to the third element of the collection - then applies the method to the result and to the fourth element of the collection - and so on, until the end of the array.
code::
[3, 4, 5, 6].reduce('*'); // this is the same as [3, 4, 5, 6].product
[3, 4, 5, 6].reduce(\lcm); // Lowest common multiple of the whole set of numbers
["d", "e", (0..9), "h"].reduce('++'); // concatenation
[3, 4, 5, 6].reduce({ |a, b| sin(a) * sin(b) }); // product of sines
::
argument::operator
may be a link::Classes/Function:: or a link::Classes/Symbol::.

method::convertDigits
Returns an integer resulting from interpreting the elements as digits to a given base (default 10). See also asDigits in link::Classes/Integer#asDigits:: for the complementary method.
code::
[1, 0, 0, 0].convertDigits;
[1, 0, 0, 0].convertDigits(2);
[1, 0, 0, 0].convertDigits(3);
::

method::hammingDistance
Returns the count of array elements that are not equal in identical positions. http://en.wikipedia.org/wiki/Hamming_distance

The collections are not wrapped - if one array is shorter than the other, the difference in size should be included in the count.
code::
[0, 0, 0, 1, 1, 1, 0, 1, 0, 0].hammingDistance([0, 0, 1, 1, 0, 0, 0, 0, 1, 1]);
"SuperMan".hammingDistance("SuperCollider");
::

subsection::Math Support - Unary Messages

All of the following messages send the message link::#-performUnaryOp:: to the receiver with the unary message selector as an argument.

method::neg, reciprocal, bitNot, abs, asFloat, asInt, ceil, floor, frac, sign, squared, cubed, sqrt, exp, midicps, cpsmidi, midiratio, ratiomidi, ampdb, dbamp, octcps, cpsoct, log, log2, log10, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, rand, rand2, linrand, bilinrand, sum3rand, distort, softclip, coin, even, odd, isPositive, isNegative, isStrictlyPositive, real, imag, magnitude, magnitudeApx, phase, angle, rho, theta, asFloat, asInteger

method::performUnaryOp
Creates a new collection of the results of applying the selector to all elements in the receiver.
code::
[1, 2, 3, 4].neg;
[1, 2, 3, 4].reciprocal;
::

subsection::Math Support - Binary Messages

All of the following messages send the message link::#-performBinaryOp:: to the receiver with the binary message selector and the second operand as arguments.

method::+, -, *, /, div, %, **, min, max, <, <=, >, >=, &, |, bitXor, lcm, gcd, round, trunc, atan2, hypot, >>, +>>, ring1, ring2, ring3, ring4, difsqr, sumsqr, sqrdif, absdif, amclip, scaleneg, clip2, excess, <!, rrand, exprand

method::performBinaryOp
Creates a new collection of the results of applying the selector with the operand to all elements in the receiver. If the operand is a collection then elements of that collection are paired with elements of the receiver.
code::
([1, 2, 3, 4] * 10);
([1, 2, 3, 4] * [4, 5, 6, 7]);
::

subsection::Multichannel wrappers
All of the following messages are performed on the elements of this collection, using link::Classes/Object#-multiChannelPerform::.

The result depends on the objects in the collection, but the main use case is for link::Classes/UGen::s.

See also link::Guides/Multichannel-Expansion::

method::clip, wrap, fold, prune, linlin, linexp, explin, expexp, lincurve, curvelin, bilin, biexp, range, exprange, unipolar, bipolar, lag, lag2, lag3, lagud, lag2ud, lag3ud, varlag, slew, blend, checkBadValues
Calls code:: this.multiChannelPerform(selector, *args) :: where selector is the name of the message.

method::multichannelExpandRef
This method is called internally on inputs to UGens that take multidimensional arrays, like link::Classes/Klank:: and it allows proper multichannel expansion even in those cases. For SequenceableCollection, this returns the collection itself, assuming that it contains already a number of Refs. See link::Classes/Ref:: for the corresponding method implementation.
argument::rank
The depth at which the list is expanded. For instance the Klank spec has a rank of 2. For more examples, see link::Classes/SequenceableCollection#-flopDeep::
code::
`([[[100, 200], 500], nil, [[[0.01, 0.3], 0.8]]]).multichannelExpandRef(2);
[`[[100, 200], nil, [0.2, 0.8]], `[[130, 202], nil, [0.2, 0.5]]].multichannelExpandRef(2);
::

subsection:: Rhythm-lists
method:: convertRhythm
Convert a rhythm-list to durations.
discussion::
supports a variation of Mikael Laurson's rhythm list RTM-notation. footnote::
see Laurson and Kuuskankare's 2003, "From RTM-notation to ENP-score-notation"
http://jim2003.agglo-montbeliard.fr/articles/laurson.pdf
::

The method converts a collection of the form code:: [beat-count, [rtm-list], repeats] :: to a link::Classes/List:: of link::Classes/Float::s. 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.

If the divisions in the rtm-list are events, the event durations are interpreted as relative durations, and a list of events is returned.
code::
// using numbers as score
[3, [1, 2, 1], 1].convertRhythm; // List[ 0.75, 1.5, 0.75 ]
[2, [1, 3, [1, [2, 1, 1, 1]], 1, 3], 1].convertRhythm;
[2, [1, [1, [2, 1, 1, 1]]], 1].convertRhythm;
[2, [1, [1, [2, 1, 1, 1]]], 2].convertRhythm; // repeat
[2, [1, [1, [2, 1, 1, -1]]], 2].convertRhythm; // negative value is tied over.

// sound example
Pbind(\degree, Pseries(0, 1, inf), \dur, Pseq([2, [1, [1, [2, 1, 1, -1]]], 2].convertRhythm)).play;
::