This is my request:
http://docs.google.com/View?id=dg7q79cx_668g4d6bqg7
Any help will be appreciated.
Carlos Rabassa Montevideo, Uruguay
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
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
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
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
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 -
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 -
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.
- make a new script, switch it to "textual" mode using its white
menu button:
<PastedGraphic-1.png>
- replace the "^self" line in the script with "SoundPlayer
stopPlayingAll", then press Cmd-S to save it:
<PastedGraphic-2.png>
- 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@lists.squeakfoundation.org