Discuss Scratch

Peashooter10000
Scratcher
13 posts

Sprite-Sound Interaction...from and to the project.

I'm trying to make a perfect sync game.
Sprites have to…
  • …detect when music gets louder or quieter.
  • …detect when music gets higher or lower.
  • …detect what music would play if it wasn't silent, when it's playing at 0% volume.
  • …ignore all sounds except for the one that it needs to listen to.
If you can pull it off, thanks.
Also, please tell me what the code is.
kriblo
Scratcher
100+ posts

Sprite-Sound Interaction...from and to the project.

Obviously, you can keep track of what sounds your code start and when they stop playing (“play until done” or using sound length). Thus, you can determine what sounds are playing at any given time. The same goes for pitch (“higher or lower”) and volume (“louder or quieter”).

But, I'm not sure what you mean by “detect”. You can “detect” microphone input level using the “loudness” reporter block. This, does not however allow you to analyse the sound in any way that might let you determine which song is playing with any accuracy.

Hope this helps.

@papipupepappa shared a project where he calculate the length of a song if the pitch effect is used: https://scratch.mit.edu/projects/525403966

I shared a project which use the microphone and the Loudness reporter to record the shifting volume of a sound/song: https://scratch.mit.edu/projects/760136864/
Peashooter10000
Scratcher
13 posts

Sprite-Sound Interaction...from and to the project.

The background changes with the pitch of the song (white=100%, black=0%)
A sprite grows/shrinks when volume changes (when it gets naturally louder) where 100% means not getting louder, and 200% when it experiences the maximum loudness change
I also need the player to click when the sprite (my GD ship) grows, regardless of the amount, so I need notes that go at the perfect time to do so
Sounds like clapping can't affect anything and the silent music for the notes to know when to be sent has to ignore the music you hear, and the pulsing has to ignore the music for the notes

Powered by DjangoBB