[squeak-dev] Sound library (from Squeaking up for "'click' sound play")

Jerome Peace peace_the_dreamer at yahoo.com
Fri Apr 23 22:00:42 UTC 2010


Hi Hannes.


>Hannes Hirzel hannes.hirzel at gmail.com
>Fri Apr 23 09:25:54 UTC 2010 wrote:
>
>Yes, Jerome
>
>I am interested as well to have a good sound library in Squeak which
>is easy to access. With a sound browser.....
>
>Would it be possible to summarize with a few code snippets how we are
>supposed to work with sounds as it is currently

Yes. I decline. I'm a lazy programmer and it is easier to use the selector to guarentee the return of a playable sound based on the name of the receiver.

"'click' sound" guarentees you have a playable sound.

Assuming there are entries in SoundLibrary:
currentSound := SampledSound soundNames atRandom sound .
currentSound play. 
will make one. (If the library is empty you will get a debug box from atRandom)

"'click' sound play" on the other hand will play the default sound.

Wait.
You're in luck. My brain just remembered how to browse the sound library.
Open a view on any morph. One of the basic thing you can do is 'make sound' the argument is selected from a pull down list of what is in the sound library.

>and secondy what you think it should be in the future.
>
I haven't gotten that far in my thinking yet. I wandered into the creation of this selector because "Beeper beep: 'click'" was used extensively in one of my programs. When the deprecated Object>>#beep: got nuked it didn't work anymore.

Rather than patch back the past I decided I wanted to have a selector I could send to the name of the sound I wanted to play. 

Seymour Papert talks about bricolage. Spending time building with things already on hand. Building in a playful spirit. The sound classes in squeak are amazing toys to play with. Beyond the sounds in the SampledSound sound library you can play a great number of things. I've just started to notice its capabilities.

The selector I am proposing is just a way to connect a name with something that can play. 

So someday:
"'myGreatMasterpiece' sound play" 

I just have to find a way to build a sound library of masterpieces and teach the selector how to have access to it. :-)

A journey sometimes starts with only a notion of a destination or even just a need to leave the present location. The path unfolds as one goes. Always, a journey starts with a first step.

Yours in curiosity and service, --Jerome Peace




      



More information about the Squeak-dev mailing list