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

#1 2011-04-04 17:40:26

Angel77
New Scratcher
Registered: 2011-04-04
Posts: 1

Contiuneous Music

How do I get the music to play all they way through?

Offline

 

#2 2011-04-04 18:14:55

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Contiuneous Music

Code:

When green flag clicked
Forever
    Play sound (music) until done
End

There is a slight delay at the end before the sound repeats, but this will make your music loop continuously.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-04-04 21:16:33

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Contiuneous Music

Or if you now exactly how long it is you can use

Code:

<when green flag clicked>
<forever>
<play sound[ (sound)
<wait( (length of sound) )secs>
<end -^>

This also allows you to stop before any unwanted silence, you just change the wait by - 0.1 until the silence has gone enough.


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#4 2011-04-04 21:35:55

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Contiuneous Music

Pecola1 wrote:

Or if you now exactly how long it is you can use

Code:

<when green flag clicked>
<forever>
<play sound[ (sound)
<wait( (length of sound) )secs>
<end -^>

This also allows you to stop before any unwanted silence, you just change the wait by - 0.1 until the silence has gone enough.

True but there can be timing errors online if you use that method.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#5 2011-04-05 17:07:54

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Contiuneous Music

Kileymeister wrote:

Pecola1 wrote:

Or if you now exactly how long it is you can use

Code:

<when green flag clicked>
<forever>
<play sound[ (sound)
<wait( (length of sound) )secs>
<end -^>

This also allows you to stop before any unwanted silence, you just change the wait by - 0.1 until the silence has gone enough.

True but there can be timing errors online if you use that method.

Yep, but it can be useful if there are annoying hitches in looping music.


http://i48.tinypic.com/2z5pqad.png

Offline

 

Board footer