Returns a extSimpleNumber.
Extensions to SimpleNumber
| format | Returns a string. |
| harmonics | |
| subharmonics | code:: |
Example
12.format;12.00Returns a string.
Example
x = Array.geom(20, 1000, 7/10);
x.collect { |n| n.format(precision: 3, width: 8) }.join("\n");1000.000
700.000
489.000
342.000
240.100
168.070
117.649
82.354
57.648
40.354
28.248
19.773
13.841
9.689
6.782
4.748
3.323
2.326
1.628
1.140Example
36.midicps.harmonics.cpsmidi.round(1/6).round(0.01).printAll;[ -inf, 36.0, 48.0, 55.0, 60.0, 63.83, 67.0, 69.67, 72.0, 74.0, 75.83, 77.5, 79.0, 80.33, 81.67, 82.83, 84.0, 85.0, 86.0, 87.0, 87.83, 88.67, 89.5, 90.33, 91.0, 91.67, 92.33, 93.0, 93.67, 94.33, 94.83, 95.5 ]
36.midicps.harmonics(indices: (1,3..29)).cpsmidi.round(1/6).round(0.01).printAll;[ -inf, 36.0, 48.0, 55.0, 60.0, 63.83, 67.0, 69.67, 72.0, 74.0, 75.83, 77.5, 79.0, 80.33, 81.67, 82.83, 84.0, 85.0, 86.0, 87.0, 87.83, 88.67, 89.5, 90.33, 91.0, 91.67, 92.33, 93.0, 93.67, 94.33, 94.83, 95.5 ]code:: 84.midicps.subharmonics.cpsmidi.round(1/6).round(0.01).printAll;
code:: 84.midicps.subharmonics(indices: (1,3..29)).cpsmidi.round(1/6).round(0.01).printAll;