grimmdude / MidiPlayerJS

♬ MIDI parser & player engine for browser or Node. As a parser converts MIDI events into JSON. Works well with single or multitrack MIDI files.
https://grimmdude.com/MidiPlayerJS/
MIT License
357 stars 52 forks source link

[Feature Request] Collapse to single track/singular notes #99

Open Andrew-J-Larson opened 1 year ago

Andrew-J-Larson commented 1 year ago

I've noticed there are some songs that play multiple instruments on the same note.

This is generally fine, but in the instance where I have all midi notes playing as the same instrument (per a website by design), this gets a bit chaotic.

Would it be possible to "collapse" all notes to a single instrument track, such that multiples of the same pitched notes that play at the same time instead only play one note at that instance? Assumably, picking the note with the longest duration that starts from the same moment as others of the same pitch.

Of course, as a togglable feature.

Andrew-J-Larson commented 1 year ago

There should also be an ability to exclude tracks from this collapse (in the case of not playing those tracks with the file, e.g. like turning off percussion to collapse just the melody/bass).