Skip to content

Instantly share code, notes, and snippets.

@Shogan
Created Sep 3, 2021
Embed
What would you like to do?
convert aisatana MIDI notes to 32 x phrases as alda compatible strings
// the Aisatana track MIDI notes
const notes = [
{
"name": "E3",
"midi": 52,
"time": 0,
"velocity": 0.30708661417322836,
"duration": 0.5882355
},
{
"name": "G3",
"midi": 55,
"time": 0.5882355,
"velocity": 0.31496062992125984,
"duration": 0.5882355
},
{
"name": "C3",
"midi": 48,
"time": 1.176471,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999999
},
{
"name": "C4",
"midi": 60,
"time": 1.7647065,
"velocity": 0.33858267716535434,
"duration": 7.6470615
},
{
"name": "E3",
"midi": 52,
"time": 9.411768,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999997
},
{
"name": "G3",
"midi": 55,
"time": 10.0000035,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999997
},
{
"name": "C3",
"midi": 48,
"time": 10.588239,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999997
},
{
"name": "C4",
"midi": 60,
"time": 11.1764745,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999997
},
{
"name": "B3",
"midi": 59,
"time": 11.76471,
"velocity": 0.3228346456692913,
"duration": 2.3529420000000005
},
{
"name": "E4",
"midi": 64,
"time": 14.117652,
"velocity": 0.15748031496062992,
"duration": 4.705884000000001
},
{
"name": "E3",
"midi": 52,
"time": 18.823536,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999997
},
{
"name": "G3",
"midi": 55,
"time": 19.4117715,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999997
},
{
"name": "C3",
"midi": 48,
"time": 20.000007,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999997
},
{
"name": "C4",
"midi": 60,
"time": 20.5882425,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999997
},
{
"name": "B3",
"midi": 59,
"time": 21.176478,
"velocity": 0.3228346456692913,
"duration": 7.058826
},
{
"name": "E3",
"midi": 52,
"time": 28.235304,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999997
},
{
"name": "G3",
"midi": 55,
"time": 28.8235395,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999997
},
{
"name": "C3",
"midi": 48,
"time": 29.411775,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999997
},
{
"name": "C4",
"midi": 60,
"time": 30.0000105,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999997
},
{
"name": "B3",
"midi": 59,
"time": 30.588245999999998,
"velocity": 0.3228346456692913,
"duration": 1.1764709999999994
},
{
"name": "E4",
"midi": 64,
"time": 31.764716999999997,
"velocity": 0.31496062992125984,
"duration": 5.882354999999997
},
{
"name": "E4",
"midi": 64,
"time": 37.647071999999994,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 37.647071999999994,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 38.23530749999999,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "G3",
"midi": 55,
"time": 38.23530749999999,
"velocity": 0.31496062992125984,
"duration": 0.5882355000000032
},
{
"name": "D4",
"midi": 62,
"time": 38.823542999999994,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "C3",
"midi": 48,
"time": 38.823542999999994,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "C4",
"midi": 60,
"time": 39.4117785,
"velocity": 0.2992125984251969,
"duration": 7.6470614999999995
},
{
"name": "E3",
"midi": 52,
"time": 39.4117785,
"velocity": 0.31496062992125984,
"duration": 7.6470614999999995
},
{
"name": "E4",
"midi": 64,
"time": 47.05884,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G3",
"midi": 55,
"time": 47.05884,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 47.64707549999999,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "E3",
"midi": 52,
"time": 47.64707549999999,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "D4",
"midi": 62,
"time": 48.235310999999996,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "C3",
"midi": 48,
"time": 48.235310999999996,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "C4",
"midi": 60,
"time": 48.8235465,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "E3",
"midi": 52,
"time": 48.8235465,
"velocity": 0.31496062992125984,
"duration": 7.6470614999999995
},
{
"name": "B3",
"midi": 59,
"time": 49.411782,
"velocity": 0.2992125984251969,
"duration": 2.3529419999999988
},
{
"name": "E4",
"midi": 64,
"time": 51.764724,
"velocity": 0.15748031496062992,
"duration": 4.7058839999999975
},
{
"name": "E4",
"midi": 64,
"time": 56.470608,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "C4",
"midi": 60,
"time": 56.470608,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 57.058843499999995,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "E3",
"midi": 52,
"time": 57.058843499999995,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "D4",
"midi": 62,
"time": 57.647079,
"velocity": 0.30708661417322836,
"duration": 0.5882355000000032
},
{
"name": "C3",
"midi": 48,
"time": 57.647079,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "C4",
"midi": 60,
"time": 58.2353145,
"velocity": 0.2992125984251969,
"duration": 0.5882355000000032
},
{
"name": "E3",
"midi": 52,
"time": 58.2353145,
"velocity": 0.31496062992125984,
"duration": 0.5882355000000032
},
{
"name": "B3",
"midi": 59,
"time": 58.823550000000004,
"velocity": 0.2992125984251969,
"duration": 7.058826000000003
},
{
"name": "D3",
"midi": 50,
"time": 58.823550000000004,
"velocity": 0.30708661417322836,
"duration": 7.058826000000003
},
{
"name": "E4",
"midi": 64,
"time": 65.88237600000001,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 65.88237600000001,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 66.4706115,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 66.4706115,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 67.058847,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 67.058847,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 67.6470825,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 67.6470825,
"velocity": 0.31496062992125984,
"duration": 7.647061499999992
},
{
"name": "B3",
"midi": 59,
"time": 68.23531799999999,
"velocity": 0.2992125984251969,
"duration": 2.3529419999999988
},
{
"name": "E4",
"midi": 64,
"time": 70.58825999999999,
"velocity": 0.15748031496062992,
"duration": 4.7058839999999975
},
{
"name": "E4",
"midi": 64,
"time": 75.29414399999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 75.29414399999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 75.58826174999999,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 75.88237949999998,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 75.88237949999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 75.88237949999998,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 76.17649724999998,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 76.47061499999998,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 76.47061499999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 76.47061499999998,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 77.05885049999998,
"velocity": 0.6535433070866141,
"duration": 7.647061500000007
},
{
"name": "C4",
"midi": 60,
"time": 77.05885049999998,
"velocity": 0.2992125984251969,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 77.05885049999998,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "E4",
"midi": 64,
"time": 84.70591199999998,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 84.70591199999998,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 85.00002974999998,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 85.29414749999998,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 85.29414749999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 85.29414749999998,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 85.58826524999998,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 85.88238299999998,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 85.88238299999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 85.88238299999998,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 86.47061849999997,
"velocity": 0.6535433070866141,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 86.47061849999997,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 86.47061849999997,
"velocity": 0.31496062992125984,
"duration": 7.647061499999992
},
{
"name": "B5",
"midi": 83,
"time": 87.05885399999997,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 87.05885399999997,
"velocity": 0.2992125984251969,
"duration": 2.3529419999999988
},
{
"name": "G5",
"midi": 79,
"time": 87.64708949999996,
"velocity": 0.6062992125984252,
"duration": 6.4705905
},
{
"name": "E4",
"midi": 64,
"time": 89.41179599999997,
"velocity": 0.15748031496062992,
"duration": 4.7058839999999975
},
{
"name": "E4",
"midi": 64,
"time": 94.11767999999996,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 94.11767999999996,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 94.41179774999996,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 94.70591549999996,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 94.70591549999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 94.70591549999996,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 95.00003324999996,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 95.29415099999996,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 95.29415099999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 95.29415099999996,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 95.88238649999995,
"velocity": 0.6535433070866141,
"duration": 7.647061499999992
},
{
"name": "C4",
"midi": 60,
"time": 95.88238649999995,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 95.88238649999995,
"velocity": 0.31496062992125984,
"duration": 7.647061499999992
},
{
"name": "B3",
"midi": 59,
"time": 96.47062199999995,
"velocity": 0.2992125984251969,
"duration": 7.058825999999996
},
{
"name": "E4",
"midi": 64,
"time": 103.52944799999995,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 103.52944799999995,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 103.82356574999994,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 104.11768349999994,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 104.11768349999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 104.11768349999994,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 104.41180124999994,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 104.70591899999994,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 104.70591899999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 104.70591899999994,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 105.29415449999993,
"velocity": 0.6535433070866141,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 105.29415449999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 105.29415449999993,
"velocity": 0.31496062992125984,
"duration": 7.647061499999992
},
{
"name": "B5",
"midi": 83,
"time": 105.88238999999993,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 105.88238999999993,
"velocity": 0.2992125984251969,
"duration": 1.7647065000000026
},
{
"name": "G5",
"midi": 79,
"time": 106.47062549999993,
"velocity": 0.6062992125984252,
"duration": 6.4705905
},
{
"name": "E4",
"midi": 64,
"time": 107.64709649999993,
"velocity": 0.31496062992125984,
"duration": 5.294119499999994
},
{
"name": "E4",
"midi": 64,
"time": 112.94121599999993,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 112.94121599999993,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 113.23533374999992,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 113.52945149999992,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "G3",
"midi": 55,
"time": 113.52945149999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 113.82356924999992,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 114.11768699999992,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 114.11768699999992,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 114.70592249999991,
"velocity": 0.6535433070866141,
"duration": 7.647061500000007
},
{
"name": "C4",
"midi": 60,
"time": 114.70592249999991,
"velocity": 0.33858267716535434,
"duration": 7.647061500000007
},
{
"name": "C3",
"midi": 48,
"time": 122.35298399999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 122.64710174999992,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "B4",
"midi": 71,
"time": 122.94121949999992,
"velocity": 0.6141732283464567,
"duration": 0.29411774999999807
},
{
"name": "G3",
"midi": 55,
"time": 122.94121949999992,
"velocity": 0.3228346456692913,
"duration": 0.5882354999999961
},
{
"name": "A4",
"midi": 69,
"time": 123.23533724999992,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 123.52945499999991,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 123.52945499999991,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 124.11769049999991,
"velocity": 0.6535433070866141,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 124.11769049999991,
"velocity": 0.33858267716535434,
"duration": 2.941177499999995
},
{
"name": "B5",
"midi": 83,
"time": 124.7059259999999,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "G5",
"midi": 79,
"time": 125.2941614999999,
"velocity": 0.6062992125984252,
"duration": 6.4705905000000286
},
{
"name": "D4",
"midi": 62,
"time": 127.0588679999999,
"velocity": 0.30708661417322836,
"duration": 4.705884000000026
},
{
"name": "E3",
"midi": 52,
"time": 131.76475199999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 132.05886974999993,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 132.35298749999993,
"velocity": 0.31496062992125984,
"duration": 0.29411774999999807
},
{
"name": "G3",
"midi": 55,
"time": 132.35298749999993,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 132.64710524999992,
"velocity": 0.3228346456692913,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 132.94122299999992,
"velocity": 0.3228346456692913,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 132.94122299999992,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 133.52945849999992,
"velocity": 0.33858267716535434,
"duration": 7.647061500000007
},
{
"name": "C4",
"midi": 60,
"time": 133.52945849999992,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 134.11769399999991,
"velocity": 0.3228346456692913,
"duration": 7.0588260000000105
},
{
"name": "E3",
"midi": 52,
"time": 141.17651999999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 141.47063774999992,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 141.76475549999992,
"velocity": 0.31496062992125984,
"duration": 0.29411774999999807
},
{
"name": "G3",
"midi": 55,
"time": 141.76475549999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C5",
"midi": 72,
"time": 142.05887324999992,
"velocity": 0.3228346456692913,
"duration": 0.29411774999999807
},
{
"name": "B4",
"midi": 71,
"time": 142.35299099999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 142.35299099999992,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 142.9412264999999,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 142.9412264999999,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999961
},
{
"name": "B5",
"midi": 83,
"time": 143.5294619999999,
"velocity": 0.3464566929133858,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 143.5294619999999,
"velocity": 0.3228346456692913,
"duration": 1.1764709999999923
},
{
"name": "G5",
"midi": 79,
"time": 144.1176974999999,
"velocity": 0.31496062992125984,
"duration": 6.470590500000014
},
{
"name": "E4",
"midi": 64,
"time": 144.7059329999999,
"velocity": 0.31496062992125984,
"duration": 5.882355000000018
},
{
"name": "E4",
"midi": 64,
"time": 150.58828799999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 150.58828799999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E4",
"midi": 64,
"time": 151.17652349999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 151.17652349999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 151.7647589999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 151.7647589999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 152.3529944999999,
"velocity": 0.2992125984251969,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 152.3529944999999,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "E4",
"midi": 64,
"time": 160.00005599999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 160.00005599999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E4",
"midi": 64,
"time": 160.5882914999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 160.5882914999999,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 161.1765269999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 161.1765269999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 161.7647624999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 161.7647624999999,
"velocity": 0.3228346456692913,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 162.3529979999999,
"velocity": 0.2992125984251969,
"duration": 2.352942000000013
},
{
"name": "E3",
"midi": 52,
"time": 162.3529979999999,
"velocity": 0.30708661417322836,
"duration": 7.058826000000039
},
{
"name": "E4",
"midi": 64,
"time": 164.7059399999999,
"velocity": 0.15748031496062992,
"duration": 4.705884000000026
},
{
"name": "E4",
"midi": 64,
"time": 169.41182399999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 169.41182399999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E4",
"midi": 64,
"time": 170.00005949999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 170.00005949999994,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 170.58829499999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 170.58829499999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 171.17653049999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 171.17653049999993,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 171.76476599999992,
"velocity": 0.2992125984251969,
"duration": 7.0588260000000105
},
{
"name": "D3",
"midi": 50,
"time": 171.76476599999992,
"velocity": 0.30708661417322836,
"duration": 7.0588260000000105
},
{
"name": "E4",
"midi": 64,
"time": 178.82359199999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 178.82359199999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E4",
"midi": 64,
"time": 179.41182749999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 179.41182749999993,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 180.00006299999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 180.00006299999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 180.58829849999992,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 180.58829849999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 181.17653399999992,
"velocity": 0.2992125984251969,
"duration": 7.058826000000039
},
{
"name": "B2",
"midi": 47,
"time": 181.17653399999992,
"velocity": 0.2992125984251969,
"duration": 2.352942000000013
},
{
"name": "A2",
"midi": 45,
"time": 183.52947599999993,
"velocity": 0.30708661417322836,
"duration": 4.705884000000026
},
{
"name": "C5",
"midi": 72,
"time": 188.23535999999996,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 188.23535999999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 188.23535999999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 188.52947774999996,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 188.82359549999995,
"velocity": 0.5826771653543307,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 188.82359549999995,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 188.82359549999995,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 189.11771324999995,
"velocity": 0.5669291338582677,
"duration": 0.29411774999999807
},
{
"name": "E5",
"midi": 76,
"time": 189.41183099999995,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 189.41183099999995,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 189.41183099999995,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "G5",
"midi": 79,
"time": 190.00006649999995,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 190.00006649999995,
"velocity": 0.2992125984251969,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 190.00006649999995,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "E5",
"midi": 76,
"time": 190.58830199999994,
"velocity": 0.6141732283464567,
"duration": 7.0588260000000105
},
{
"name": "C5",
"midi": 72,
"time": 197.64712799999995,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 197.64712799999995,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 197.64712799999995,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 197.94124574999995,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 198.23536349999995,
"velocity": 0.5826771653543307,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 198.23536349999995,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 198.23536349999995,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 198.52948124999995,
"velocity": 0.5669291338582677,
"duration": 0.29411774999999807
},
{
"name": "G5",
"midi": 79,
"time": 198.82359899999994,
"velocity": 0.6929133858267716,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 198.82359899999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 198.82359899999994,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "A5",
"midi": 81,
"time": 199.41183449999994,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 199.41183449999994,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 199.41183449999994,
"velocity": 0.31496062992125984,
"duration": 7.647061500000035
},
{
"name": "E5",
"midi": 76,
"time": 200.00006999999994,
"velocity": 0.5984251968503937,
"duration": 7.058826000000039
},
{
"name": "B3",
"midi": 59,
"time": 200.00006999999994,
"velocity": 0.2992125984251969,
"duration": 2.352942000000013
},
{
"name": "E4",
"midi": 64,
"time": 202.35301199999995,
"velocity": 0.15748031496062992,
"duration": 4.705884000000026
},
{
"name": "C5",
"midi": 72,
"time": 207.05889599999998,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 207.05889599999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 207.05889599999998,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 207.35301374999997,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 207.64713149999997,
"velocity": 0.5826771653543307,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 207.64713149999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 207.64713149999997,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 207.94124924999997,
"velocity": 0.5669291338582677,
"duration": 0.29411774999999807
},
{
"name": "D4",
"midi": 62,
"time": 208.23536699999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 208.23536699999997,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C6",
"midi": 84,
"time": 208.82360249999996,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 208.82360249999996,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 208.82360249999996,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "G5",
"midi": 79,
"time": 209.41183799999996,
"velocity": 0.6141732283464567,
"duration": 7.0588260000000105
},
{
"name": "B3",
"midi": 59,
"time": 209.41183799999996,
"velocity": 0.2992125984251969,
"duration": 7.0588260000000105
},
{
"name": "C5",
"midi": 72,
"time": 216.47066399999997,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 216.47066399999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 216.47066399999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 216.76478174999997,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 217.05889949999997,
"velocity": 0.5826771653543307,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 217.05889949999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 217.05889949999997,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "G4",
"midi": 67,
"time": 217.35301724999997,
"velocity": 0.5669291338582677,
"duration": 0.29411774999999807
},
{
"name": "D6",
"midi": 86,
"time": 217.64713499999996,
"velocity": 0.6929133858267716,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 217.64713499999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 217.64713499999996,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "G6",
"midi": 91,
"time": 218.23537049999996,
"velocity": 0.6771653543307087,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 218.23537049999996,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 218.23537049999996,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "C6",
"midi": 84,
"time": 218.82360599999996,
"velocity": 0.6062992125984252,
"duration": 7.0588260000000105
},
{
"name": "B3",
"midi": 59,
"time": 218.82360599999996,
"velocity": 0.2992125984251969,
"duration": 7.0588260000000105
},
{
"name": "E3",
"midi": 52,
"time": 225.88243199999997,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 226.47066749999996,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 227.05890299999996,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 227.64713849999995,
"velocity": 0.33858267716535434,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 235.29419999999996,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 235.88243549999996,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 236.47067099999995,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 237.05890649999995,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 237.64714199999995,
"velocity": 0.3228346456692913,
"duration": 0.5882354999999961
},
{
"name": "A3",
"midi": 57,
"time": 238.23537749999994,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 238.82361299999994,
"velocity": 0.29133858267716534,
"duration": 0.5882354999999961
},
{
"name": "D3",
"midi": 50,
"time": 239.41184849999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 240.00008399999993,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "D3",
"midi": 50,
"time": 240.58831949999993,
"velocity": 0.31496062992125984,
"duration": 4.117648500000001
},
{
"name": "E3",
"midi": 52,
"time": 244.70596799999993,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 245.29420349999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 245.88243899999992,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 246.47067449999992,
"velocity": 0.33858267716535434,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 254.11773599999992,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 254.70597149999992,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 255.29420699999991,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 255.8824424999999,
"velocity": 0.33858267716535434,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 256.4706779999999,
"velocity": 0.33070866141732286,
"duration": 0.5882354999999961
},
{
"name": "E4",
"midi": 64,
"time": 257.0589134999999,
"velocity": 0.33070866141732286,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 257.6471489999999,
"velocity": 0.31496062992125984,
"duration": 5.882355000000018
},
{
"name": "E4",
"midi": 64,
"time": 263.5295039999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 263.5295039999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 263.8236217499999,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 264.1177394999999,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 264.1177394999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 264.1177394999999,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 264.4118572499999,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 264.7059749999999,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 264.7059749999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 264.7059749999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 265.2942104999999,
"velocity": 0.6535433070866141,
"duration": 7.647061500000007
},
{
"name": "C4",
"midi": 60,
"time": 265.2942104999999,
"velocity": 0.2992125984251969,
"duration": 7.647061500000007
},
{
"name": "E3",
"midi": 52,
"time": 265.2942104999999,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "E4",
"midi": 64,
"time": 272.9412719999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 272.9412719999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 273.2353897499999,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 273.5295074999999,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 273.5295074999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 273.5295074999999,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 273.8236252499999,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 274.1177429999999,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 274.1177429999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 274.1177429999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 274.7059784999999,
"velocity": 0.6535433070866141,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 274.7059784999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 274.7059784999999,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "B5",
"midi": 83,
"time": 275.2942139999999,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 275.2942139999999,
"velocity": 0.2992125984251969,
"duration": 7.0588260000000105
},
{
"name": "G5",
"midi": 79,
"time": 275.8824494999999,
"velocity": 0.6062992125984252,
"duration": 6.470590500000014
},
{
"name": "E4",
"midi": 64,
"time": 282.3530399999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 282.3530399999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 282.6471577499999,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 282.9412754999999,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 282.9412754999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 282.9412754999999,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 283.2353932499999,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 283.5295109999999,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 283.5295109999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 283.5295109999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 284.1177464999999,
"velocity": 0.6535433070866141,
"duration": 7.647061500000007
},
{
"name": "C4",
"midi": 60,
"time": 284.1177464999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 284.1177464999999,
"velocity": 0.31496062992125984,
"duration": 7.647061500000007
},
{
"name": "B3",
"midi": 59,
"time": 284.7059819999999,
"velocity": 0.2992125984251969,
"duration": 7.0588260000000105
},
{
"name": "E4",
"midi": 64,
"time": 291.7648079999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "E3",
"midi": 52,
"time": 291.7648079999999,
"velocity": 0.30708661417322836,
"duration": 0.29411774999999807
},
{
"name": "G4",
"midi": 67,
"time": 292.0589257499999,
"velocity": 0.5984251968503937,
"duration": 0.29411774999999807
},
{
"name": "A4",
"midi": 69,
"time": 292.3530434999999,
"velocity": 0.6062992125984252,
"duration": 0.29411774999999807
},
{
"name": "E4",
"midi": 64,
"time": 292.3530434999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "G3",
"midi": 55,
"time": 292.3530434999999,
"velocity": 0.31496062992125984,
"duration": 0.5882354999999961
},
{
"name": "B4",
"midi": 71,
"time": 292.6471612499999,
"velocity": 0.6220472440944882,
"duration": 0.29411774999999807
},
{
"name": "C5",
"midi": 72,
"time": 292.9412789999999,
"velocity": 0.6299212598425197,
"duration": 0.5882354999999961
},
{
"name": "D4",
"midi": 62,
"time": 292.9412789999999,
"velocity": 0.30708661417322836,
"duration": 0.5882354999999961
},
{
"name": "C3",
"midi": 48,
"time": 292.9412789999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E5",
"midi": 76,
"time": 293.5295144999999,
"velocity": 0.6535433070866141,
"duration": 0.5882354999999961
},
{
"name": "C4",
"midi": 60,
"time": 293.5295144999999,
"velocity": 0.2992125984251969,
"duration": 0.5882354999999961
},
{
"name": "E3",
"midi": 52,
"time": 293.5295144999999,
"velocity": 0.31496062992125984,
"duration": 2.3529419999999845
},
{
"name": "B5",
"midi": 83,
"time": 294.1177499999999,
"velocity": 0.6692913385826772,
"duration": 0.5882354999999961
},
{
"name": "B3",
"midi": 59,
"time": 294.1177499999999,
"velocity": 0.2992125984251969,
"duration": 1.7647064999999884
},
{
"name": "G5",
"midi": 79,
"time": 294.7059854999999,
"velocity": 0.6062992125984252,
"duration": 8.823532499999999
},
{
"name": "E4",
"midi": 64,
"time": 296.4706919999999,
"velocity": 0.30708661417322836,
"duration": 7.0588260000000105
},
{
"name": "C2",
"midi": 36,
"time": 296.4706919999999,
"velocity": 0.30708661417322836,
"duration": 7.0588260000000105
},
{
"name": "E3",
"midi": 52,
"time": 296.4706919999999,
"velocity": 0.30708661417322836,
"duration": 7.0588260000000105
}
]
const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
}, {});
// constants specific to the aisatana track...
const secPerHalfBeat = 0.294117647058824;
const phraseHalfBeats = 32;
// array to store quantized phrases
let phrases = [];
notes.forEach(n => {
const halfBeat = Math.round(n.time / secPerHalfBeat);
const phraseIndex = Math.floor(halfBeat / phraseHalfBeats);
const note = n.name.substring(0, 1).toLowerCase();
const octave = n.name.substring(1, 2);
const time = n.time;
const duration = n.duration;
// store note in correct 'phrase'
if (!phrases[phraseIndex]) {
phrases[phraseIndex] = [];
}
phrases[phraseIndex].push({ note: note, octave: octave, time: time, duration: duration });
});
// go through each 'phrase' and group notes into their respective chords under the array 'chords' for each phrase
// (if a note is played at the same timestamp, then it belongs to the same chord).
phrases.forEach(phrase => {
let chords = []
const groupByTime = groupBy('time');
phrase.chords = [];
const chordGrouping = groupByTime(phrase);
for (let [chordTimestamp, notes] of Object.entries(chordGrouping)) {
phrase.chords.push(notes)
}
});
phrases.forEach(phrase => {
let aldaStr = "piano: (tempo 51) (quant 90) ";
phrase.chords.forEach(chord => {
if (chord.length > 1) {
// Alda plays notes together as a chord when separated by a '/'
// character. Generate the alda string based on whether or not
// it needs to have multiple notes in the chord, separating with
// '/' if so.
for (let [idx, note] of Object.entries(chord)) {
if (idx == chord.length - 1) {
aldaStr += `o${note.octave} ${note.note} ${note.duration}s `;
} else {
aldaStr += `o${note.octave} ${note.note} ${note.duration}s / `;
}
};
} else {
chord.forEach(note => {
aldaStr += `o${note.octave} ${note.note} ${note.duration}s `;
});
}
});
// Output the phrase as an alda-compatible / playable string (you can
// also copy this directly into alda's REPL to play it)
console.log(aldaStr);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment