(Redirected from Sounds)
- This article is about the feature that allows one to play sounds. For other uses, see Sound (disambiguation).
A sound is an item which one hears that can be played in a Scratch project, available by importing, using Scratch's built-in sound library, or recording. Sounds are played by using the sound blocks, which control a sound's volume, tempo, and more. Sounds are limited to 10MB per asset.[1] All sounds in Scratch are played in mono.[2]
Warning: | Loud sounds (such as screams and certain genres of music) can hurt the viewer's ears or even cause deafness; especially if the volume is set too high or the user is using head/earphones. When using such sounds, it is always wise to add a warning in the Notes and Credits or lower the volume of the audio if possible. |
Sounds and Notes
All sounds played in a project are divided into two types: sounds and notes.
Sounds
Sounds are the items that are available only by importing or recording. These can be obtained in the "Sounds" tab, in which one can import, record, play, and edit sounds.
The following blocks control the playing of these sounds:
start sound ( v)
— Begins the sound and executes the rest of its script, without waiting for the sound to finish playing.play sound ( v) until done
— Plays a sound, waits for it to finish playing, and will carry on with its script.stop all sounds
— Cancels all sounds currently playing.set volume to ()%
— Sets a sprite's volume.change volume by ()
— Changes a sprite's volume by a given amount.
Notes
- Main article: MIDI Notes
play drum ( v) for () beats play note () for () beats set instrument to ( v)
The Music Extension allows one to play sounds from various instruments with MIDI. The following six blocks play notes:
play drum ( v) for () beats
— Plays the specified drum for a given amount of beats.rest for () beats
— Plays a rest for a given amount of beats.play note () for () beats
— Plays a given note from an instrument chosen in other blocks.set instrument to ( v)
— Sets the current instrument to one selected from a drop-down menu.set tempo to ()
— Sets a sprite's tempo (affects the "beat" speed).change tempo by ()
— Changes a sprite's tempo a given amount.tempo
— Contains the value of the tempo.
Accessibility of Sounds
Importing
To obtain these, one has to view the Sounds tab of a sprite/stage and select the Import button (which appears as a folder). The user will be able to import sounds from their desktop or varying locations, including a sound library that comes with Scratch.
Note: | When a surround sound audio file is converted to mono, the surround channels are removed. This is due to Scratch's limitations with sound. |
Recording
- Main article: Sound Editor
Sounds can be recorded, imported, edited, exported and modified in the Scratch 3.0 sound editor. It provides simple options to edit an existing sound for many benefits. For more advanced options not within Scratch's, an external sound editor can be used, but it is not recommended to record music from other websites because this will result in low-quality music with tons of background noise and quietness. The best way to do it is to import music.
Note: | When recording sound, it may be helpful to turn the volume up a little bit in the Sound Editor before recording. Turning up the volume will make it easier for Scratchers to hear the sound recorded when a project is launched. |
Uploading MP3 Bug
This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. |
This section has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites. |
Blank MP3 Bug (2.0)
With an update to Scratch 2.0, there was also a glitch that imported MP3 files would be blank. However, this glitch did not affect WAV files so some Scratchers resorted to audio converters or editors such as Audacity to convert their files.
Renaming Bug
After a fix was put upon this, another glitch occurred in which imported MP3 files were renamed "instance####".[3] This was fixed on January 20, 2015.[4]
Blank MP3 Bug (3.0)
After April Fools' Day 2023, there was a glitch that muted any sound that had been edited with the 3.0 sound editor. However, this bug has only been reported by some Scratchers.
Synchronizing Sounds and Actions
There is a slight delay the first time the Scratch player plays a sound. This delay will not be evident while working on the project, only when the page is reloaded entirely. The effect of this is that if one message triggers two scripts, one playing a sound and one animation, the animation script will start running before the sound starts. A very short pause using a Wait Block before the animating script will prevent this.
Sound Quality Issue
Upon the Scratch 2.0 update also came an issue many Scratchers experience when using the sound block to play music. To conserve space on the Scratch servers and prevent any copyright issues, the process of uploading requires that the sound be compressed to a single channel (mono).