1. Help Center
  2. Tutorials
  3. Workshop Training Tutorials

Workshop Tutorial 2 - Add Ambience

Add some sound to the scene to bring it alive.

Training Notes

In this article, we will work with catalogs and media.  As an overview, please review these two resources:

Quick Links

Step 1: Create an "Ambience" Script

Step 2: Add Scene Objects

Step 3: Add Background Sound

Step 4: Adjust Volume of Background Sound

Step 5: Add Music Coming from the Speaker

In the Headset

Key Takeaways

 

One of the most important aspects of an impactful VR experience is well-used sound. In this tutorial, we will add some office background noise as well as some localized sound to the speaker in the office.

To keep all the music organized in our scenario, we are going to create and use an "Ambience Script".

Step 1: Create an "Ambience" Script

  • Click on the Script icon.
  • Click on your script catalog.
  • Click on "Add New Script".
  • Name the script "Ambience".
  • Click on the checkmark to save the script.
  • Close the edit section by clicking the x button.

2020-12-07_17-03-51 Video 6 Ambience
  • Click on the Ambience script to open it on your screen.
  • Collapse the script catalog by using the ">" icon.

Step 2: Add Scene Objects

If your users will be interacting with objects in the scene, you need to add those objects to the script. In this script, we are going to be adding some music playing on a speaker, so we need to add the speaker object to the script.

As usual, we will ensure we are in the correct script by looking to see it is the active script:

2021-01-13_10-47-05

  • Open the catalog drawer by clicking on the folder icon on the far right:

  • Open the "Workshop Objects" catalog.
  • Find the "Speaker" object and drag it into the first frame of the script:

2021-01-13_10-52-25 (1)

  • Rename the frame "Scene Objects".  
  • Click outside of the text box to save the changes.

2021-01-13_10-55-01

Step 3: Add Background Sound

  • Click the '+' on the main frame to create a new frame at the top level:

add new top level frame

  • Open the Media Catalog by clicking on the media icon on the far right:

  • Click on "Workshop Music". In this area, you can preview the audio files by clicking on the play button. 
  • Select one of the music types and drag it into the new frame. 
2020-12-07_17-28-53 Add music

If the video is too small,  mouse over the bottom right and click the fullscreen icon after you hit play. 

Screen Shot 2021-01-14 at 12.11.02 PM

  • Click on the ">" icon to collapse the music catalog.
  • We want this background noise to continue throughout the scenario, so check the "loop" option.
  • Select the "Ambient" track. This means that this sound is the lowest priority if there are several sounds playing at once.

2020-12-07_17-35-22 Ambience settings

  • Save the script.

Before you test you need to launch this "Ambience" script from the Director Script:

  • Open the Director Script.
  • Create a new top-level frame and name it "Ambience".
  • Drag the Ambience script from the script catalog into the frame.

      Note that the welcome message and the ambient music will start at the same time  - when you launch the experience. 

      Here is what it would look like:

      2021-01-13_11-09-56 (1)

      • STOP:  Save and test. Play the scenario now. You will notice that the background sound is playing. It is too loud. We will adjust this in the next step.

      Step 4: Adjust Volume of Background Sound

      In order to make the background sound quieter, use the "Volume" field on the audio resource in the frame. Volume is set from 0 to 1 with 0 being silent and 1 being maximum volume.

      • Open your Ambience script.
      • Open the "Background" Sound frame.
      • Adjust the volume until it seems right to you. In this tutorial we have set it to 0.1:

      2021-01-13_11-16-08

      Step 5: Add Music Coming from the Speaker

      We want the learner to hear the music coming directly from the speaker in the scene.

      • Create another new frame in the "Ambience" script and call it "Speaker Music":

      2020-12-07_18-14-20 speaker

      • Navigate back to the "Workplace Music" media catalog (click on the Media Items icon>click on "Workshop Music") and choose a song that you would like to be playing on the speaker on the floor. 
      • Drag and drop the music into the center of your screen.
      • Collapse the Media catalog by using the ">" icon.

      In order to make it sound like the music is coming from the speaker, we give the sound an anchor.

      • Chose "Speaker" from the anchor dropdown on the resource.
      • Loop the track so that it plays continuously.
      • Choose the "Ambient" track so that it has the lowest priority of sounds.

      2021-01-13_11-21-06

      • STOP:  Save and test. You should now hear the ambient background noise and the sound coming from the speaker on the workshop floor.  You might also want to adjust the volume once you've tested it.
      You will notice that you are now hearing two types of music.  Let's fix this.
      • In the Ambience script, click on the "Background Sound" frame.
      • Change the Volume to 0.
      • Save the script.
      2021-01-13_11-27-17 (1)
       
       
      While you are in the workshop you can move around the scene by clicking on the green arrows using the laser pointer. As you move around the workshop, notice that the volume changes based on your distance from the speaker. 
      arrows

      Challenge: instead of looping the speaker music, you could create a playlist that starts the next song when the previous one has finished playing. You could use subframes and object event conditions to play a new song when the last one finishes or "closes". Try to cue up a few songs using this pattern.

       The music files used in the tutorial are from Bensound: https://www.bensound.com/. They are free to use for non-commercial purposes when attribution is given. If you would like to use any of the music in a commercial setting, you can license the music on the above website. 

       In the Headset

      This is what your scenario will look like so far:

       

      Training Notes

      Key Takeaways from Tutorial 2

      • If users will be interacting with objects in the scene, you need to add those objects to a script via the Catalog.
      • Always test audio files to ensure optimal sound levels. 
      • Any audio on Ambient Track will have the lowest priority if there are several sounds playing at once.
      • When you anchor sounds to an object the sound will change based on your location in the scene.
      • Within the VR scene, use the green arrows to move around.

       

      Next Up:  Workshop Tutorial 3 - Add a Video to the Scene