chipweinberger / dart_melty_soundfont

A port of Melty Synth by Nobuaki Tanaka (C#) to Dart
Other
33 stars 8 forks source link

Unexpected behavior when changing MIDI file playback position #18

Closed wsievern closed 1 year ago

wsievern commented 1 year ago

Hello,

I have MIDI files playing back, rendering, and time-stretching in real-time in my flutter app, it sounds great and is very performant! I've run into a confusing behavior, though. In my app, I have a progress bar to display the music's duration info and seek to different parts of the tune. When seeking, I call this function from @postacik's port of the sequencer:

sequencer.play(midiFile, false, duration); // modified to change the location where the playback begins in the Midi file

When I skip ahead in the tune, every note that came before gets triggered with a noteon event. They play back staccato, just for an instant, then playback continues normally.

This has really got me scratching my chin. Does anyone have an idea of what could be happening?

Thanks,

Will

chipweinberger commented 1 year ago

Not sure tbh!