sfzlab / sfz-web-player

SFZ player using the Web Audio API
http://sfzlab.github.io/sfz-web-player/
Creative Commons Zero v1.0 Universal
14 stars 1 forks source link

Audio clipping #6

Open mmontag opened 5 months ago

mmontag commented 5 months ago

Hi, I'm sorry to be harsh, but the sound clips so easily that it's almost unusable. Can you add a gain control and significantly reduce the default output level?

kmturley commented 5 months ago

Hello, it is not harsh to provide valuable feedback. Can you provide more information about the machine/browser you are using and which instrument so I can try to replicate?

This sfz-web-player is a prototype so does not have many audio effects/controls implemented yet

Here is a video showing notes played with a volume indicator. Looks ok to me at first glance: https://github.com/sfzlab/sfz-web-player/assets/1710493/657daf46-bbb3-4ef7-b850-03754678afeb

It would be fairly easy to add a volume control if using your overall machine volume is not sufficient

mmontag commented 5 months ago

I don't think it is machine/browser specific, but I could be wrong. I think the engine is internally clipping. (Turning down the system volume does not alleviate the clipping)

I am just loading up the page with the default instrument, which sounds like Kalimba, and then clicking my mouse across all the notes. As soon as 3-4 notes are playing simultaneously, it sounds like clipping to me.

kmturley commented 5 months ago

Ah yes I can replicate. Playing multiple notes together does cause distortion/clipping. Will add as a bug to fix