Sound library (from Squeaking up for "'click' sound play")

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sound library (from Squeaking up for "'click' sound play")

Jerome Peace
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




     

Reply | Threaded
Open this post in threaded view
|

Re: Sound library (from Squeaking up for "'click' sound play")

Hannes Hirzel
Hi Jerome

Thanks for starting to work out a write-up how to deal with sound in Squeak 4.1.

On 4/23/10, Jerome Peace <[hidden email]> wrote:

> 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)

OK so may I consider SampledSound to be the sound library?

> "'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.
This is interesting. Do you have a reference?


> 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. :-)

Yes, we need a good way to access sounds. That means 'code idioms'
which are easy to grasp for a beginner to use sounds.


(Or in SW engineering terms - an embedded DSL for handling sounds)

It would help to have a couple of good example statements what can be
done with sound as of now.

Did you check out the Squeak wiki? I found an entry
Squeak sound architecture
http://wiki.squeak.org/squeak/1952

I did not go through it.
We need to know what still works or how things are done these days.

This could then be an entry in the 'Help' menu called 'Sound' which
contains code snippets and instructions how to deal with sound.

> 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.

I agree. And you did that step.


> Yours in curiosity and service, --Jerome Peace
>

In your service as well

Hannes

P.S. The  class AbstractSound  and the subclasses - do they contains
useful comments?

Reply | Threaded
Open this post in threaded view
|

Re: Sound library (from Squeaking up for "'click' sound play")

Jerome Peace
In reply to this post by Jerome Peace
Hi Hannes,

I was happy to answer your first request even though it was off the topic I was persuing. Now I must ask you to GTFI (Google the Fine Internet the modern equivalent of RTFM.)

You are asking me for information I don't have at my fingertips and which it would take me as much time to find out as it would you.

I like to be helpful but I must insist on putting my own work before your education. You are welcome and encouraged to do the opposite with your own efforts, not with mine.


>Hannes Hirzel hannes.hirzel at gmail.com
>Sat Apr 24 08:34:32 UTC 2010
>
>
>
>Hi Jerome
>
>Thanks for starting to work out a write-up how to deal with sound in Squeak 4.1.
>
>On 4/23/10, Jerome Peace <peace_the_dreamer at yahoo.com> wrote:
>> Hi Hannes.
>>
>><...>
>>>Hannes Hirzel hannes.hirzel at gmail.com
>>>Fri Apr 23 09:25:54 UTC 2010 :
>>>

Hannes>OK so may I consider SampledSound to be the sound library?

No. Look at the class to see the exact relationship.

>
>> 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.
>This is interesting. Do you have a reference?

Google the first sentence:
http://en.wikipedia.org/wiki/Bricolage
>
<...>
>
>Yes, we need a good way to access sounds. That means 'code idioms'
>which are easy to grasp for a beginner to use sounds.

Squeak in its spirit is about making language. Language is about communicating with strangers until they are not strange anymore. The best way to aid that is to use language the stranger already knows.

>
>(Or in SW engineering terms - an embedded DSL for handling sounds)
>
Acronyms and abbreviations are strange to me. What are you meaning when you say SW and DSL?


>It would help to have a couple of good example statements what can be
>done with sound as of now.
>
>Did you check out the Squeak wiki? I found an entry
>Squeak sound architecture
>http://wiki.squeak.org/squeak/1952
>
>I did not go through it.

Why not? (I'm curious. What made it uninviting?)

>We need to know what still works or how things are done these days.
>
Huh? What stops you from knowing how things will work in the future? There is no reason documentation can't precede design. Indeed that's the way most things will happen.

If things are done in a clumsy way now, then it will be a bear to document. If something that doesn't exist has beautiful documentation it will be brought into existence.

>This could then be an entry in the 'Help' menu called 'Sound' which
>contains code snippets and instructions how to deal with sound.
>
>> 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.
>
>I agree. And you did that step.
>
>
>> Yours in curiosity and service, --Jerome Peace
>>
>
>In your service as well
>
>Hannes
>
>P.S. The  class AbstractSound  and the subclasses - do they contains
>useful comments?

Umm. You tell me.

Cheers --Jer


     

Reply | Threaded
Open this post in threaded view
|

Re: Sound library (from Squeaking up for "'click' sound play")

Hannes Hirzel
Hello Jerome

I think there is some misunderstanding between as.

I was assuming

1) You are interested in providing new user help to do sound related
things in Squeak
2) When we speak of sound the topic of a sound library naturally comes up.
3) Then of course the question is how to use this library.
4) This would naturally develop into writing a help text to be
included into the image.


If you do not have time working on this _NOW_ than that is fine for
me. We are in volunteers.

The same applies to me. I will come back to the issue of sound later.

I know that I can google for things if I want to find out something for myself.
Actually before I do that I go to the class library to check what is there.

As we all know this is time consuming and one of the tasks of making
it easier for others is then to share the result of these journeys.

Have a nice day

Hannes

P.S. I did not understand in which way my first request was off-topic.

Or does it mean you are really only advocating
  'click' sound play
and that's all?

OK, fine. No objection    :-)

Hannes

On 4/25/10, Jerome Peace <[hidden email]> wrote:

> Hi Hannes,
>
> I was happy to answer your first request even though it was off the topic I
> was persuing. Now I must ask you to GTFI (Google the Fine Internet the
> modern equivalent of RTFM.)
>
> You are asking me for information I don't have at my fingertips and which it
> would take me as much time to find out as it would you.
>
> I like to be helpful but I must insist on putting my own work before your
> education. You are welcome and encouraged to do the opposite with your own
> efforts, not with mine.
>
>
>>Hannes Hirzel hannes.hirzel at gmail.com
>>Sat Apr 24 08:34:32 UTC 2010
>>
>>
>>
>>Hi Jerome
>>
>>Thanks for starting to work out a write-up how to deal with sound in Squeak
>> 4.1.
>>
>>On 4/23/10, Jerome Peace <peace_the_dreamer at yahoo.com> wrote:
>>> Hi Hannes.
>>>
>>><...>
>>>>Hannes Hirzel hannes.hirzel at gmail.com
>>>>Fri Apr 23 09:25:54 UTC 2010 :
>>>>
>
> Hannes>OK so may I consider SampledSound to be the sound library?
>
> No. Look at the class to see the exact relationship.
>
>>
>>> 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.
>>This is interesting. Do you have a reference?
>
> Google the first sentence:
> http://en.wikipedia.org/wiki/Bricolage
>>
> <...>
>>
>>Yes, we need a good way to access sounds. That means 'code idioms'
>>which are easy to grasp for a beginner to use sounds.
>
> Squeak in its spirit is about making language. Language is about
> communicating with strangers until they are not strange anymore. The best
> way to aid that is to use language the stranger already knows.
>
>>
>>(Or in SW engineering terms - an embedded DSL for handling sounds)
>>
> Acronyms and abbreviations are strange to me. What are you meaning when you
> say SW and DSL?
>
>
>>It would help to have a couple of good example statements what can be
>>done with sound as of now.
>>
>>Did you check out the Squeak wiki? I found an entry
>>Squeak sound architecture
>>http://wiki.squeak.org/squeak/1952
>>
>>I did not go through it.
>
> Why not? (I'm curious. What made it uninviting?)
>
>>We need to know what still works or how things are done these days.
>>
> Huh? What stops you from knowing how things will work in the future? There
> is no reason documentation can't precede design. Indeed that's the way most
> things will happen.
>
> If things are done in a clumsy way now, then it will be a bear to document.
> If something that doesn't exist has beautiful documentation it will be
> brought into existence.
>
>>This could then be an entry in the 'Help' menu called 'Sound' which
>>contains code snippets and instructions how to deal with sound.
>>
>>> 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.
>>
>>I agree. And you did that step.
>>
>>
>>> Yours in curiosity and service, --Jerome Peace
>>>
>>
>>In your service as well
>>
>>Hannes
>>
>>P.S. The  class AbstractSound  and the subclasses - do they contains
>>useful comments?
>
> Umm. You tell me.
>
> Cheers --Jer
>
>
>
>
>