Discuss Scratch

FaR52
Scratcher
2 posts

Attempting to change audio pitch

Question: Is there a block you can use to create a change in pitch? I'm trying to create a custom sound that can have dynamic pitch.
Bonus points if there's any way to change other variables inside scratch without changing the custom sound itself, like changing the speed at which it plays.
Mattx8y
Scratcher
43 posts

Attempting to change audio pitch

Dear FaR52,

There is no known block that can change the pitch of a sound. You can easily make your own sounds with custom pitches using the note blocks.
Here is an example:
playnote48for0.5beatsplaynote49for0.5beatsplaynote50for0.5beatsplaynote51for0.5beatsplaynote52for0.5beatsplaynote53for0.5beatsplaynote54for0.5beatsplaynote55for0.5beatsplaynote56for0.5beatsplaynote57for0.5beatsplaynote58for0.5beatsplaynote59for0.5beatsplaynote60for0.5beatsplaynote61for0.5beatsplaynote62for0.5beatsplaynote63for0.5beatsplaynote64for0.5beatsplaynote65for0.5beatsplaynote66for0.5beatsplaynote67for0.5beatsplaynote68for0.5beatsplaynote69for0.5beatsplaynote70for0.5beatsplaynote71for0.5beatsplaynote72for0.5beats
This would play every note for 0.5 beats
There are also two variables that contribute to the sound:
volumeThe volume the sound is played attempoThe speed of the sound
See Instruments & Notes for more details

Last edited by Mattx8y (Dec. 11, 2017 01:39:20)

FaR52
Scratcher
2 posts

Attempting to change audio pitch

*insert sigh here*
I'm trying to play a custom MP3, not a regular set of
playnotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beats
Instead, I'm looking to play a mp3.
asivi
Scratcher
1000+ posts

Attempting to change audio pitch

You cannot, in the next Scratch generation(Scratch 3) it will be included probably.
epicRedHot
Scratcher
500+ posts

Attempting to change audio pitch

FaR52 wrote:

*insert sigh here*
I'm trying to play a custom MP3, not a regular set of
playnotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beatsplaynotenumberfor0.5beats
Instead, I'm looking to play a mp3.
It's just not possible, sadly. You'll either have to wait for 3.0, or add multiple copies of the sound and manually change their pitch in some other program.

Powered by DjangoBB