OverlappingElvis / blob-opera-midi

Convert MIDI arrangements to Blob Opera JSON.
The Unlicense
35 stars 7 forks source link

Getting an issue during export #9

Open Boii1 opened 3 years ago

Boii1 commented 3 years ago

TypeError: Cannot read property 'reduce' of undefined at C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\src\midi-to-blob.js:91:20 at Array.map (<anonymous>) at MidiToBlob.convert (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\src\midi-to-blob.js:87:36) at exportSong (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\index.js:82:26) at Screen.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\index.js:93:27) at Screen.EventEmitter._emit (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\node_modules\blessed\lib\events.js:94:20) at Screen.EventEmitter.emit (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\node_modules\blessed\lib\events.js:114:17) at Program.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\node_modules\blessed\lib\widgets\screen.js:593:12) at Program.emit (events.js:315:20) at C:\Users\User\AppData\Roaming\npm\node_modules\blob-opera-midi\node_modules\blessed\lib\program.js:410:15

OverlappingElvis commented 3 years ago

Thanks @Boii1, I'll take a look. Can you provide an example of a midi file that's causing this issue? Wondering if this is happening because you're providing a file with fewer than 4 tracks.

ncoolidg commented 3 years ago

I am having the same issue. My midi file is more than 4 tracks, maybe this could be a problem???

yell0wsuit commented 2 months ago

HappyNewYear.zip

I also encountered this issue. This is the sample file.

Maybe the cause of reduce error is because the midi file has fewer than 4 tracks while the tool forces 4 tracks to be assigned.