Skip to contents

Creates a scale table for equal divisions of a specified period.

Usage

et_scale_table(period = 2, divisions = 12, root_freq = 440/(2^(9/12)))

Arguments

period

The period - default is 2, for an octave

divisions

Number of degrees in the scale - default is 12

root_freq

root frequency of the scale - default is middle C: 440 / (2 ^ (9 / 12))

Value

a data.table with six columns:

  • degree: scale degree from zero to (number of notes) - 1

  • ratio_cents: the ratio in cents (hundredths of a semitone)

  • ratio_frac: the ratio as a vulgar fraction (character). The ratios for this type of scale are usually irrational, so this is an approximation, computed by fractional::fractional.

  • frequency: frequency of the note given the root_freq parameter

  • interval_cents: interval between this note and the previous note in cents

  • interval_frac: interval between this note and the previous note as a vulgar fraction

Examples


print(vanilla <- et_scale_table()) # default is 12EDO, of course
#> Key: <ratio_cents>
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>
#>  1:      0           0          1  261.6256             NA           1/0
#>  2:      1         100  1461/1379  277.1826            100     1461/1379
#>  3:      2         200  1714/1527  293.6648            100     1461/1379
#>  4:      3         300  1785/1501  311.1270            100     1461/1379
#>  5:      4         400    635/504  329.6276            100     1461/1379
#>  6:      5         500  3249/2434  349.2282            100     1461/1379
#>  7:      6         600   1393/985  369.9944            100     1461/1379
#>  8:      7         700  2213/1477  391.9954            100     1461/1379
#>  9:      8         800   1008/635  415.3047            100     1461/1379
#> 10:      9         900  3002/1785  440.0000            100     1461/1379
#> 11:     10        1000   1527/857  466.1638            100     1461/1379
#> 12:     11        1100  2943/1559  493.8833            100     1461/1379
#> 13:      0        1200          2  523.2511            100     1461/1379

# 19-EDO
print(edo19 <- et_scale_table(2.0, 19))
#> Key: <ratio_cents>
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>
#>  1:      0     0.00000          1  261.6256             NA           1/0
#>  2:      1    63.15789    977/942  271.3463       63.15789       977/942
#>  3:      2   126.31579    739/687  281.4282       63.15789       977/942
#>  4:      3   189.47368    627/562  291.8846       63.15789       977/942
#>  5:      4   252.63158   1009/872  302.7296       63.15789       977/942
#>  6:      5   315.78947  2333/1944  313.9776       63.15789       977/942
#>  7:      6   378.94737   1114/895  325.6434       63.15789       977/942
#>  8:      7   442.10526  1553/1203  337.7427       63.15789       977/942
#>  9:      8   505.26316  1442/1077  350.2915       63.15789       977/942
#> 10:      9   568.42105   1297/934  363.3066       63.15789       977/942
#> 11:     10   631.57895  1639/1138  376.8053       63.15789       977/942
#> 12:     11   694.73684   1077/721  390.8055       63.15789       977/942
#> 13:     12   757.89474  2406/1553  405.3259       63.15789       977/942
#> 14:     13   821.05263    895/557  420.3858       63.15789       977/942
#> 15:     14   884.21053  3893/2336  436.0053       63.15789       977/942
#> 16:     15   947.36842  1744/1009  452.2051       63.15789       977/942
#> 17:     16  1010.52632   1124/627  469.0068       63.15789       977/942
#> 18:     17  1073.68421   1123/604  486.4328       63.15789       977/942
#> 19:     18  1136.84211   1884/977  504.5062       63.15789       977/942
#> 20:      0  1200.00000          2  523.2511       63.15789       977/942
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>

# 31-EDO
print(edo31 <- et_scale_table(2.0, 31))
#> Key: <ratio_cents>
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>
#>  1:      0     0.00000          1  261.6256             NA           1/0
#>  2:      1    38.70968  1402/1371  267.5413       38.70968     1402/1371
#>  3:      2    77.41935  1189/1137  273.5908       38.70968     1402/1371
#>  4:      3   116.12903  1156/1081  279.7771       38.70968     1402/1371
#>  5:      4   154.83871    900/823  286.1032       38.70968     1402/1371
#>  6:      5   193.54839  1645/1471  292.5724       38.70968     1402/1371
#>  7:      6   232.25806    685/599  299.1879       38.70968     1402/1371
#>  8:      7   270.96774    987/844  305.9530       38.70968     1402/1371
#>  9:      8   309.67742  3999/3344  312.8710       38.70968     1402/1371
#> 10:      9   348.38710    982/803  319.9455       38.70968     1402/1371
#> 11:     10   387.09677  2211/1768  327.1799       38.70968     1402/1371
#> 12:     11   425.80645  3403/2661  334.5779       38.70968     1402/1371
#> 13:     12   464.51613  1500/1147  342.1432       38.70968     1402/1371
#> 14:     13   503.22581    781/584  349.8796       38.70968     1402/1371
#> 15:     14   541.93548    253/185  357.7908       38.70968     1402/1371
#> 16:     15   580.64516  1853/1325  365.8810       38.70968     1402/1371
#> 17:     16   619.35484  2783/1946  374.1541       38.70968     1402/1371
#> 18:     17   658.06452    370/253  382.6143       38.70968     1402/1371
#> 19:     18   696.77419   1168/781  391.2657       38.70968     1402/1371
#> 20:     19   735.48387   1147/750  400.1128       38.70968     1402/1371
#> 21:     20   774.19355  2557/1635  409.1599       38.70968     1402/1371
#> 22:     21   812.90323  3536/2211  418.4116       38.70968     1402/1371
#> 23:     22   851.61290    803/491  427.8725       38.70968     1402/1371
#> 24:     23   890.32258  6785/4057  437.5473       38.70968     1402/1371
#> 25:     24   929.03226   1387/811  447.4409       38.70968     1402/1371
#> 26:     25   967.74194   1198/685  457.5582       38.70968     1402/1371
#> 27:     26  1006.45161  2942/1645  467.9042       38.70968     1402/1371
#> 28:     27  1045.16129    823/450  478.4842       38.70968     1402/1371
#> 29:     28  1083.87097   1081/578  489.3034       38.70968     1402/1371
#> 30:     29  1122.58065   1465/766  500.3673       38.70968     1402/1371
#> 31:     30  1161.29032   1371/701  511.6813       38.70968     1402/1371
#> 32:      0  1200.00000          2  523.2511       38.70968     1402/1371
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>

# equal-tempered Bohlen-Pierce
print(bohlen_pierce_et <- et_scale_table(3.0, 13))
#> Key: <ratio_cents>
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>
#>  1:      0      0.0000          1  261.6256             NA           1/0
#>  2:      1    146.3042  1197/1100  284.6963       146.3042     1197/1100
#>  3:      2    292.6085    881/744  309.8015       146.3042     1197/1100
#>  4:      3    438.9127  1746/1355  337.1204       146.3042     1197/1100
#>  5:      4    585.2169   1025/731  366.8485       146.3042     1197/1100
#>  6:      5    731.5212  3691/2419  399.1980       146.3042     1197/1100
#>  7:      6    877.8254  2645/1593  434.4002       146.3042     1197/1100
#>  8:      7   1024.1296   1646/911  472.7066       146.3042     1197/1100
#>  9:      8   1170.4338  2090/1063  514.3909       146.3042     1197/1100
#> 10:      9   1316.7381   2101/982  559.7510       146.3042     1197/1100
#> 11:     10   1463.0423   1355/582  609.1111       146.3042     1197/1100
#> 12:     11   1609.3465   1135/448  662.8239       146.3042     1197/1100
#> 13:     12   1755.6508  6101/2213  721.2732       146.3042     1197/1100
#> 14:      0   1901.9550          3  784.8767       146.3042     1197/1100

# Carlos Alpha
print(carlos_alpha <- et_scale_table(1.5, 9))
#> Key: <ratio_cents>
#>     degree ratio_cents ratio_frac frequency interval_cents interval_frac
#>      <num>       <num> <charFrac>     <num>          <num>    <charFrac>
#>  1:      0       0.000          1  261.6256             NA           1/0
#>  2:      1      77.995  4472/4275  273.6818         77.995     4472/4275
#>  3:      2     155.990  1590/1453  286.2936         77.995     4472/4275
#>  4:      3     233.985  1321/1154  299.4865         77.995     4472/4275
#>  5:      4     311.980  1795/1499  313.2874         77.995     4472/4275
#>  6:      5     389.975    947/756  327.7243         77.995     4472/4275
#>  7:      6     467.970  1731/1321  342.8265         77.995     4472/4275
#>  8:      7     545.965  1453/1060  358.6246         77.995     4472/4275
#>  9:      8     623.960  2029/1415  375.1507         77.995     4472/4275
#> 10:      0     701.955        3/2  392.4383         77.995     4472/4275