[squeak-dev] Re: How can I listen to my app?

Herbert König herbertkoenig at gmx.net
Thu Sep 11 20:15:42 UTC 2014


Hi Chris,

in the scratch start script on the Raspberry Pi it says:
VMOPTIONS="$VMOPTIONS -vm-sound-alsa"

Only have SSH Access to my Pi but I know Scratch plays sound while 
Squeak doesn't on the Pi.

Re your other question: It's said that musicians can distinguish two 
sounds starting 6 ms apart as two different sounds which kind of implies 
that the untrained ear hears them as one sound. Otherwise you should be 
able to hear such a short sound but IIRC the human ear decides in the 
first 100 ms what instrument it hears. So I assume it will be hard to 
distinguish different sounds as short as 10 ms.

I suggest you create wav files in Squeak and play them back via VLC to 
find out what you hear. AbstractSound is your friend here. I can go dig 
in my old code if you need help.

Cheers

Herbert

Am 11.09.2014 um 21:47 schrieb Chris Muller:
> squeak -help reports:
>
> Available drivers:
>    vm-sound-null
>    vm-sound-ALSA
>    vm-sound-OSS
>
> But when I try:
>
>     squeak -vm sound=ALSA my.image
>
> and try to play a sound I get this on the console:
>
>     sound_Start(default)
>     soundStart: snd_add_pcm_handler: Function not implemented
>
>
> On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <asqueaker at gmail.com> wrote:
>> I've decided I want to get a feel for what my app is doing and at what
>> rate by, literally, listening to it.  I want to put in some brief
>> beeps into strategic locations.
>>
>> But sound is an area where I have exactly zero experience.  I want the
>> sounds to play but with minimal impact on the running program; i.e.,
>> I'm willing to make the beeps very short, but even a 10ms beep (would
>> I even be able to hear that?) would slow the program down.
>>
>> And yet, if I tried to play them in the background, they will not be
>> in-sync with with the real-time state of the app.  I suppose another
>> option would be to record the events I'm interested in and their time
>> and play them back later, but I'm more interested in the *real-time*
>> state.
>>
>> Finally, how can I play any sound at all with Squeak and Cog on Linux?
>>   When I try some of the demo sounds on FMSound, there is no sound and
>> I see this message in the console:
>>
>>      sound: /dev/dsp: No such file or directory
>>
>> Of course, no other apps on this machine have any trouble playing
>> sounds, so is something simply pointing in the wrong place?
>>
>> Thanks.



More information about the Squeak-dev mailing list