You can easily add sound to your effect using an asset called an audio playback controller, and an object called a speaker.
Once an audio clip is applied to an audio playback controller, and the audio playback controller is applied to a speaker, sound will be rendered in your scene.
Spark AR Studio supportss mono M4A files. Use files with a 44.1kHz sample rate and 16-bit-depth resolution, to make the size of the effect as small as possible but keep the quality. You can do this through a DAW or a program like iTunes.
Audio clips should be prepped. If you're converting ambient or music beds from stereo tracks to mono, convert to summed mono rather than dropping one of the tracks - to avoid losing elements of the audio file. Convert files to the lowest kbps possible, while testing clips through the device. We don't recommend going lower than 64kbps when converting to m4as.
You can choose from range of free audio clips in the AR Library.
First, import your audio clip into the Assets panel:
Next, create an audio playback controller in the Assets panel:
When an audio playback controller is selected in the Scene panel, you'll see its properties in the Inspector.
To make your audio clip play continuously, select the audio playback controller. In the Inspector:
To make the sound play continuously, check the box next to Loop.
Insert a speaker by clicking Add Object, and selecting Speaker.
Then, in the Inspector:
You'll now have a continuous looping sound in your effect.
Apply an audio clip to the playback controller.
Clicking the circle next to Play will create a patch in the Patch Editor. The patch can be used to play your audio clip based on a specific instruction.
Checking the box next to Loop will play the audio clip assigned to the playback controller continuously as soon as your effect is opened, without creating a patch.
Clicking the arrow next to Loop will create a patch in the Patch Editor. Your audio clip will loop continuously, based on a specific instruction.
Clicking the arrow next to Reset will create a patch in the Patch Editor. The patch can be used to reset your audio clip in response to a specific instruction
If you uncheck this box, the speaker will be hidden from the scene.
Add an audio clip from your computer, select a playback controller from the Assets panel or select the Microphone.
Adjust the volume level of the sound in the scene.
Edit the position of the audio source in your scene.
Choose the camera or cameras on a mobile device in which the audio should play.
It's best to test effects on a device throughout the creation process, using the Spark AR Player app.
When testing, check: