[squeak-dev] Sound mixing makes nasty noises

Herbert König herbertkoenig at gmx.net
Sun Dec 27 22:44:24 UTC 2020


I tested Tim's snippet (modified to use Delay forSeconds: ) on Squeak
3.6 (Windows) and it has the same problem. But it's only clipping and no
wrapping on Windows! Still very ugly.

Tomorrow I'll switch to a Pi to see if my recording to file also shows
wrapping. Then we'll know if it's the primitive handling audio to the OS
in Linux or Rapbian or if it happens inside Squeak's sound architecture.

Cheers,

Herbert

Am 27.12.2020 um 23:03 schrieb Herbert König:
> I changed SoundPlayer class playLoop which I figured is what passes
> the samples to the OS like attached, writing 1 mega samples to an aiff
> file. TSTTCPW.
> I must have made a mistake because I suddenly get lost buffers but
> frankly I had some wine :-).
>
> I used Tim's first snippet:
>
> "awful noise when mixing"
> |snd|
> snd := FMSound organ1.
> snd setPitch: 440 dur: 10 loudness: 0.9;
>     play.
> 1 second wait.
>
> FMSound brass1 setPitch: 470 // 2 dur:2 loudness: 0.9;
>     play.
> 1 second wait.
> snd stopGracefully
>
> It's repeatable the sound seems to have the right length but the
> discontinuity marked red usually happens if the sound system of the OS
> looses a buffer. I had my laptop run at 4 GHZ, the audio output
> sounded normally bad and the loss is in the first second, where the
> audio is still ok. Playing the recorded file reveals the additional
> distortions.
>
> I just want to save another trip through the time zones so I put it
> out buggy as it is. Maybe I just used the wrong place to do my
> recording, maybe I recorded mono from a stereo buffer, whatever.
>
> Be mild :-)
>
> Herbert
>
>
>
>
> Am 27.12.2020 um 19:49 schrieb Herbert König:
>> Next step is to try to record the output before it goes to the OS and
>> see if the image or some primitive creates the problem.
>>
>> Cheers,
>>
>> Herbert
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201227/4316f61a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hlgkbmcgckmbaocp.png
Type: image/png
Size: 10485 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201227/4316f61a/attachment.png>


More information about the Squeak-dev mailing list