Sound
A sound, played from the start, on click or by script.
- Kind
- Layer · Sound and time
- Script name
sound- Cost to draw
- Light
- Draws
- Nothing: it plays a sound, so there's no picture of it
Sound
| Setting | Kind | Starts at | Range and notes |
|---|---|---|---|
Filesource | sound file | none | WAV, OGG, MP3 or FLAC |
Playstrigger | choice | From the start | From the start, On each click, When the script saysThe script plays any of them with scene.sound(name).play() |
Playingplaying | on or off | on | Keys and the timeline can switch it |
Looploop | on or off | on | – |
Volumevolume | number | 80% | 0% to 100% |
Left and rightpan | number | 0% | -100% to 100% |
Fade infadeIn | number | 0 s | 0 to 10 s |
Fade outfadeOut | number | 0 s | 0 to 10 s |
Start atoffset | number | 0 s | 0 to 600 s |
Speedrate | number | 1× | 0.25 to 4×Faster is higher pitched |
Mixer
| Setting | Kind | Starts at | Range and notes |
|---|---|---|---|
Busbus | words | effects | – |
Pan by its placeautoPan | on or off | off | Follows its place on screen |
Crossfadecrossfade | number | 0 s | 0 to 10 sWhen the file changes |
From a script
Every setting above can be changed by the scene's logic, by its key. Say the layer is called Sound:
scene.set("Sound", "volume", 1);scene.animate("Sound", "opacity", 0.5, 2);import { scene } from "motion";scene.set("Sound", "volume", 1);scene.animate("Sound", "opacity", 0.5, 2);◆On Scene Start
ƒSet Layer SettingTarget is Layer
TargetSound
Parameter Namevolume
Parameter Value1
Used in
The example scenes with a Sound layer in them. Each picture is the whole scene, not the layer alone: open one to see what the layer does in it.
What every layer has
Besides its own settings, every layer has its opacity, blend, placement, quick effects and an effects stack. They're listed once, on the layers page.
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.
Rain Harbour