Describe the length of Play sound and the idle easing rows
- Sounds: Play sound hands out length, and a point says how to span the whole sound with it and why a pitch change does not end there. - Behaviors and Sounds: as on a key, Direction and Curve only show where they matter, on the node and in the inspector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent
0598820af7
commit
ab24363f72
2 files changed
+11
-3
No files matched your search
+2
-1
@@ -226,7 +226,8 @@ the inspector).
|
||||
*Easing* and *Direction* bend the way with exactly the choice an
|
||||
[animation key](Animations) has: *Linear*, *Step* (stays at a until t is 1), the ten curves from
|
||||
*Sine* to *Bounce* with *In*, *Out* or *In-out*, or *Curve*, which follows the
|
||||
[curve asset](Curves) picked in the *Curve* row. *Back*, *Elastic* and a curve may overshoot b;
|
||||
[curve asset](Curves) picked in the *Curve* row. As on a key, *Direction* only shows for one of
|
||||
the ten curves and the *Curve* row only for *Curve*, on the node and in the inspector. *Back*, *Elastic* and a curve may overshoot b;
|
||||
a Curve with none picked, or once it is gone, runs linear and says so on the node —
|
||||
one node where a slide or a flight used to take a Subtract, a Multiply and an Add per axis),
|
||||
`Floor/Ceil/Round`, `Modulo`, `Random`, `Time`, `To text`, `To number`, `Join text`,
|
||||
|
||||
+9
-2
@@ -36,7 +36,7 @@ so what the inspector plays is what the graph will play.
|
||||
|
||||
| Node | What it does |
|
||||
| --- | --- |
|
||||
| **Play sound** | Starts the sound named by its `sound` input. `volume` **multiplies** the asset's own volume (1 leaves it alone), `loop` is a choice of three (*From the asset*, *On*, *Off*), `detached` says the voice belongs to nobody, `fx` names a [sound FX](#sound-fx) to play it through, and `fx params` takes values for that FX's [parameters](#parameters). Its output `voice` is the number of this one play, for changing it [while it plays](#changing-a-playing-sound); 0 where nothing was played. |
|
||||
| **Play sound** | Starts the sound named by its `sound` input. `volume` **multiplies** the asset's own volume (1 leaves it alone), `loop` is a choice of three (*From the asset*, *On*, *Off*), `detached` says the voice belongs to nobody, `fx` names a [sound FX](#sound-fx) to play it through, and `fx params` takes values for that FX's [parameters](#parameters). Its output `voice` is the number of this one play, for changing it [while it plays](#changing-a-playing-sound), and `length` how many seconds one run of the sound lasts; both 0 where nothing was played. |
|
||||
| **Stop sound** | Silences every voice of the sound it names, however many plays started it — a loop included. Naming no sound silences everything the run is playing. |
|
||||
| **Set sound FX parameters** | Hands new values to the [parameters](#changing-a-playing-sound) of one voice that is already playing, by the `voice` number its `Play sound` gave out, at once or over `time` seconds. |
|
||||
| **Sound** | A constant sound, for either of the two to work on through an edge. |
|
||||
@@ -178,7 +178,8 @@ speed, or a loop that gets quieter.
|
||||
dB, a band and a Mix in what they hold. It runs on the clock of the sound itself, not on the
|
||||
game's, so a sweep sounds the same every time, also the first.
|
||||
- **Easing** and **Direction** say how the values get there, with the same choice an
|
||||
[animation key](Animations) and a `Lerp` have. *Linear* (the default) runs evenly, *Step* holds
|
||||
[animation key](Animations) and a `Lerp` have, and like there *Direction* and *Curve* only show
|
||||
where they matter. *Linear* (the default) runs evenly, *Step* holds
|
||||
the old value for the whole `time` and then jumps, the ten curves from *Sine* to *Bounce* and a
|
||||
drawn [Curve](Curves) bend the way. Linear and Step are ramps of the audio clock itself, every
|
||||
other easing is handed to it as a curve of 200 samples a second (`setValueCurveAtTime`). *Back*,
|
||||
@@ -187,6 +188,12 @@ speed, or a loop that gets quieter.
|
||||
right after `Play sound`: `On enable` → `Play sound` → `Set sound FX parameters` (`voice` from
|
||||
`Play sound`, `pitch` -64, `time` 1.28) falls by 50 semitones a second. Counting a value down
|
||||
in `On update` or `On fixed update` instead runs on game time, and the sound drifts away from it.
|
||||
- **To span the whole sound**, wire `length` of `Play sound` into `time`: a fade or a filter sweep
|
||||
then ends with the last sample. `length` is one run of the sound (one pass of a loop), the same
|
||||
with a pitch it starts on. It is 0 while the sound has not loaded yet, which only happens right
|
||||
after a project is opened, and `time` 0 is the quick glide. A pitch changed over `length` does
|
||||
not end with the sound: a lower pitch plays slower (see the next point), so the rest of the sound
|
||||
is heard at the target pitch, and a higher one ends before it gets there.
|
||||
- A new change starts from where the voice is right now; whatever was still under way is dropped.
|
||||
- **A pitch changes by speed here.** A pitched copy cannot be worked out again in the middle of a
|
||||
sound, so the voice plays faster or slower to reach the new pitch: it gets that much shorter or
|
||||
|
||||
Reference in new issue
Block a user