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

#1 2012-03-27 10:23:14

xJira
Scratcher
Registered: 2012-03-24
Posts: 91

Two Sound-Blocks

Hi everybody!
First there is one thing I wanted to tell the makers of Scratch: Scratch is awesome! *__* Thanks for making it possible for me and all the other Scratchers to create Games and other stuff!!

Ok, while I was working on my project an idea occured to me:

You should make a block that makes it possible to let a sound (or better: a piece of music) fade to another piece of music, like ...

[play sound "music1"]
[wait until score = 5]
[fade to sound "music2"]

Offline

 

#2 2012-03-27 10:30:23

xJira
Scratcher
Registered: 2012-03-24
Posts: 91

Re: Two Sound-Blocks

Oh, I forgot the second block!
What about a loop-block that says:

[keep playing "music3"]

Would you like these blocks?

Offline

 

#3 2012-03-27 12:41:25

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Two Sound-Blocks

What would

 keep playing [music3 v] 
Do?

Last edited by ImagineIt (2012-03-27 12:42:05)

Offline

 

#4 2012-03-27 14:45:19

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Two Sound-Blocks

ImagineIt wrote:

What would

 keep playing [music3 v] 
Do?

When it gets to the end of the sound clip, it'll replay it, I presume.

That can be easily replicated though;

forever
  play sound [music v] until done
end
smile


Why

Offline

 

#5 2012-03-28 07:48:24

xJira
Scratcher
Registered: 2012-03-24
Posts: 91

Re: Two Sound-Blocks

RedRocker227 wrote:

ImagineIt wrote:

What would

 keep playing [music3 v] 
Do?

When it gets to the end of the sound clip, it'll replay it, I presume.

That can be easily replicated though;

forever
  play sound [music v] until done
end
smile

Thats actually right but if I stop the music and then start another song, both the first and the second one are played 3= Thats why I would like more possibilities, the fade-block is actually more important  wink

Offline

 

#6 2012-03-28 16:19:09

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Two Sound-Blocks

xJira wrote:

RedRocker227 wrote:

ImagineIt wrote:

What would

 keep playing [music3 v] 
Do?

When it gets to the end of the sound clip, it'll replay it, I presume.

That can be easily replicated though;

forever
  play sound [music v] until done
end
smile

Thats actually right but if I stop the music and then start another song, both the first and the second one are played 3= Thats why I would like more possibilities, the fade-block is actually more important  wink

The fade block can be created like this:

repeat until <(timer) > [10]>
play sound [sound 1 v]
end
repeat [10]
change volume by [-10]
wait [0.1] secs
end
repeat [10]
change volume by [10]
wait [0.1] secs
end
forever
play sound [sound 2 v]
end
Note, this script is untested. It possibly (definitely) has errors.

Last edited by bobbybee (2012-03-28 16:19:35)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

Board footer