UNPKG

mercury-lang

Version:

Parser for the mercury live coding language

4,419 lines 135 kB
{ "parseTree": { "global": { "randomSeed": [ 1618 ], "highPass": [ 5, 0 ], "lowPass": [ 18000, 0 ], "silence": false, "tempo": [ 120 ] }, "variables": { "ar1": [ 0, 12, 3.14, 56, 789 ], "ar2": [ 11, 22, 33, 44, 55 ], "ar3": [ "hat", "kick", 3.14, 123 ], "ar4": [ 0, 5, 7, 9 ], "ar5": [ 0, 12, 24, -12 ], "arr2d": [ 0, [ 1, 2 ], 3 ], "ar6": [ 0, [ 1, 2 ], 3, [ 4, 5, 6 ], 7 ], "arr2d2": [ "hat", [ "kick", "snare" ], 1.23, [ 4, 5, [ 6, 7 ] ], 8, 9 ], "spr1": [ 0, 2, 4, 7, 9 ], "spr2": [ -1, -0.6, -0.19999999999999996, 0.20000000000000018, 0.6000000000000001 ], "spr3": [ 0, 0.4, 0.8, 1.2000000000000002, 1.6 ], "spr4": [ 9, 7, 4, 2, 0 ], "spi1": [ 0, 3, 6, 9, 12 ], "spi2": [ -1, -0.5, 0, 0.5, 1 ], "spi3": [ 0, 0.5, 1, 1.5, 2 ], "spi4": [ 12, 9, 6, 3, 0 ], "spe1": [ 0, 0, 0, 0, 1, 2, 3, 4, 6, 8 ], "spe3": [ 0, 0.010000000000000002, 0.04000000000000001, 0.09, 0.16000000000000003, 0.25, 0.36, 0.48999999999999994, 0.6400000000000001, 0.81 ], "spe2": [ 0, 0, 0, 1, 1, 3, 4, 6, 7, 10 ], "fll1": [ 10, 10, 15, 15, 15, 20, 20, 20, 20 ], "fll2": [ "kick_min", "kick_min", "hat_min", "hat_min", "hat_min" ], "fll4": [ [ 10, 20 ], [ 10, 20 ], [ 30, 40 ], [ 30, 40 ], [ 30, 40 ], 50, 50, 50, 50 ], "sin1": [ 6, 9, 11, 11, 9, 6, 2, 0, 0, 2 ], "sin2": [ 0, 7, 11, 11, 7, 0, -7, -11, -11, -7 ], "sin3": [ 2, 4, 3, 1, 0, 2, 4, 3, 1, 0 ], "sin4": [ 0, 0.7071067811865475, 1, 0.7071067811865475, 2.220446049250313e-16, -0.7071067811865475, -1, -0.7071067811865477 ], "sin5": [ 0, 1, 2.220446049250313e-16, -1, -2.220446049250313e-16, 1, 4.440892098500626e-16, -1, -4.440892098500626e-16, 1, 6.661338147750939e-16, -1 ], "cos1": [ 12, 10, 7, 4, 1, 0, 1, 4, 7, 10 ], "cos2": [ 12, 9, 3, -3, -9, -12, -9, -3, 3, 9 ], "cos3": [ 5, 3, 0, 0, 3, 5, 3, 0, 0, 3 ], "cos4": [ 1, 0.7071067811865475, 2.220446049250313e-16, -0.7071067811865475, -1, -0.7071067811865477, -2.220446049250313e-16, 0.7071067811865475 ], "cos5": [ 1, 2.220446049250313e-16, -1, -2.220446049250313e-16, 1, 4.440892098500626e-16, -1, -4.440892098500626e-16, 1, 6.661338147750939e-16, -1, -7.771561172376096e-16 ], "cos6": [ 5, 4.981869023775715, 4.759699664850004, 4.133536324762456, 3.362670409172239, 3.080952542397787, 3.6969490017005704, 4.7695132643977, 4.699670064159827, 2.2324878512468693, -1.203092572597042, -3.2984929884038827, -3.6539187183057336, -2.186410200678026, 1.8461586559918333, 5, 1.0315814720653655, -4.398306964558529, -4.515620062941689, -3.425851888108187, -4.421027304704725, -4.245867288468413, 2.8758339633413543, 2.695057547203894, -4.9127745734030075, -0.8847691352651639, 3.23333863360652, 3.088084178219347, -1.7349515100508905, -3.915449007160891 ], "saw1": [ 0, 6, 0, 7, 1, 7, 2, 8, 3, 9, 3, 10, 4, 10, 5, 11 ], "saw2": [ -1, -0.7999999999999998, -0.6000000000000001, -0.3999999999999999, -0.20000000000000018, 0, 0.20000000000000018, 0.40000000000000036, 0.6000000000000001, 0.7999999999999998, -1, -0.7999999999999998, -0.6000000000000001, -0.3999999999999999, -0.19999999999999973, 0, 0.20000000000000018, 0.40000000000000036, 0.5999999999999996, 0.7999999999999998, -1, -0.7999999999999998, -0.5999999999999996, -0.39999999999999947, -0.20000000000000018 ], "sqr1": [ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], "euc1": [ 1, 0, 1, 0, 1, 0, 1, 0 ], "euc2": [ 1, 0, 1, 1, 0, 1, 1 ], "euc3": [ 1, 1, 1, 0, 1, 1, 0 ], "hex1": [ 1, 0, 0, 0 ], "hex2": [ 1, 0, 1, 0 ], "hex3": [ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1 ], "fib1": [ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ], "fib2": [ 55, 89, 144 ], "psn1": [ 0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1 ], "psn2": [ 0, 1, 1, 2, 0, 2, 2, 1 ], "psn3": [ 0, 1, 1, 2, 3, 5, 8, 2, 10, 1 ], "psn4": [ 0 ], "pll1": [ 0, 1, 2, 5, 12, 29, 70, 169 ], "luc1": [ 2, 1, 3, 4, 7, 11, 18, 29 ], "tfi1": [ 0, 1, 3, 10, 33, 109, 360, 1189 ], "rnd1": [ 1, 0, 0, 1, 1 ], "rnd2": [ 0, 10, 3, 2, 2 ], "rnd3": [ -2, -5, -8, -11, 6 ], "rnf1": [ 0.8058498289218644, 0.3163148094898582, 0.007532787829040017, 0.8482322441015784, 0.8804237524761249 ], "rnf2": [ 0.16185728276293349, 10.718181179500387, 3.156664264442898, 2.620748036171197, 2.337796020500035 ], "rnf3": [ -1.185612895604896, -4.21355908172808, -7.360432780758847, -10.309091860207936, 6.823278536445663 ], "urn1": [ 3, 7, 10, 0, 2 ], "urn2": [ 0, 2, 1, 3, 1, 3, 0, 2 ], "urn3": [ 13, 10, 12, 11, 12, 10, 13, 11 ], "coin1": [ 1, 0, 1, 0, 1, 0, 1, 1 ], "dice1": [ 5, 4, 6, 4, 4, 5, 4, 2 ], "twv1": [ 10, 7, 6, 3, 2, 9, 8, 4, 1, 5, 0, 11 ], "samples": [ "kick", "snare", "hat" ], "chs1": [ "hat", "kick", "hat", "kick", "hat", "snare", "kick", "hat", "hat", "hat" ], "notes": [ 0, 5, 7, 3, 7, 7, 0, 12, 5 ], "chs2": [ 0, 5, 3, 9, 0, 7, 3, 12, 3, 7 ], "pck1": [ "hat", "kick", "tom", "snare", "tom", "hat", "snare", "kick", "tom", "hat" ], "pck2": [ 3, 0, 7, 9, 12, 5, 0, 7, 12, 9 ], "shf1": [ "snare", "tom", "kick", "hat" ], "shf2": [ 12, 0, 3, 7, 5, 9 ], "clv1": [ 1, 0, 1, 0, 1, 0, 0, 1 ], "clv2": [ 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0 ], "clv3": [ 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1 ], "exp4": [ 0, 9, 7, 3, 5, 0, -1, -3, -1, 8, 3, 2 ], "exp5": [ 0, 9, 7, 3, 5, 0, -1, -2, 0, -5, -9, -11 ], "cln1": [ 0, 3, 7, 12, 15, 19, 7, 10, 14, -7, -4, 0 ], "chrd": [ [ 0, 3, 7 ], 0 ], "cln2": [ [ 0, 3, 7 ], 0, [ 10, 13, 17 ], 10, [ 20, 23, 27 ], 20, [ -10, -7, -3 ], -10 ], "chrd2": [ [ "c", "e" ], [ "g", "b" ], "d" ], "cln3": [ [ "c4", "e4" ], [ "g4", "b4" ], "d4", [ "c5", "e5" ], [ "g5", "b5" ], "d5" ], "partA": [ 0, 3, 7, 5, 0 ], "partB": [ 12, 19, 15 ], "partC": [ 24, 22 ], "cmb1": [ [ 0, 3 ], 7, 24, [ 19 ], 12, -7, [ -5, [ -3 ] ] ], "partD": [ "hat", [ "hat", "hat", "snare" ] ], "jn1": [ "kick", "hat", "snare", "hat", "hat", [ "hat", "hat", "snare" ] ], "dup1": [ 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9 ], "pad1": [ 3, 7, 11, 12 ], "pad2": [ 3, 7, 11, 12, 0, 0, 0, 0, 0 ], "pad3": [ "-", "-", "-", "-", "c", "f", "g", "-", "-", "-", "-" ], "rhythm": [ 1, 1, 0, 1, 1 ], "evr1": [ 1, 0, 1, 1, 0, 1, 1, 0, 0 ], "melody": [ 0, 3, 7, 5 ], "evr2": [ 5, 7, 3, 9, 1, 12, 12, 12, 12 ], "evr3": [ 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0 ], "evr4": [ "c4", "eb4", "g4", "f4", "eb4", "r", "r", "r", "r", "r", "r" ], "fln1": [ 0, 1, 2, 3, 4, 5, 6, 7 ], "fln2": [ 0, 1, 2, 3, 4, 5, 6, 7, 1 ], "inv1": [ 12, 9, 5, 0 ], "inv2": [ 10, 7, 3, -2 ], "inv3": [ 13, 10, 6, 1 ], "inv4": [ 13, [ 10, [ 6, 1 ] ] ], "flt1": [ 0, 7, 7, 5, 12, 0 ], "flt2": [ 0, 3, 0, 3, 3 ], "flt3": [ 0, [ 7, 7, 5 ], [ 12, 0, 3 ] ], "lc2": [ 0, [ 7, 7 ], 9, [ 0, 0 ], [ 9, 9 ], 9 ], "merged": [ [ 0, 12 ], [ 3, 19 ], [ 7, 15 ], [ 5 ], [ 0 ] ], "mrg2": [ [ "c4", "e4", "f4", "a4", "g4" ], [ "c4", "g4" ] ], "lk1": [ "c4", "e4", "e4", "f4", "c4", "f4", "f4", "e4" ], "lk2": [ "c4", [ "e4", "e4", [ "f4", "g4" ], "c4" ], "f4" ], "lk3": [ "e4", "c4", "c4", "c4", "c4", "c4", "e4", "c4" ], "pln1": [ 0, [ 3, 7 ], 12, 12, [ 3, 7 ], 0 ], "pln2": [ 0, [ 3, 7 ], 12, [ 3, 7 ] ], "left": [ 7, 5, 7, 9, 12, 0, 3 ], "right": [ 9, 12, 0, 3, 7, 5, 7 ], "rev": [ 5, 7, 3, 0 ], "phrase": [ 0, 0, 0, 0, 3, 3, 3, 3, 7, 7, 7, 7 ], "rpt1": [ [ 0, 3 ], [ 0, 3 ], [ 0, 3 ], [ 0, 3 ], 7, 7, 7, 7 ], "repeats": [ 2, 5, 3 ], "phraseB": [ [ 0, 3 ], [ 0, 3 ], 7, 7, 7, 7, 7 ], "beats": [ "kick", "kick", "snare", "snare", "snare", "snare", "snare", "hat", "hat", "hat" ], "srt1": [ 0, 0, 2, 3, 4, 4, 6, 6, 7, 8, 8, 10 ], "srt2": [ 10, 8, 8, 7, 6, 6, 4, 4, 3, 2, 0, 0 ], "places": [ 1, 0, 0, 1, 1, 0, 1, 0, 1, 0 ], "sprayed": [ 12, 0, 0, 19, 15, 0, 17, 0, 12, 0 ], "slc1": [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7 ] ], "slc2": [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7, 8, 9 ] ], "spl1": [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ], [ 9, 10, 11 ] ], "spl2": [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7 ], [ 8, 9 ], [ 10, 11 ] ], "ct": [ 0, 1, 2 ], "thinned": [ 0, 5, 7, 3, 12 ], "nts": [ 0, 9, 7, 3, 5, 0, -1 ], "str": [ 0, 0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 11, 11, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7 ], "strF": [ 0, 0.7346938775510203, 1.4693877551020407, 2.204081632653061, 2.9387755102040813, 3.673469387755102, 4.408163265306122, 5.142857142857142, 5.877551020408163, 6.612244897959185, 7.346938775510204, 8.081632653061224, 8.816326530612244, 9.551020408163264, 10.285714285714285, 11.020408163265307, 11.755102040816325, 11.714285714285714, 11.285714285714285, 10.857142857142858, 10.428571428571429, 10, 9.571428571428571, 9.142857142857142, 8.714285714285715, 8.285714285714285, 7.857142857142858, 7.42857142857143, 7.000000000000001, 6.571428571428571, 6.142857142857142, 5.7142857142857135, 5.2857142857142865, 5.040816326530612, 5.163265306122449, 5.2857142857142865, 5.408163265306123, 5.530612244897959, 5.653061224489796, 5.775510204081632, 5.8979591836734695, 6.020408163265307, 6.142857142857142, 6.26530612244898, 6.387755102040815, 6.5102040816326525, 6.63265306122449, 6.755102040816327, 6.877551020408163, 7 ], "exp": [ 0, 9, 7, 3, 5, 0, -1, -3, -1, 8, 3, 2, -2, -7, -11, -9, -11, -2, -3, -8, -9, -13, -11, -13, -4, -6, 3, 2, -2, 0 ], "exp2": [ 0, 9, 7, 3, 5, 0, -1, -5, 4, -1, 1, -1, -2, -6, -7, 2, 0, -5, -3, -4, -2, 7, 2, 0, -4, -2, -6, -7, -9, -14 ], "mtn3": [ "c4", [ "eb4", "g4", "a4" ], [ "a3", "f4" ] ], "mtf1": [ 261.6255653005986, [ 311.12698372208087, 391.99543598174927, 440 ], [ 220, 349.2282314330039 ] ], "ntm1": [ 60, [ 63, 67, 69 ], [ 57, 65 ] ], "ntf1": [ 261.6255653005986, [ 311.12698372208087, 391.99543598174927, 440 ], [ 220, 349.2282314330039 ] ], "ftm1": [ 60, [ 63, 67, 69 ], [ 57, 65 ] ], "ftm2": [ 59.9585553965427, [ 62.99293267927131, 66.95598100539232, 69 ], [ 57, 64.98868215221991 ] ], "ftn1": [ "c4", [ "eb4", "g4", "a4" ], [ "a3", "f4" ] ], "rtm1": [ [ 48, 51, 55 ], [ 60, 64, 67 ], [ 62, 65, 69 ] ], "rtm2": [ [ 130.8127826502993, 155.56349186104043, 195.99771799087463 ], [ 261.6255653005986, 329.6275569128699, 391.99543598174927 ], [ 293.6647679174076, 349.2282314330039, 440 ] ], "rtc1": [ 1200, [ 701.9550008653874, [ 498.04499913461245, 386.3137138648348 ] ], 203.91000173077484 ], "divs": [ "1/4", [ "1/8", [ "3/16", "1/4" ] ], "1/6", 2 ], "ms1": [ 500, [ 250, [ 375, 500 ] ], 333.3333333333333, 4000 ], "ms2": [ 600, [ 300, [ 450, 600 ] ], 400, 4800 ], "ratios": [ 0.25, [ 0.125, [ 0.1875, 0.25 ] ], 0.1667, 2 ], "ms3": [ 600, [ 300, [ 450, 600 ] ], 400.08, 4800 ], "comb": [ "1/4", [ 0.125, [ "3/15", 0.25 ] ], "1/6", 2 ], "ms4": [ 600, [ 300, [ 480, 600 ] ], 400, 4800 ], "tv1": [ 0.25, [ 0.08333333333333333, [ 0.09375, 0.75 ] ], 0.03125, 3 ], "tv2": [ 0.25, [ 0.08333333333333333, [ 0.09375, 0.75 ] ], 0.03125, 3 ], "wr1": [ 3, [ 4, [ 2, 3 ] ], [ 4, 2 ], 3 ], "ct1": [ 2, [ 2, [ 2, 3 ] ], [ 4, 5 ], 5 ], "fl1": [ 3.999999999999999, [ 2.9999999999999996, [ 2, 3 ] ], [ 4, 5 ], 4 ], "sc1": [ -1, [ -0.5, [ 0, 0.5 ] ], 1 ], "arm1": [ 11, [ 22, 33, 42 ] ], "arm2": [ -9, [ -18, -27, -38 ] ], "arm3": [ 10, [ 40, 90, 80 ] ], "arm4": [ 0.1, [ 0.1, 0.1, 0.05 ] ] }, "objects": {}, "groups": { "all": [] }, "print": [ [ 0, 12, 3.14, 56, 789 ], [ 11, 22, 33, 44, 55 ], [ "hat", "kick", 3.14, 123 ], [ 0, 5, 7, 9 ], [ 0, 12, 24, -12 ], [ 0, [ 1, 2 ], 3 ], [ 0, [ 1, 2 ], 3, [ 4, 5, 6 ], 7 ], [ "hat", [ "kick", "snare" ], 1.23, [ 4, 5, [ 6, 7 ] ], 8, 9 ], [ 0, 2, 4, 7, 9 ], [ -1, -0.6, -0.19999999999999996, 0.20000000000000018, 0.6000000000000001 ], [ 0, 0.4, 0.8, 1.2000000000000002, 1.6 ], [ 9, 7, 4, 2, 0 ], [ 0, 3, 6, 9, 12 ], [ -1, -0.5, 0, 0.5, 1 ], [ 0, 0.5, 1, 1.5, 2 ], [ 12, 9, 6, 3, 0 ], [ 10, 10, 15, 15, 15, 20, 20, 20, 20 ], [ "kick_min", "kick_min", "hat_min", "hat_min", "hat_min" ], [ 6, 9, 11, 11, 9, 6, 2, 0, 0, 2 ], [ 0, 7, 11, 11, 7, 0, -7, -11, -11, -7 ], [ 2, 4, 3, 1, 0, 2, 4, 3, 1, 0 ], [ 0, 0.7071067811865475, 1, 0.7071067811865475, 2.220446049250313e-16, -0.7071067811865475, -1, -0.7071067811865477 ], [ 0, 1, 2.220446049250313e-16, -1, -2.220446049250313e-16, 1, 4.440892098500626e-16, -1, -4.440892098500626e-16, 1, 6.661338147750939e-16, -1 ], [ 12, 10, 7, 4, 1, 0, 1, 4, 7, 10 ], [ 12, 9, 3, -3, -9, -12, -9, -3, 3, 9 ], [ 5, 3, 0, 0, 3, 5, 3, 0, 0, 3 ], [ 1, 0.7071067811865475, 2.220446049250313e-16, -0.7071067811865475, -1, -0.7071067811865477, -2.220446049250313e-16, 0.7071067811865475 ], [ 1, 2.220446049250313e-16, -1, -2.220446049250313e-16, 1, 4.440892098500626e-16, -1, -4.440892098500626e-16, 1, 6.661338147750939e-16, -1, -7.771561172376096e-16 ], [ 1, 0, 1, 0, 1, 0, 1, 0 ], [ 1, 0, 1, 1, 0, 1, 1 ], [ 1, 1, 1, 0, 1, 1, 0 ], [ 1, 0, 0, 0 ], [ 1, 0, 1, 0 ], [ 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1 ], [ 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ], [ 55, 89, 144 ], [ 0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1 ], [ 0, 1, 1, 2, 0, 2, 2, 1 ], [ 0, 1, 1, 2, 3, 5, 8, 2, 10, 1 ], [ 0 ], [ 0, 1, 2, 5, 12, 29, 70, 169 ], [ 2, 1, 3, 4, 7, 11, 18, 29 ], [ 0, 1, 3, 10, 33, 109, 360, 1189 ], [ 1, 0, 0, 1, 1 ], [ 0, 10, 3, 2, 2 ], [ -2, -5, -8, -11, 6 ], [ 0.8058498289218644, 0.3163148094898582, 0.007532787829040017, 0.8482322441015784, 0.8804237524761249 ], [ 0.16185728276293349, 10.718181179500387, 3.156664264442898, 2.620748036171197, 2.337796020500035 ], [ -1.185612895604896, -4.21355908172808, -7.360432780758847, -10.309091860207936, 6.823278536445663 ], [ 3, 7, 10, 0, 2 ], [ 0, 2, 1, 3, 1, 3, 0, 2 ], [ 13, 10, 12, 11, 12, 10, 13, 11 ], [ 1, 0, 1, 0, 1, 0, 1, 1 ], [ 5, 4, 6, 4, 4, 5, 4, 2 ], [ 10, 7, 6, 3, 2, 9, 8, 4, 1, 5, 0, 11 ], [ "hat", "kick", "hat", "kick", "hat", "snare", "kick", "hat", "hat", "hat" ], [ 0, 5, 3, 9, 0, 7, 3, 12, 3, 7 ], [ "hat", "kick", "tom", "snare", "tom", "hat", "snare", "kick", "tom", "hat" ], [ 3, 0, 7, 9, 12, 5, 0, 7, 12, 9 ], [ "snare", "tom", "kick", "hat" ], [ 12, 0, 3, 7, 5, 9 ], [ 0, 3, 7, 12, 15, 19, 7, 10, 14, -7, -4, 0 ], [ [ 0, 3 ], 7, 24, [ 19 ], 12, -7, [ -5, [ -3 ] ] ], [ "kick", "hat", "snare", "hat", "hat", [ "hat", "hat", "snare" ] ], [ 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9 ], [ 1, 0, 1, 1, 0, 1, 1, 0, 0 ], [ 5, 7, 3, 9, 1, 12, 12, 12, 12 ], [ 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0 ], [ "c4", "eb4", "g4", "f4", "eb4", "r", "r", "r", "r", "r", "r" ], [ 0, 1, 2, 3, 4, 5, 6, 7 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 1 ], [ 12, 9, 5, 0 ], [ 10, 7, 3, -2 ], [ 13, 10, 6, 1 ], [ 13, [ 10, [ 6, 1 ] ] ], [ 0, 7, 7, 5, 12, 0 ], [ 0, 3, 0, 3, 3 ], [ 0, [ 7, 7, 5 ], [ 12, 0, 3 ] ], [ 0, 12, 24, 3, 19, 22, 7, 15, 5, 0 ], [ [ 0, 12 ], [ 3, 19 ], [ 7, 15 ], [ 5 ], [ 0 ] ], [ [ "c4", "e4", "f4", "a4", "g4" ], [ "c4", "g4" ] ], [ 0, [ 3, 7 ], 12, 12, [ 3, 7 ], 0 ], [ 0, [ 3, 7 ], 12, [ 3, 7 ] ], [ 7, 5, 7, 9, 12, 0, 3 ], [ 9, 12, 0, 3, 7, 5, 7 ], [ 5, 7, 3, 0 ], [ [ 0, 3 ], [ 0, 3 ], [ 0, 3 ], [ 0, 3 ], 7, 7, 7, 7 ], [ [ 0, 3 ], [ 0, 3 ], 7, 7, 7, 7, 7 ], [ "kick", "kick", "snare", "snare", "snare", "snare", "snare", "hat", "hat", "hat" ], [ 0, 0, 2, 3, 4, 4, 6, 6, 7, 8, 8, 10 ], [ 10, 8, 8, 7, 6, 6, 4, 4, 3, 2, 0, 0 ], [ 12, 0, 0, 19, 15, 0, 17, 0, 12, 0 ], [ 0, 5, 7, 3, 12 ], [ 0, 0, 1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 11, 11, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7 ], [ 0, 0.7346938775510203, 1.4693877551020407, 2.204081632653061, 2.9387755102040813, 3.673469387755102, 4.408163265306122, 5.142857142857142, 5.877551020408163, 6.612244897959185, 7.346938775510204, 8.081632653061224, 8.816326530612244, 9.551020408163264, 10.285714285714285, 11.020408163265307, 11.755102040816325, 11.714285714285714, 11.285714285714285, 10.857142857142858, 10.428571428571429, 10, 9.571428571428571, 9.142857142857142, 8.714285714285715, 8.285714285714285, 7.857142857142858, 7.42857142857143, 7.000000000000001, 6.571428571428571, 6.142857142857142, 5.7142857142857135, 5.2857142857142865, 5.040816326530612, 5.163265306122449, 5.2857142857142865, 5.408163265306123, 5.530612244897959, 5.653061224489796, 5.775510204081632, 5.8979591836734695, 6.020408163265307, 6.142857142857142, 6.26530612244898, 6.387755102040815, 6.5102040816326525, 6.63265306122449, 6.755102040816327, 6.877551020408163, 7 ], [ 0, 9, 7, 3, 5, 0, -1, -3, -1, 8, 3, 2, -2, -7, -11, -9, -11, -2, -3, -8, -9, -13, -11, -13, -4, -6, 3, 2, -2, 0 ], [ 0, 9, 7, 3, 5, 0, -1, -5, 4, -1, 1, -1, -2, -6, -7, 2, 0, -5, -3, -4, -2, 7, 2, 0, -4, -2, -6, -7, -9, -14 ], [ 500, [ 250, [ 375, 500 ] ], 333.3333333333333, 4000 ], [ 600, [ 300, [ 450, 600 ] ], 400, 4800 ], [ 600, [ 300, [ 450, 600 ] ], 400.08, 4800 ], "DONE!!!" ], "display": [], "comments": [ "// set debug 0", "// possible arrays and datatypes with arbitrary spaces", "// ring ar8 (0 (1 3)2 5(6 7 8 ) )", "// print ar8", "// => [0 2 4 7 9]", "// => [-1 -0.6 -0.2 0.2 0.6]", "// => [0 0.4 0.8 1.2 1.6]", "// => [9 7 4 2 0]", "// => [0 3 6 9 12]", "// => [-1 -0.5 0 0.5 1]", "// => [0 0.5 1 1.5 2]", "// => [12 9 6 3 0]", "//=> [ 0, 0, 0, 0, 1, 2, 3, 4, 6, 8 ] ", "//=> [ 0, 0, 0, 1, 1, 3, 4, 6, 7, 10 ] ", "// => [10 10 15 15 15 20 20 20 20]", "// => [kick_min kick_min hat_min hat_min hat_min]", "// list fll3 fill([10 20 2 15 3 20 4])", "// not supported yet!", "// => [6 9 11 11 9 6 2 0 0 2]", "// => [0 7 11 11 7 0 -7 -11 -11 -7]", "// => [2 4 3 1 0 2 4 3 1 0]", "// => [0 0.707 1 0.707 0 -0.707 -1 -0.707]", "// => [0 1 0 -1 0 1 0 -1 0 1 0 -1]", "// => [12 10 7 4 1 0 1 4 7 10]", "// => [12 9 3 -3 -9 -12 -9 -3 3 9]", "// => [5 3 0 0 3 4 3 0 0 3]", "// => [1 0.707 0 -0.707 -1 -0.707 0 0.707]", "// => [1 0 -1 0 1 0 -1 0 1 0 -1 0]", "// => [ 0 6 0 7 1 7 2 8 3 9 3 10 4 10 5 11 ]", "// => [ 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]", "// => [1 0 1 0 1 0 1 0]", "// => [1 1 0 1 1 0 1]", "// => [1 0 1 1 0 1 1]", "//=> [0 1 1 1 0 1 1]", "//=> [1 1 1 0 1 1 0]", "// => [1 0 0 0]", "// => [1 0 1 0]", "// => [1 1 1 1 1 0 0 1 1 1 0 0 1 0 1 1]", "// => [0 1 1 2 3 5 8 13 21 34]", "// => [55 89 144]", "// => [0 1 1 2 3 5 8 1 9 10 7 5 0 5 5 10 3 1 4 5 9 2 11 1]", "// => [0 1 1 2 0 2 2 1]", "// => [0 1 1 2 3 5 8 2 10 1]", "// => [0]", "// => [0 1 2 5 12 29 70 169]", "// => [2 1 3 4 7 11 18 29]", "// => [0 1 3 10 33 109 360 1189]", "// Values have changed because seed is now parsed as Number instead of String()", "// => [1 0 0 1 1]", "// => [0 10 3 2 2]", "// => [-2 -5 -8 -11 6]", "// => [0.81 0.32 0.01 0.85 0.88]", "// => [0.16 10.72 3.16 262 2.34]", "// => [-1.19 -4.21 -7.36 -10.31 6.82]", "// => [3 7 10 0 2]", "// => [0 2 1 3 1 3 0 2]", "// => [13 10 12 11 12 10 13 11]", "// => [1 0 1 0 1 0 1 1]", "// => [5 4 6 4 4 5 4 2]", "// => [10 7 6 3 2 9 8 4 1 5 0 11]", "// => [hat kick hat kick hat snare kick hat hat hat]", "// => [0 5 3 9 0 7 3 12 3 7]", "// => [hat kick tom snare tom hat snare kick tom hat]", "// => [3 0 7 9 12 5 0 7 12 9]", "// => [snare tom kick hat]", "// => [12 0 3 7 5 9]", "// => [1 0 1 0 1 0 0 1],", "// => [1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 0],", "// => [1 0 0 1 0 0 1 0 0 1 1]", "// => [ 0 9 7 3 5 0 -1 -3 -1 8 3 2 ],", "// => [ 0 9 7 3 5 0 -1 -2 0 -5 -9 -11 ],", "// => [0 3 7 12 15 19 7 10 14 -7 -4 0]", "// [[ 0, 3, 7 ], 0, [ 10, 13, 17 ], 10, [ 20, 23, 27 ], 20, [ -10, -7, -3 ] -10]", "// [[ 'c4', 'e4' ],[ 'g4', 'b4' ],'d4',[ 'c5', 'e5' ],[ 'g5', 'b5' ],'d5']", "// => [ [ 0, 3 ], 7, 24, [ 19 ], 12, -7, [ -5, [ -3 ] ] ]", "// => [ 'kick', 'hat', 'snare', 'hat', 'hat', [ 'hat', 'hat', 'snare' ] ]", "// concat()", "// => [ 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9, 0, [ 3, 7 ], 9 ]", "// dup()", "// [ 3, 7, 11, 12, 0, 0, 0, 0, 0]", "// [ '-', '-', '-', '-', 'c', 'f', 'g', '-', '-', '-', '-' ]", "// => [1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0]", "// => [5 7 3 9 1 12 12 12 12 12 12 12 12 12]", "// => [0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0]", "//=> [ 'c4', 'eb4', 'g4', 'f4',", "// 'eb4', 'r', 'r', 'r',", "// 'r', 'r', 'r', 'r',", "// 'r', 'r', 'r', 'r' ] ", "// [ 0, 1, 2, 3, 4, 5, 6, 7]", "// [ 0, 1, 2, [ 3, 4 ], 5, [ 6, [ 7 ] ] ]", "// => [12 9 5 0]", "// => [10 7 3 -2]", "// => [13 10 6 1]", "// => [ 13 [ 10 [ 6 1 ] ] ]", "// inverse()", "// flip()", "// inv()", "// [ 0, [ 7, 7, 5 ], [ 12, 0, 3 ] ]", "// => [0 12 24 3 19 22 7 15 5 0]", "// zip()", "// works with multidimensional arrays", "//=> [ 0, [ 7, 7 ], 9, [ 0, 0 ], [ 9, 9 ], 9 ]", "// => [[0 12] [3 19] [7 15] 5 0]", "// mix()", "//=> [ [ 'c4', 'e4', 'f4', 'a4', 'g4' ], [ 'c4', 'g4' ] ] ", "//=> [ 'c4', 'e4', 'e4', 'f4', 'c4', 'f4', 'f4', 'e4' ] ", "//=> [ 'c4', [ 'e4', 'e4', [ 'f4', 'g4' ], 'c4' ], 'f4' ]", "// [ 'e4', 'c4', 'c4', 'c4', 'c4', 'c4', 'e4', 'c4' ]", "// [ 0, [ 3, 7 ], 12, 12, [ 3, 7 ], 0 ]", "// [ 0, [ 3, 7 ], 12, [ 3, 7 ] ]", "// palin()", "// mirror()", "// => [7 5 7 9 12 0 3]", "// => [9 12 0 3 7 5 7]", "// rotate()", "// turn()", "// rot()", "// => [5 7 3 0]", "// retrograde()", "// // rev()", "// => [0 0 0 0 3 3 3 3 7 7 7 7]", "// => [[[ 0, 3 ], [ 0, 3 ],[ 0, 3 ], [ 0, 3 ], 7, 7, 7, 7]", "// => [0 0 3 3 3 3 3 7 7 7]", "// also works with strings", "// => [kick kick snare snare snare snare hat hat hat]", "// => [2 2 3 3 5 6 6 6 7 9 10 11]", "// => [11 10 9 7 6 6 6 5 3 3 2 2]", "// => [12 0 0 19 15 0 17 0 12 0]", "//=> [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7 ] ]", "//=> [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7, 8, 9 ] ]", "//=> [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ], [ 9, 10, 11 ] ] ", "//=> [ [ 0, 1, 2 ], [ 3, 4 ], [ 5, 6, 7 ], [ 8, 9 ], [ 10, 11 ] ] ", "//=> [ 0, 1, 2 ]", "// => [0 5 7 3 12]", "// thin()", "//=> [ 'c4', [ 'eb4', 'g4', 'a4' ], [ 'a3', 'f4' ] ] ", "//=> [ 261.63, [ 311.13, 391.995, 440 ], [ 220, 349.23 ] ] ", "//=> [ 60, [ 63, 67, 69 ], [ 57, 65 ] ] ", "//=> [ 261.63, [ 311.13, 391.995, 440 ], [ 220, 349.23 ] ] ", "//=> [ 60, [ 63, 67, 69 ], [ 57, 65 ] ] ", "// with detuning floating point midi for pitch bend", "//=> [ 59.959, [ 62.993, 66.956, 69 ], [ 57, 64.989 ]] ", "//=> [ 'c4', [ 'eb4', 'g4', 'a4' ], [ 'a3', 'f4' ] ] ", "//=> [ [ 48, 51, 55 ], [ 60, 64, 67 ], [ 62, 65, 69 ] ]", "//=> [[130.81, 155.56, 196 ], [ 261.62, 329.63, 392 ], [ 293.66, 349.23, 440]]", "//=> [ 1200, [ 701.95, [ 498.04, 386.31 ] ], 203.91 ] ", "//=> [ 500, [ 250, [ 375, 500 ] ], 333.33, 4000 ] ", "//=> [ 600, [ 300, [ 450, 600 ] ], 400, 4800 ]", "//=> [ 600, [ 300, [ 450, 600 ] ], 400.08, 4800 ] ", "//=> [ 600, [ 300, [ 450, 600 ] ], 400, 4800 ] ", "//=> [ 0.25, [ 0.08333333333333333, [ 0.09375, 0.75 ] ], 0.03125, 3 ] ", "// list tv2 t2r(['4n' ['8nt' ['16nd' '2nd']] '32n' '3m'] 100)", "//=> [ 600, [ 200, [ 225, 1800 ] ], 75, 7200 ] ", "//=> [ 3, [ 4, [ 2, 3 ] ], [ 4, 2 ], 3 ] ", "//=> [ 2, [ 2, [ 2, 3 ] ], [ 4, 5 ], 5 ] ", "//=> [ 4, [ 3, [ 2, 3 ] ], [ 4, 5 ], 4 ]", "//=> [ -1, [ -0.5, [ 0, 0.5 ] ], 1 ]", "//=> [ 11, [ 22, 33, 42 ] ] ", "//=> [ -9, [ -18, -27, -38 ] ] ", "//=> [ 10, [ 40, 90, 80 ] ] ", "//=> [ 0.1, [ 0.1, 0.1, 0.05 ] ] ", "// add()", "// subtract()", "// sub()", "// multiply()", "// mul()", "// divide()", "// div()" ] }, "syntaxTree": { "@main": [ { "@global": { "@comment": "// set debug 0" } }, { "@global": { "@comment": "// possible arrays and datatypes with arbitrary spaces" } }, { "@list": { "@name": "ar1", "@params": { "@array": [ { "@number": 0 }, { "@number": 12 }, { "@number": 3.14 }, { "@number": 56 }, { "@number": 789 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar1" } ] } }, { "@list": { "@name": "ar2", "@params": { "@array": [ { "@number": 11 }, { "@number": 22 }, { "@number": 33 }, { "@number": 44 }, { "@number": 55 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar2" } ] } }, { "@list": { "@name": "ar3", "@params": { "@array": [ { "@identifier": "hat" }, { "@identifier": "kick" }, { "@number": 3.14 }, { "@number": 123 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar3" } ] } }, { "@list": { "@name": "ar4", "@params": { "@array": [ { "@number": 0 }, { "@number": 5 }, { "@number": 7 }, { "@number": 9 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar4" } ] } }, { "@list": { "@name": "ar5", "@params": { "@array": [ { "@number": 0 }, { "@number": 12 }, { "@number": 24 }, { "@number": -12 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar5" } ] } }, { "@list": { "@name": "arr2d", "@params": { "@array": [ { "@number": 0 }, { "@array": [ { "@number": 1 }, { "@number": 2 } ] }, { "@number": 3 } ] } } }, { "@global": { "@print": [ { "@identifier": "arr2d" } ] } }, { "@list": { "@name": "ar6", "@params": { "@array": [ { "@number": 0 }, { "@array": [ { "@number": 1 }, { "@number": 2 } ] }, { "@number": 3 }, { "@array": [ { "@number": 4 }, { "@number": 5 }, { "@number": 6 } ] }, { "@number": 7 } ] } } }, { "@global": { "@print": [ { "@identifier": "ar6" } ] } }, { "@list": { "@name": "arr2d2", "@params": { "@array": [ { "@identifier": "hat" }, { "@array": [ { "@identifier": "kick" }, { "@identifier": "snare" } ] }, { "@number": 1.23 }, { "@array": [ { "@number": 4 }, { "@number": 5 }, { "@array": [ { "@number": 6 }, { "@number": 7 } ] } ] }, { "@number": 8 }, { "@number": 9 } ] } } }, { "@global": { "@print": [ { "@identifier": "arr2d2" } ] } }, { "@global": { "@comment": "// ring ar8 (0 (1 3)2 5(6 7 8 ) )" } }, { "@global": { "@comment": "// print ar8" } }, { "@list": { "@name": "spr1", "@params": { "@function": { "@name": "spread", "@args": [ { "@number": 5 }, { "@number": 0 }, { "@number": 12 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spr1" } ] } }, { "@global": { "@comment": "// => [0 2 4 7 9]" } }, { "@list": { "@name": "spr2", "@params": { "@function": { "@name": "spreadFloat", "@args": [ { "@number": 5 }, { "@number": -1 }, { "@number": 1 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spr2" } ] } }, { "@global": { "@comment": "// => [-1 -0.6 -0.2 0.2 0.6]" } }, { "@list": { "@name": "spr3", "@params": { "@function": { "@name": "spreadF", "@args": [ { "@number": 5 }, { "@number": 0 }, { "@number": 2 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spr3" } ] } }, { "@global": { "@comment": "// => [0 0.4 0.8 1.2 1.6]" } }, { "@list": { "@name": "spr4", "@params": { "@function": { "@name": "spread", "@args": [ { "@number": 5 }, { "@number": 12 }, { "@number": 0 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spr4" } ] } }, { "@global": { "@comment": "// => [9 7 4 2 0]" } }, { "@list": { "@name": "spi1", "@params": { "@function": { "@name": "spreadInclusive", "@args": [ { "@number": 5 }, { "@number": 0 }, { "@number": 12 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spi1" } ] } }, { "@global": { "@comment": "// => [0 3 6 9 12]" } }, { "@list": { "@name": "spi2", "@params": { "@function": { "@name": "spreadInclusiveFloat", "@args": [ { "@number": 5 }, { "@number": -1 }, { "@number": 1 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spi2" } ] } }, { "@global": { "@comment": "// => [-1 -0.5 0 0.5 1]" } }, { "@list": { "@name": "spi3", "@params": { "@function": { "@name": "spreadInclusiveF", "@args": [ { "@number": 5 }, { "@number": 0 }, { "@number": 2 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spi3" } ] } }, { "@global": { "@comment": "// => [0 0.5 1 1.5 2]" } }, { "@list": { "@name": "spi4", "@params": { "@function": { "@name": "spreadInclusive", "@args": [ { "@number": 5 }, { "@number": 12 }, { "@number": 0 } ] } } } }, { "@global": { "@print": [ { "@identifier": "spi4" } ] } }, { "@global": { "@comment": "// => [12 9 6 3 0]" } }, { "@list": { "@name": "spe1", "@params": { "@function": { "@name": "spreadExp", "@args": [ { "@number": 10 }, { "@number": 0 }, { "@number": 10 }, { "@number": 2 } ] } } } }, { "@global": { "@comment": "//=> [ 0, 0, 0, 0, 1, 2, 3, 4, 6, 8 ] " } }, { "@list": { "@name": "spe3", "@params": { "@function": { "@name": "spreadExpF", "@args": [ { "@number": 10 }, { "@number": 0 }, { "@number": 1 }, { "@number": 2 } ] } } } }, { "@list": { "@name": "spe2", "@params": { "@function": { "@name": "spreadIncExp", "@args": [ { "@number": 10 }, { "@number": 0 }, { "@number": 10 }, { "@number": 2 } ] } } } }, { "@global": { "@comment": "//=> [ 0, 0, 0, 1, 1, 3, 4, 6, 7, 10 ] " } }, { "@list": { "@name": "fll1", "@params": { "@function": { "@name": "fill", "@args": [ { "@number": 10 }, { "@number": 2 }, { "@number": 15 }, { "@number": 3 }, { "@number": 20 }, { "@number": 4 } ] } } } }, { "@global": { "@print": [ { "@identifier": "fll1" } ] } }, { "@global": { "@comment": "// => [10 10 15 15 15 20 20 20 20]" } }, { "@list": { "@name": "fll2", "@params": { "@function": { "@name": "fill", "@args": [ { "@identifier": "kick_min" }, { "@number": 2 }, { "@identifier": "hat_min" }, { "@number": 3 } ] } } } }, { "@global": { "@print": [ { "@identifier": "fll2" } ] } }, { "@global": { "@comment": "// => [kick_min kick_min hat_min hat_min hat_min]" } }, { "@global": { "@comment": "// list fll3 fill([10 20 2 15 3 20 4])" } }, { "@global": { "@comment": "// not supported yet!" } }, { "@list": { "@name": "fll4", "@params": { "@function": { "@name": "fill", "@args": [ { "@array": [ { "@number": 10 }, { "@number": 20 } ] }, { "@number": 2 }, { "@array": [ { "@number": 30 }, { "@number": 40 } ] }, { "@number": 3 }, { "@number": 50 }, { "@number": 4 } ] } } } }, { "@list": { "@name": "sin1", "@params": { "@function": { "@name": "sine", "@args": [ { "@number": 10 } ] } } } }, { "@global": { "@print": [ { "@identifier": "sin1" } ] } }, { "@global": { "@comment": "// => [6 9 11 11 9 6 2 0 0 2]" } }, { "@list": { "@name": "sin2", "@params": { "@function": { "@name": "sine", "@args": [ { "@number": 10 }, { "@number": 1 }, { "@number": -12 }, { "@number": 12 } ] } } } }, { "@global": { "@print": [ { "@identifier": "sin2" } ] } }, { "@global": { "@comment": "// => [0 7 11 11 7 0 -7 -11 -11 -7]" } }, { "@list": { "@name": "sin3", "@params": { "@function": { "@name": "sine", "@args": [ { "@number": 10 }, { "@number": 2 }, { "@number": 0 }, { "@number": 5 } ] } } } }, { "@global": { "@print": [ { "@identifier": "sin3" } ] } }, { "@global": { "@comment": "// => [2 4 3 1 0 2 4 3 1 0]" } }, { "@list": { "@name": "sin4", "@params": { "@function": { "@name": "sineFloat", "@args": [ { "@number": 8 } ] } } } }, { "@global": { "@print": [ { "@identifier": "sin4" } ] } }, { "@global": { "@comment": "// => [0 0.707 1 0.707 0 -0.707 -1 -0.707]" } }, { "@list": { "@name": "sin5", "@params": { "@function": { "@name": "sineF", "@args": [ { "@number": 12 }, { "@number": 3 }, { "@number": -1 }, { "@number": 1 } ] } } } }, { "@global": { "@print": [ { "@identifier": "sin5" } ] } }, { "@global": { "@comment": "// => [0 1 0 -1 0 1 0 -1 0 1 0 -1]" } }, { "@list": { "@name": "cos1", "@params": { "@function": { "@name": "cosine", "@args": [ { "@number": 10 } ] } } } }, { "@global": { "@print": [ { "@identifier": "cos1" } ] } }, { "@global": { "@comment": "// => [12 10 7 4 1 0 1 4 7 10]" } }, { "@list": { "@name": "cos2", "@params": { "@function": { "@name": "cosine", "@args": [ { "@number": 10 }, { "@number": 1 }, { "@number": -12 }, { "@number": 12 } ] } } } }, { "@global": { "@print": [ { "@identif