Discuss Scratch

Swiftpixel
Scratcher
54 posts

Switch from different versions of a song

I have two versions of a song, a normal and a muffled version. When I open a menu in my project, I want to switch from the normal sound to the muffled sound, with the other in the background so that it plays from where the first one stopped. Anyone know how I can do this?

Last edited by Swiftpixel (April 1, 2024 14:31:01)


Have you tried turning it on and off again?!
--CHA0S--
Scratcher
100+ posts

Switch from different versions of a song

do you have a project shared so I can see your code?

Hi

Trying to become a forum helper
toasty_mc_toastface
Scratcher
94 posts

Switch from different versions of a song

There's not really any way to perfectly do this, and i don't know much about music on scratch. One solution could be to split the song into sections so the program could change between the two sounds mid-song.

when green flag clicked
set [song type] to [normal]
set [song part] to [1]
forever
play sound (join [(song type)] [(songpart)]) until done
change [song part] by (1)
end

when I receive [change song type]
if <[song type] = [normal]> then
set [song type] to [muffled]
else
set [song type] to [normal]


end
Swiftpixel
Scratcher
54 posts

Switch from different versions of a song

--CHA0S-- wrote:

do you have a project shared so I can see your code?
Here https://scratch.mit.edu/projects/992912401/

It doesnt do switching from where it left off

Last edited by Swiftpixel (April 1, 2024 14:51:22)


Have you tried turning it on and off again?!
Swiftpixel
Scratcher
54 posts

Switch from different versions of a song

toasty_mc_toastface wrote:

There's not really any way to perfectly do this, and i don't know much about music on scratch. One solution could be to split the song into sections so the program could change between the two sounds mid-song.

when green flag clicked
set [song type] to [normal]
set [song part] to [1]
forever
play sound (join [(song type)] [(songpart)]) until done
change [song part] by (1)
end

when I receive [change song type]
if <[song type] = [normal]> then
set [song type] to [muffled]
else
set [song type] to [normal]


end
I would do that but the song will be at least 2 minutes long and I want it to be seamless

Have you tried turning it on and off again?!
toasty_mc_toastface
Scratcher
94 posts

Switch from different versions of a song

Sorry then, i cant think of any other ideas except changing the pitch of the song using the scratch blocks to make it sound more muffled
Code_Weegee
Scratcher
49 posts

Switch from different versions of a song

perhaps have both play from different sprites and just change the volume between 0 and 100 during the transition?

when I receive [New follow v]
change [Happy v] by (9999999999999999999999999)
currently working on an RPG! If you want to see it, it's right here ——-> https://scratch.mit.edu/projects/965643602/

Powered by DjangoBB