This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-12-03 15:46:56

mickchang
Scratcher
Registered: 2007-09-01
Posts: 9

How to set the loudness variable

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

 

#2 2007-12-03 19:35:14

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: How to set the loudness variable

Loudness uses the microphone of the computer. It's value goes from 0 to 100.  No sound is 0 a lot noise is 100.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#3 2007-12-03 20:21:25

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: How to set the loudness variable

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

 

#4 2007-12-04 01:49:42

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: How to set the loudness variable

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


Jens Mönig

Offline

 

#5 2007-12-04 12:26:55

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: How to set the loudness variable

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

 

#6 2007-12-04 14:45:11

mickchang
Scratcher
Registered: 2007-09-01
Posts: 9

Re: How to set the loudness variable

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

 

#7 2007-12-05 01:51:21

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: How to set the loudness variable

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.


Jens Mönig

Offline

 

#8 2007-12-05 15:35:08

mickchang
Scratcher
Registered: 2007-09-01
Posts: 9

Re: How to set the loudness variable

Hi Jens, I had one student whose v1.2 froze after it opened a v1.1 file.  But it seems that is a special case.  Not a big deal.  Rest of the students were able to run their v1.1 files with v1.2.
Thanks.

Offline

 

Board footer