jet2jet / js-synthesizer

Synthesizer library for web-based JS program, using with Web Audio or etc.
BSD 3-Clause "New" or "Revised" License
58 stars 8 forks source link

Synthesizer pausePlayer? #28

Open cwiggins999 opened 7 months ago

cwiggins999 commented 7 months ago

We're using js-synthesizer to play MIDI sequences/files in our Electron/Capacitor project and it works and sounds great. Is there an interface or other mechanism to pause/resume the player? I use the stopPlayer and and playPlayer functions, but looking at the functions available, seems I would have to get the current player location, then use stopPlayer/seekPlayer(position)/playPlayer. I'm not sure if there's a way to get the current Player location, or some other approach to accomplish this.

Thanks for this library!!

jet2jet commented 7 months ago

Sorry for inconvenience, but since the base library FluidSynth does not have feature for pausing player (only provides play/stop/seek), js-synthesizer does not have pausePlayer.
So, please use stopPlayer/seekPlayer/playPlayer as you mentioned.