In this example, we will demonstrate how to implement an effect using a sound effect. The sound will continuously play in the background.

At the end of this post, there is an example folder with DeepAR studio file that contains all assets mentioned here.

Sounds example

  • Open the DeepAR Studio

  • Create new effect via File → Create new effect

  • Now, add new quad Node → Add quad

  • Select quad under Root

  • In Node properties uncheck its Enabled

  • Next, go to Sounds tab

  • Click the Add button to import the busy_road_003.wav sound file from the sound_example folder (you can import .mp3 or .wav file)

Now, open the Animation State Editor.

  • Go to Assets → Animations state editor

  • Click Add state to create a new state, name it as desired or leave the name New State

  • Select the New State, assign the busy_road_003.wav sound to the state, make sure the Loop checkmark is selected

  • Next, select the idle state and click Add trigger to add a new trigger

  • Select the new trigger and set the Name to uncond and Next state to New State (or the name you chose)

  • Click Update model

The selected sound will now continuously loop. To create an effect that plays a sound on one of the animations triggers simply use the desired trigger and create an exit trigger from New State back to idle, eg. mouth_open, mouth_closed.

Download this example with all assets

Did this answer your question?