-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Set instrument" to one of the sprite's sounds? #11
Comments
Another option for this would be to have a second "set instrument" block, with a menu that lists the sounds in the sprite. So by default for the cat sprite it would say "set instrument to [meow]". You could drop a reporter onto that menu to select sounds by index (as in the play sound block). |
In the scratch vm we now have the |
I'm partially agreeing with chooper100, but - setting the instrument to a sound really does encourage using sounds as audio samples; it almost seems a bit like a "hack" to need to use a mapping of notes to pitches. So, no, it doesn't add any flexibility, but I'm wondering if the amount of simplicity it'd mean to implement this (on the user end, of course) counters that enough.. |
Also, I could imagine a lot of younger scratchers getting confused over why their sounds are turning up in the instruments block |
Thanks for the comments on this idea. It's a good observation that the effect of playing a sound as an instrument would be similar to using the pitch effect block. There are some differences though. One is that sounds played with the play note block can be polyphonic: you can have multiple copies of the sound playing simultaneously, and at different pitches (using play sound and pitch effect, this would require using multiple sprites or clones). So you could play a major chord with a meow as easily as with a piano. Another difference is that the play note block lets you pick a duration (which would make a longer sound stop early), so you can make melodies with rhythms that work with other play note and play drum blocks. For reference, changing the pitch effect by 10 causes a change of 1 semitone. So, for example, to change the pitch by an octave, or 12 semitones, you would set the pitch effect to 120. |
how about just adding blocks to start/stop sounds at inputted times. As well as reporters for the current time. To try it, load it in turbowarp as a unsandboxed custom extension. This is entirely possible in scratch with some audio engine tweaks |
In addition to the built-in instruments (such as piano, flute, etc), the "set instrument" block could allow you to choose one of the sounds in the sprite. Then, the "play note" block would play this sound at different pitches by changing its playback rate. "Play note 60" (middle C) would play the sound unchanged, "play note 61" would shift it up a semitone, etc. The duration set by the "play note" block would stop the sound if necessary, with a short fade out to prevent clicks. So, for example, you could record your dog barking, and make it bark a melody, like happy birthday.
Early experiments with this idea are promising. Seems like fun.
One concern is that the pitch of the sounds produced in this way will depend on the pitch of the recorded sound, which could be confusing, especially if you are trying to use multiple sounds together, or in combination with the built in instruments.
Design questions:
The text was updated successfully, but these errors were encountered: