Discuss Scratch

bootsowen
Scratcher
64 posts

Help with Music Looping

Hi, I'm making a game on scratch but I'm having some difficulties.

I use Audacity to edit the music I have, and I edited a theme to loop on the title screen. In Audacity, it loops perfectly. But in Scratch, there's a very small delay at the end of each loop and it doesn't sound like a loop anymore because you can tell when the loop ends. Is there a way to fix this?

Here's what I have:

when green flag clicked
repeat until <[Game Start] = [true]>

play sound [Music Loop v] until done
end
Levo-Films
Scratcher
100+ posts

Help with Music Looping

Use the cut tool.
"The “edit” menu contains tools to edit the sound. It has: undo, redo; cut, copy, paste; delete, select all. Undo will undo the most recent action; redo will redo it if it was undone. Cut, copy, and paste work with Scratch's own sound clipboard; it does not copy to the system's clipboard, nor can it paste in external sounds. Delete deletes the selected sound fragment. Select all selects the entire soundtrack. Individual sections can be selected by dragging the mouse over them. " ~Scratch Wiki
https://wiki.scratch.mit.edu/wiki/Sound_Editor
asivi
Scratcher
1000+ posts

Help with Music Looping

bootsowen wrote:

Hi, I'm making a game on scratch but I'm having some difficulties.

I use Audacity to edit the music I have, and I edited a theme to loop on the title screen. In Audacity, it loops perfectly. But in Scratch, there's a very small delay at the end of each loop and it doesn't sound like a loop anymore because you can tell when the loop ends. Is there a way to fix this?

Here's what I have:

when green flag clicked
repeat until <[Game Start] = [true]>

play sound [Music Loop v] until done
end
when green flag clicked
repeat until <[Game Start] = [true]>

play sound [Music Loop v]
wait () secs // here put the length of music in seconds minus a bit
end
Levo-Films
Scratcher
100+ posts

Help with Music Looping

If it is not that, scratch 2.0 is known to not be great about sounds.
Hoglommonom
Scratcher
7 posts

Help with Music Looping

To actually stop the music ends you could do:
when green flag clicked
forever

play sound [ v] until done
end
when green flag clicked
forever

if <(game_end) = [end]> then

stop all sounds
end

end

What it does is it plays the music but when the game_end var. = end, it stops the msuci.

Last edited by Hoglommonom (May 22, 2016 20:24:19)

bootsowen
Scratcher
64 posts

Help with Music Looping

asivi wrote:

bootsowen wrote:

Hi, I'm making a game on scratch but I'm having some difficulties.

I use Audacity to edit the music I have, and I edited a theme to loop on the title screen. In Audacity, it loops perfectly. But in Scratch, there's a very small delay at the end of each loop and it doesn't sound like a loop anymore because you can tell when the loop ends. Is there a way to fix this?

Here's what I have:

when green flag clicked
repeat until <[Game Start] = [true]>

play sound [Music Loop v] until done
end
when green flag clicked
repeat until <[Game Start] = [true]>

play sound [Music Loop v]
wait () secs // here put the length of music in seconds minus a bit
end

Thank you, I tried this before, I guess I didn't minus the seconds waited enough.
PaddlerGames
Scratcher
1000+ posts

Help with Music Looping

The question that bootsowen asked for was already answered, so I will just ask a Scratch Team member to close it. If you (bootsowen) wants to unclose it, report this topic.

Powered by DjangoBB