Spaces:
Sleeping
Sleeping
tracks
Browse files- javascript/app.js +2 -0
javascript/app.js
CHANGED
@@ -351,9 +351,11 @@ class MidiVisualizer extends HTMLElement{
|
|
351 |
this.setPlayTime(t);
|
352 |
this.pianoRoll.scrollTo(this.svgWidth - this.pianoRoll.offsetWidth, this.pianoRoll.scrollTop)
|
353 |
}else if(midiEvent[0] === "patch_change"){
|
|
|
354 |
let channel = midiEvent[3]
|
355 |
this.patches[channel].push([t, midiEvent[4]])
|
356 |
this.patches[channel].sort((a, b) => a[0] - b[0])
|
|
|
357 |
}
|
358 |
this.midiEvents.push(midiEvent);
|
359 |
this.svg.style.width = `${this.svgWidth}px`;
|
|
|
351 |
this.setPlayTime(t);
|
352 |
this.pianoRoll.scrollTo(this.svgWidth - this.pianoRoll.offsetWidth, this.pianoRoll.scrollTop)
|
353 |
}else if(midiEvent[0] === "patch_change"){
|
354 |
+
let track = midiEvent[2]
|
355 |
let channel = midiEvent[3]
|
356 |
this.patches[channel].push([t, midiEvent[4]])
|
357 |
this.patches[channel].sort((a, b) => a[0] - b[0])
|
358 |
+
this.getTrack(track, channel);
|
359 |
}
|
360 |
this.midiEvents.push(midiEvent);
|
361 |
this.svg.style.width = `${this.svgWidth}px`;
|