Skip to content

Commit

Permalink
Sped up mapping loading for NS5R, SC and SC-8850.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Aug 1, 2024
1 parent b6d47eb commit 290cb69
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 30 deletions.
14 changes: 8 additions & 6 deletions src/fakeNs5r/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,14 @@ audioPlayer.onended = function () {
audioBlob = await (await fetch("../../midi-demo-data/collection/octavia/KANDI8.opus")).blob();
demoBlobs.KANDI8.wave = audioBlob;
audioPlayer.src = URL.createObjectURL(audioBlob);
visualizer.loadMap(await(await fetch(`./data/map/gm.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/ns5r.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/xg.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gs.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/sd.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/s90es.10.tsv`)).text());
visualizer.loadMapPaths([
`./data/map/gm.10.tsv`,
`./data/map/ns5r.10.tsv`,
`./data/map/xg.10.tsv`,
`./data/map/gs.10.tsv`,
`./data/map/sd.10.tsv`,
`./data/map/s90es.10.tsv`
]);
})();
let lastTime = 0;
let renderThread = setInterval(function () {
Expand Down
26 changes: 14 additions & 12 deletions src/fakeSc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,20 @@ audioPlayer.onended = function () {
audioBlob = await (await fetch("../../midi-demo-data/collection/octavia/KANDI8.opus")).blob();
demoBlobs.KANDI8.wave = audioBlob;
audioPlayer.src = URL.createObjectURL(audioBlob);
visualizer.loadMap(await(await fetch(`./data/map/gm.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gm.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/ns5r.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/ns5r.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/xg.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/xg.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gs.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gs.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/sd.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/sd.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/s90es.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/s90es.10.tsv`)).text());
visualizer.loadMapPaths([
`./data/map/gm.12.tsv`,
`./data/map/ns5r.12.tsv`,
`./data/map/xg.12.tsv`,
`./data/map/gs.12.tsv`,
`./data/map/sd.12.tsv`,
`./data/map/s90es.12.tsv`,
`./data/map/gm.10.tsv`,
`./data/map/ns5r.10.tsv`,
`./data/map/xg.10.tsv`,
`./data/map/gs.10.tsv`,
`./data/map/sd.10.tsv`,
`./data/map/s90es.10.tsv`
]);
})();
let lastTime = 0;
let renderThread = setInterval(function () {
Expand Down
26 changes: 14 additions & 12 deletions src/fakeSc8850/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,20 @@ audioPlayer.onended = function () {
audioBlob = await (await fetch("../../midi-demo-data/collection/octavia/KANDI8.opus")).blob();
demoBlobs.KANDI8.wave = audioBlob;
audioPlayer.src = URL.createObjectURL(audioBlob);
visualizer.loadMap(await(await fetch(`./data/map/gm.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gm.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/ns5r.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/ns5r.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/xg.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/xg.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gs.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/gs.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/sd.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/sd.10.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/s90es.12.tsv`)).text());
visualizer.loadMap(await(await fetch(`./data/map/s90es.10.tsv`)).text());
visualizer.loadMapPaths([
`./data/map/gm.12.tsv`,
`./data/map/ns5r.12.tsv`,
`./data/map/xg.12.tsv`,
`./data/map/gs.12.tsv`,
`./data/map/sd.12.tsv`,
`./data/map/s90es.12.tsv`,
`./data/map/gm.10.tsv`,
`./data/map/ns5r.10.tsv`,
`./data/map/xg.10.tsv`,
`./data/map/gs.10.tsv`,
`./data/map/sd.10.tsv`,
`./data/map/s90es.10.tsv`
]);
})();
let lastTime = 0;
let renderThread = setInterval(function () {
Expand Down

0 comments on commit 290cb69

Please sign in to comment.