Skip to content
DEV505 / Sound ManagerDOCUMENTATION

DEV505 / SOUND LAB / 06

A little work.

Switch tools, order actions, and overlap hammer taps.

This frame records a hammer impact while Handsaw remains selected and working. The tap button is briefly unavailable during the tap itself, then becomes available again.
Workshop in Unity: one hammer tap while sawing. The real scene controls and status readouts are visible.

This frame records a hammer impact while Handsaw remains selected and working. The tap button is briefly unavailable during the tap itself, then becomes available again.

In Unity’s Project window, open Assets/DEV505/SoundManager/Samples/06-Workshop/Demo.unity. The supplied scene already has its Sound Manager, event registrations, generated keys, camera, and Audio Listener. Press Play, wait for the demo to be ready, and click the Game view before using the keyboard. If you are setting up a separate scene, follow Your first sound first.

Control Action
1 / 2 / 3 Select Hammer / Handsaw / Drill.
Space / work button Work or take a break.
T / One hammer tap Add a manual hammer tap when available.
Work pace slider Change the working pace.

Choose Handsaw and start working. Listen to the loop, then press T: a short hammer impact sounds over it. Switch to Drill while working; the previous tool stops before the new one starts. Take a break to stop the tool voices. Select Hammer and work again to hear the automatic strikes at the animation’s contact frames.

The listener is fixed in the scene. The main tool sound follows the workstation’s sound position; manual taps during another tool use a separate hammer sound origin so the impact tail remains in the right place.

Hammer is selected and the work session is active. The demo sends Strike signals at the chosen pace.
Workshop in Unity: working with the hammer. The real scene controls and status readouts are visible.

Hammer is selected and the work session is active. The demo sends Strike signals at the chosen pace.

Handsaw is now selected. The Work signal stops the previous tool loop and starts the selected one.
Workshop in Unity: switch to the handsaw. The real scene controls and status readouts are visible.

Handsaw is now selected. The Work signal stops the previous tool loop and starts the selected one.

Drill is selected during the same work session. Work Pace controls how quickly the tool operates.
Workshop in Unity: switch to the drill. The real scene controls and status readouts are visible.

Drill is selected during the same work session. Work Pace controls how quickly the tool operates.

The upper groups handle tool selection and ongoing work. The lower group handles individual hammer strikes from trimmed variations.
Workshop in Unity: the complete Workshop graph. The graph nodes and their connections are visible.

The upper groups handle tool selection and ongoing work. The lower group handles individual hammer strikes from trimmed variations.

Sounds.Workshop starts as a silent, waiting play. Keep Alive lets it remain available even with no voice playing. Tool is an Int: 0 = Hammer, 1 = Handsaw, 2 = Drill. Pace is a smoothed Float between 0 and 1.

Signal What the graph does
Work Stops the main play’s old tool voices, chooses Tool, starts the chosen loop if needed, and plays a latch click.
Pause Stops its tool voices but leaves the Keep Alive play waiting.
Strike Plays a short hammer impact.
Work enters Sequence. Its outputs run in order: stop the old tool loops, then use Tool to start the selected branch. Sequence does not wait for a sound to finish; it orders these commands.
Workshop in Unity: stop first, then choose the tool. The graph nodes and their connections are visible.

Work enters Sequence. Its outputs run in order: stop the old tool loops, then use Tool to start the selected branch. Sequence does not wait for a sound to finish; it orders these commands.

The Work signal enters a Sequence. Its outputs execute in numbered order during the same graph execution:

  1. Out 0: send Stop to the saw, drill, and hammer playback nodes in this play.
  2. Out 1: branch on Tool. Handsaw or Drill starts its loop; Hammer waits for Strike.
  3. Out 2: play the latch click.

A Sequence does not wait for each recording or fade to finish. It makes the commands happen in order. Use a recording’s Finished output or an explicit Delay when elapsed time matters. This is why the latch can overlap the selected tool even though it is the last command.

Strike chooses a short hammer variation and sends it to its own Play Audio node. This path allows a hammer tap to overlap the saw or drill.
Workshop in Unity: a separate Strike path. The graph nodes and their connections are visible.

Strike chooses a short hammer variation and sends it to its own Play Audio node. This path allows a hammer tap to overlap the saw or drill.

The demo retains a main Workshop handle. When a manual hammer tap is requested over the saw or drill, it also creates or reuses a second Workshop handle with Tool set to Hammer. Strike goes to that second handle. Both share the demo’s owner for cleanup, but each has its own graph state and sound origin. The event allows two overlapping plays for this reason.

While Hammer is the active working tool, animation contact already sends automatic Strike signals. The manual tap button is disabled during that automatic hammer work or while a tap animation is already happening. It is available while the handsaw or drill works; the extra tap should not stop that loop.

Set the selection before sending Work:

Choose the main tool · excerpt
SoundBus.SetParameter(session, SoundParameters.Workshop.Tool, SoundValue.Int(1));
SoundBus.SendSignal(session, "Work");

Here session is the accepted main Workshop handle. For a hammer tap over that handsaw, send "Strike" to the separate tap handle. The complete recipe creates both handles, supplies initial parameters, and stops both through their owner on disable.

Take a break · excerpt
SoundBus.SendSignal(session, "Pause");
SoundBus.SendSignal(taps, "Pause");

This graph signal named Pause is different from SoundBus.SetPaused: it stops the tool voices and keeps the graph ready for another command. API pause would suspend playback and graph time for later continuation.

The graph chooses voices and orders their commands. The sample controller chooses tools, animates them, computes the working rhythm, sends Strike at contact, and enables/disables the buttons. Pace affects both graph sound controls and the controller’s animation timing. The complete recipe has no automatic hammer animation; you call Strike at your own contact frame.

  • Selecting Hammer produces no repeated hits. Work selects it; Strike produces an impact. The full demo’s animation supplies repeated contact signals.
  • A tool switch cuts a hammer tail. Work stops the main play’s existing hammer node. Use the separate tap play when overlap is required.
  • Sequence seems instantaneous. It orders commands, not clip durations.
  • The break leaves a live handle. Keep Alive is intentional; cleanup must still stop that handle when the interaction is disabled.

These are the saved graph settings. A play can supply different initial parameter values. Float smoothing is measured in units per second; a rate of 0 applies changes immediately.

Sounds.Workshop

Position
3D · 3–16 units (minimum–maximum distance)
Overlapping plays
2 · ReplaceOldest
Cooldown
None
Owner loss
Stop
Keep Alive
On — can wait silently for signals
ParameterTypeDefaultRangeRise / fall rate
ToolInt00–2Not smoothed
PaceFloat0.50–11.5 / 2
SignalResponse in this graph
WorkStop the old tool voices, select Tool, and start its work path.
PauseStop tool voices and keep this silent session available.
StrikePlay a short hammer impact.

For the meaning of these settings, see Playback settings. The default numbers above come from the Unity graph audit stored with this documentation.

Open the complete integration recipe for the script, Inspector setup, a short test, and cleanup. Use Play context for initial values and placement, and SoundBus for playback controls.

All Workshop Unity captures includes further states and readable graph details, with steps to reproduce each view.