Skip to content
DEV505 / Sound ManagerDOCUMENTATION

DEV505 / START HERE

Jukebox in pictures.

Unity screenshots of Jukebox, with scene states, sound graphs, and steps to try.

08 / A little groove. Play a record, change tracks, and pause. The demo starts a second music play for a transition and changes the two gains over time. The dancer’s speed comes from a BPM value stored for each track.

These are real Unity captures with the scene’s own models, camera, and controls. Select a picture to enlarge it, or open Try this in Unity below it for the steps. The graph close views explain individual parts of the full graph.

All screenshot galleries · Read how to change a play’s parameters

Read the complete Jukebox walkthrough for controls, graph flow, and code.

Mint Morning is playing

The first track is playing while DEV505 dances. The demo uses the track's stored BPM value to set the dance speed; it does not analyze the music in real time.
Jukebox in Unity: mint Morning is playing. The real scene controls and status readouts are visible.

The first track is playing while DEV505 dances. The demo uses the track's stored BPM value to set the dance speed; it does not analyze the music in real time.

Try this in Unity
  1. In Unity’s Project window, open Assets/DEV505/SoundManager/Samples/08-Jukebox/Demo.unity. Enter Play Mode and click the Game view so it receives your keyboard input.
  2. Press Play to start Mint Morning.
  3. Let the track begin while DEV505 starts dancing.

Two tracks during a transition

Peach Sunset is coming in while the previous track fades out. The two gain meters show both plays are active during the transition.
Jukebox in Unity: two tracks during a transition. The real scene controls and status readouts are visible.

Peach Sunset is coming in while the previous track fades out. The two gain meters show both plays are active during the transition.

Try this in Unity
  1. In Unity’s Project window, open Assets/DEV505/SoundManager/Samples/08-Jukebox/Demo.unity. Enter Play Mode and click the Game view so it receives your keyboard input.
  2. Press Play and let Mint Morning begin.
  3. Choose the next track. Capture about one second into the 2.5-second crossfade, while both gain meters are visible.

Take a musical pause

The transition has finished and playback is paused. The dancer pauses with the music.
Jukebox in Unity: take a musical pause. The real scene controls and status readouts are visible.

The transition has finished and playback is paused. The dancer pauses with the music.

Try this in Unity
  1. In Unity’s Project window, open Assets/DEV505/SoundManager/Samples/08-Jukebox/Demo.unity. Enter Play Mode and click the Game view so it receives your keyboard input.
  2. Press Play, then choose the next track.
  3. Wait for the transition to finish, then choose Pause.

A graph connects blocks called nodes to control a sound. The Inspector holds the event’s playback settings. The pictures below show the saved graph and settings; a full graph is an overview, so use the close views to read smaller fields.

The Jukebox graph

Track supplies the audio clip, Gain shapes the transition level, and Volume supplies the listener's chosen volume. Each track plays through its own instance of this graph.
Jukebox in Unity: the Jukebox graph. The graph nodes and their connections are visible.

Track supplies the audio clip, Gain shapes the transition level, and Volume supplies the listener's chosen volume. Each track plays through its own instance of this graph.

Try this in Unity
  1. Exit Play Mode.
  2. In Unity’s Project window, double-click Assets/DEV505/SoundManager/Samples/08-Jukebox/Jukebox.soundgraph.
  3. Use the mouse wheel to zoom and drag the graph background to bring the relevant nodes into view.
  4. Frame the entire graph for an overview. Use the close views on this page for small labels.

Choose an audio clip with Track

The Asset Parameter is named Track and defaults to Jukebox_MintMorning. It accepts only the clips listed in the event's allowed assets.
Jukebox in Unity: choose an audio clip with Track. The graph nodes and their connections are visible.

The Asset Parameter is named Track and defaults to Jukebox_MintMorning. It accepts only the clips listed in the event's allowed assets.

Try this in Unity
  1. Exit Play Mode.
  2. In Unity’s Project window, double-click Assets/DEV505/SoundManager/Samples/08-Jukebox/Jukebox.soundgraph.
  3. Use the mouse wheel to zoom and drag the graph background to bring the relevant nodes into view.
  4. Find the nodes described under “Choose an audio clip with Track” on this page and zoom in to read their fields and connections.

The three allowed tracks

Unity's Debug Inspector shows the imported Track parameter and its three allowed clips: Mint Morning, Peach Sunset, and Midnight Pixels. This is a read-only inspection of the compiled event; author changes in the graph.
Jukebox in Unity: the three allowed tracks. The saved event values are visible in the Inspector.

Unity's Debug Inspector shows the imported Track parameter and its three allowed clips: Mint Morning, Peach Sunset, and Midnight Pixels. This is a read-only inspection of the compiled event; author changes in the graph.

Try this in Unity
  1. Exit Play Mode.
  2. In Unity’s Project window, select Assets/DEV505/SoundManager/Samples/08-Jukebox/Jukebox.soundgraph.
  3. Open the Inspector’s three-dot menu and choose Debug. Scroll to Parameters, expand the entry named Track, then expand Allowed Assets.
  4. Read the three assigned clips, then leave Debug mode. Change allowed clips in the graph rather than editing this imported data.

Shape the fade, then apply volume

Gain is shaped by a sine function and multiplied by Volume before reaching Play Audio. The demo script drives the incoming and outgoing Gain values during a track change.
Jukebox in Unity: shape the fade, then apply volume. The graph nodes and their connections are visible.

Gain is shaped by a sine function and multiplied by Volume before reaching Play Audio. The demo script drives the incoming and outgoing Gain values during a track change.

Try this in Unity
  1. Exit Play Mode.
  2. In Unity’s Project window, double-click Assets/DEV505/SoundManager/Samples/08-Jukebox/Jukebox.soundgraph.
  3. Use the mouse wheel to zoom and drag the graph background to bring the relevant nodes into view.
  4. Find the nodes described under “Shape the fade, then apply volume” on this page and zoom in to read their fields and connections.
DEV505 / SOUND LABChecked with Unity 6000.6.0f1 · Revision 746a1cc