Request for Help - Question 20100501

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

Request for Help - Question 20100501

Carlos Rabassa
This is my request:

http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7


Any help will be appreciated.

Carlos Rabassa
Montevideo, Uruguay

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Karl Ramberg
On 2010-01-05 18:33, Carlos Rabassa wrote:
> This is my request:
>
> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>
>
> Any help will be appreciated.
>
> Carlos Rabassa
> Montevideo, Uruguay

Hi
there is a bug in the system.
SoundService/BaseSoundSystem creates its unique instances without
leaving a reference as far as I can tell.
When we tell the sound to stop we don't know which sound to stop...

Here is a proposed fix to that:

Player>>beep: anObject
     "Play given sound or at least beep."
     | sound |
     anObject isString
         ifTrue: [sound _ SoundService default soundNamed: anObject.
             SoundPlayer playSound: sound.
             self costume
                 setProperty: #playingSound
                 toValue: sound. ]
         ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
             self costume setProperty: #playingSound toValue: anObject]

Karl


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Carlos Rabassa
Karl,

Thank you very much for your prompt answer.

I'm afraid however it is too much for my level of knowledge.

If I understand you correctly,  you are saying what I want to do  
cannot be done by a regular user.

Somehow someone has to modify the Etoys code and you feel I can do it??

Carlos


On Jan 5, 2010, at 5:02 PM, Karl Ramberg wrote:

> On 2010-01-05 18:33, Carlos Rabassa wrote:
>> This is my request:
>>
>> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>>
>>
>> Any help will be appreciated.
>>
>> Carlos Rabassa
>> Montevideo, Uruguay
>
> Hi
> there is a bug in the system.
> SoundService/BaseSoundSystem creates its unique instances without  
> leaving a reference as far as I can tell.
> When we tell the sound to stop we don't know which sound to stop...
>
> Here is a proposed fix to that:
>
> Player>>beep: anObject
>    "Play given sound or at least beep."
>    | sound |
>    anObject isString
>        ifTrue: [sound _ SoundService default soundNamed: anObject.
>            SoundPlayer playSound: sound.
>            self costume
>                setProperty: #playingSound
>                toValue: sound. ]
>        ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
>            self costume setProperty: #playingSound toValue: anObject]
>
> Karl
>
>

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Carlos Rabassa
In reply to this post by Karl Ramberg
Karl,

Thank you very much for your prompt answer.

I'm afraid however it is too much for my level of knowledge.

If I understand you correctly,  you are saying what I want to do  
cannot be done by a regular user.

Somehow someone has to modify the Etoys code and you feel I can do it??

Carlos


On Jan 5, 2010, at 5:02 PM, Karl Ramberg wrote:

> On 2010-01-05 18:33, Carlos Rabassa wrote:
>> This is my request:
>>
>> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>>
>>
>> Any help will be appreciated.
>>
>> Carlos Rabassa
>> Montevideo, Uruguay
>
> Hi
> there is a bug in the system.
> SoundService/BaseSoundSystem creates its unique instances without  
> leaving a reference as far as I can tell.
> When we tell the sound to stop we don't know which sound to stop...
>
> Here is a proposed fix to that:
>
> Player>>beep: anObject
>    "Play given sound or at least beep."
>    | sound |
>    anObject isString
>        ifTrue: [sound _ SoundService default soundNamed: anObject.
>            SoundPlayer playSound: sound.
>            self costume
>                setProperty: #playingSound
>                toValue: sound. ]
>        ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
>            self costume setProperty: #playingSound toValue: anObject]
>
> Karl
>
>

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

p.a.dreyfuss@excite.com
In reply to this post by Carlos Rabassa
Hi, Carlos and the etoys team.
Some times ago I made this project.

It seems empty but if you see the sound category there is a new tile playsoundUntilDone which dont play another sound
until the first one is finished.

In fact this project contains a changeset,(a modification of Etoys)

If this new tile is juged usefiull by the etoys tile, it could be part of a next update.

You can play with it then reload etoys to revert with standard etoys.
This more an example of adding new tiles fo advanced programmers or for testinng and updating etoys by the team.

If you save a project without the change but using the new tile, you have to load this project before your project.

Regards

Ps The strange name of the project is due to the way the xo attachs a file.




-----Original Message-----
From: "Carlos Rabassa" [[hidden email]]
Date: 01/05/2010 05:43 PM
To: "Karl Ramberg" <[hidden email]>
CC: [hidden email]
Subject: Re: [squeakland] Request for Help - Question 20100501

Karl,

Thank you very much for your prompt answer.

I'm afraid however it is too much for my level of knowledge.

If I understand you correctly, you are saying what I want to do
cannot be done by a regular user.

Somehow someone has to modify the Etoys code and you feel I can do it??

Carlos


On Jan 5, 2010, at 5:02 PM, Karl Ramberg wrote:

> On 2010-01-05 18:33, Carlos Rabassa wrote:
>> This is my request:
>>
>> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>>
>>
>> Any help will be appreciated.
>>
>> Carlos Rabassa
>> Montevideo, Uruguay
>
> Hi
> there is a bug in the system.
> SoundService/BaseSoundSystem creates its unique instances without
> leaving a reference as far as I can tell.
> When we tell the sound to stop we don't know which sound to stop...
>
> Here is a proposed fix to that:
>
> Player>>beep: anObject
> "Play given sound or at least beep."
> | sound |
> anObject isString
> ifTrue: [sound _ SoundService default soundNamed: anObject.
> SoundPlayer playSound: sound.
> self costume
> setProperty: #playingSound
> toValue: sound. ]
> ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
> self costume setProperty: #playingSound toValue: anObject]
>
> Karl
>
>

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland



   Improve your career health. Click now to study nutrition!
Nutrition
Click Here For More Information
 

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland

tmpMirIB-.pr (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Carlos Rabassa
In reply to this post by Karl Ramberg
Many thanks to all that responded to my request for help.

This is really a worldwide community!

Each one of the responses received so far have taught me something  
interesting,  has given me a better insight into Etoys.

The original problem is however still unsolved.

I shared a project:

http://squeakland.org/showcase/project.jsp?id=7829

which is a translation of another project,  used in the Virgin Islands  
pilot project.

You may see one of the suggestions for improvements was to correct a  
problem:

If the user changes pages too fast, the sound in the new page starts,  
whether or not the sound on the previous page has ended.

We hear both,  one on top of the other.

Karl mentions the problem is the sound to be stopped cannot be easily  
identified.

My problem would be resolved if I could stop all sounds,  then I would  
have silence to start the sound for the new page.

The other answers bring very interesting possibilities which I was not  
aware of but, again,  I don't seem to be able to apply to the problem  
in front of me.

Thanks again,

Carlos Rabassa
Montevideo, Uruguay


On Jan 5, 2010, at 5:02 PM, Karl Ramberg wrote:

> On 2010-01-05 18:33, Carlos Rabassa wrote:
>> This is my request:
>>
>> http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
>>
>>
>> Any help will be appreciated.
>>
>> Carlos Rabassa
>> Montevideo, Uruguay
>
> Hi
> there is a bug in the system.
> SoundService/BaseSoundSystem creates its unique instances without  
> leaving a reference as far as I can tell.
> When we tell the sound to stop we don't know which sound to stop...
>
> Here is a proposed fix to that:
>
> Player>>beep: anObject
>    "Play given sound or at least beep."
>    | sound |
>    anObject isString
>        ifTrue: [sound _ SoundService default soundNamed: anObject.
>            SoundPlayer playSound: sound.
>            self costume
>                setProperty: #playingSound
>                toValue: sound. ]
>        ifFalse: [SoundPlayer resumePlaying: anObject quickStart: true.
>            self costume setProperty: #playingSound toValue: anObject]
>
> Karl
>
>

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Bert Freudenberg
On 06.01.2010, at 13:57, Carlos Rabassa wrote:
>
>
> My problem would be resolved if I could stop all sounds,  then I would have silence to start the sound for the new page.

Carlos,

you can make yourself a tile that stops all sounds.

1) make a new script, switch it to "textual" mode using its white menu button:




2) replace the "^self" line in the script with "SoundPlayer stopPlayingAll", then press Cmd-S to save it:




3) use the new tile in your own script:




Explanation:

"SoundPlayer stopPlayingAll" is an expression from the "Squeak" programming language underlying Etoys. By switching a script to "textual" mode you can enter arbitrary statements. This is useful to access functionality not provided by Etoys tiles directly.

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland

PastedGraphic-1.png (45K) Download Attachment
PastedGraphic-2.png (31K) Download Attachment
PastedGraphic-4.png (80K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Bert Freudenberg
Carlos,

I see you used the "start script" tile even for scripts that should only run once (and you pause the script after its first run). A much simpler and usually preferred way is to simply drop one script's tile from the viewer into another script.

- Bert -


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Question 20100501

Carlos Rabassa
In reply to this post by Bert Freudenberg
Bert,

thank you very much.

Tried your solution.

It works perfectly.

Now I have to incorporate it to some projects.

Will let you know about my progress.

Thanks!!

Carlos


On Jan 6, 2010, at 11:02 AM, Bert Freudenberg wrote:

> On 06.01.2010, at 13:57, Carlos Rabassa wrote:
>>
>>
>> My problem would be resolved if I could stop all sounds,  then I  
>> would have silence to start the sound for the new page.
>
> Carlos,
>
> you can make yourself a tile that stops all sounds.
>
> 1) make a new script, switch it to "textual" mode using its white  
> menu button:
>
> <PastedGraphic-1.png>
>
> 2) replace the "^self" line in the script with "SoundPlayer  
> stopPlayingAll", then press Cmd-S to save it:
>
> <PastedGraphic-2.png>
>
> 3) use the new tile in your own script:
>
> <PastedGraphic-4.png>
>
> Explanation:
>
> "SoundPlayer stopPlayingAll" is an expression from the "Squeak"  
> programming language underlying Etoys. By switching a script to  
> "textual" mode you can enter arbitrary statements. This is useful to  
> access functionality not provided by Etoys tiles directly.
>
> - Bert -
>

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland