The only way I can think of to use the loudness variable is to check the condition of the loudness like "if loudness=1" "if loudness=2", etc.
Is there a method to set loudness?
Is the loudness just uses the loudness of the computer sound setting?
Thanks.
Offline
Loudness uses the microphone of the computer. It's value goes from 0 to 100. No sound is 0 a lot noise is 100.
Offline
mickchang, there are two different concepts in Scratch (starting with v1.2)
loudness: how loud sounds are heard at the microphone (if your computer has a microphone)
volume: how loud sounds are played by the computer. Each sprite has its own volume, so you can make one sprite fade out while another fades in. Incidentally, they seem to have used a linear scale for volume, so you probably want to do
set volume to volume *0.8
rather than
change volume by -20
to adjust volume in a perceptually uniform way.
It might have been better for volume to have been on a logarithmic scale (like the decibel scale used by audio engineers), so that adding and subtracting volumes would have had a more perceptually uniform effect.
Offline
Fading in/out seems to be a problem, however, because the volume is currently not affected while a (long) musical note is being played. Scratch currently only supports baroque style "Stufendynamik".
Offline
I rarely use the "play sound" option, so had not noticed that the volume did not affect sounds in progress. This could be a problem.
Volume seems to do the normal thing with the MIDI instruments (affecting subsequent notes, but not notes already in progress). This is fine for music you compose yourself, though not quite as flexible has having a volume input on the play note command.
Offline
Thanks for all the responses. We are still using v1.1, so I had not seen the volume control.
Is there going to be a files-only version of V1.2 instead of the executable installer version?
We are having some problems where *.sb files developed with v1.1 is locked and uneditable in v1.2. I haven't checked all of the forum for this problem. But is this a known bug, or we are not doing something correctly?
Thanks for all your work on Scratch. My students really enjoy it.
Last edited by mickchang (2007-12-04 19:04:42)
Offline
Kevin,
being unable to change the volume of an ongoing midi sound not only affects music. It would be nice, e.g. to let the volume of a (more or less permanent) sound reflect the distance of one sprite to another, or its size (or any other attribute for that matter). It's just that in music the inability to bring forth real sound fadings is an especially 'painful' limitation, since it effectively disables dynamics.
michchang,
I'm having no problems at all editing v. 1.1 *.sb files in v. 1.2. How do you notice that you cannot edit these files, is there any kind of error message / walkback / popup coming up? I did have a similar problem when I opened Scratch 1.2. (beta) and the Scratch java player at the same time. Because I used an old java version (1.4.) java seemingly took over the midi port and prevented Scratch from resetting the volume to default when loading *any* new project. Once I upgraded to a newer java version that problem now occurs less often.
Offline