grimmdude / MidiWriterJS

♬ A JavaScript library which provides an API for programmatically generating and creating expressive multi-track MIDI files and JSON.
MIT License
547 stars 58 forks source link

Seems to hang on using the writer #92

Closed ayunami2000 closed 1 year ago

ayunami2000 commented 2 years ago

image image

It hangs right before the console.log(123); part and I can't figure out why. I have tested if it's hanging in the for loop but it goes through that in under a second.

The whole thing is run async if that means anything

ayunami2000 commented 2 years ago

I got it to work using a different library: https://github.com/dingram/jsmidgen

But I'll keep this open so you guys can patch the issue.

grimmdude commented 2 years ago

Hey @ayunami2000,

Thanks for reporting! If you could provide some reproducible code, that would help us debug this issue.

ayunami2000 commented 2 years ago

Once I get home after school (~10 or so hours) I'll get details like my node version and some code to reproduce the issue.

dturner34 commented 1 year ago

I was able to reproduce this by accidentally sending a messed up duration 'T-100'.

grimmdude commented 1 year ago

Thanks @ayunami2000 & @dturner34.

I've added some validation for this which throws an error if an invalid duration is used. Hopefully that should shine some light on the issue you were having @ayunami2000.