raspberrypi / scratch

Scratch releases
79 stars 21 forks source link

nsb11: playing sounds on Pi gives echo/reverb and static hiss not present on OS X #64

Closed timrowledge closed 10 years ago

timrowledge commented 10 years ago

Reported by iw1 on forum -

Does anyone else experience an echo/reverberation on sounds with v11 Beta (and v10, the only other >version I've tried)? It's as though the sound is being triggered twice. I don't get this effect on the original >Scratch or Sonic Pi.

timrowledge commented 10 years ago

I noted-

this is very odd and I think has to be some aspect of ALSA setup. On my Pi I certainly get some more reverb with NuScratch than old scratch - but on my iMac the very same image makes entirely normal sounding noises. that agree as precisely as my ears can tell with the old scratch image on my iMac. I notice that the ALSA based Pi seem to leave the sounds running on after they should have stopped, resulting in some nasty hiss until you deliberately turn off sounds with the 'stop all sounds' block. Sound has been something of a pain recently, with a major bug in the ALSA library being responsible for total machine lockups until we found a work around.

timrowledge commented 10 years ago

Turning off reverb makes things a bit nicer to the ear but the "deafening sound of silence" is pretty bad. SonicPi has exactly the same problem on my machine, which at least makes me feel a bit better about my side of the issue! It turns out that old Scratch hd reverb turned off without any evidence in the codebase that it had been set that way. I've updated the release script to make sure it is done in the future.

timrowledge commented 10 years ago

There are some systemic issues with sound via ALSA and the analogue headphone socket; playing explicit silence produces a lot of hiss because (At least in part ) of a change made in the firmware aug 20 '14. It is possible to add disable_audio_dither=1 to /boot/config.txt to turn off the effect of that change and things sound somewhat better. I don't know what the ultimate resolution will be.