These are some examples of how you can use the Patch Editor to add audio to your effects.
In this effect a sound will play once, when the screen is tapped. If the screen is tapped again, the audio clip will play again over the top of the sound that's still playing.
We've created a consumer patch for the Play property of a playback controller. We've connected this to the Tap port of a Screen Tap patch.
We've checked the box next to the Enabled port in the Screen Tap patch.
In this effect, we're using the Multi-Clip Controller and Single-Clip Controller patches to play the same audio clip in different ways, based on different interactions.
Because we've connected the Screen Tap patch and the Single-Clip Controller, the clip will play once when the screen is tapped. If the screen was tapped again while the sound was still playing, the clip would start from the beginning.
The Object Tap patch is connected to a Multi-Clip Controller. Every time the object is tapped, the clip will play. Unlike with the Single-Clip controller, if the sound was still playing when the object was tapped, the it won't stop and start from the beginning - a new clip will play over the top of the previous one.
Because we're using the Multi-Clip Controller and Single-Clip Controller, we don't have a playback controller patch in this graph. Our audio clip - which is represented by an orange asset patch - is connected to the Audio Player patch instead. It has still been assigned to the speaker.
In this effect we have 2 different audio clips - represented by the 2 orange asset patches. Both asset patches are connected to Audio Player patches, which are then both connected to consumer patches representing the Audio property of 2 speakers.
The Controller output port of a Single-Clip Controller is connected to the Controller input port of both Audio Player patches, so that when the screen is tapped, both audio clips play.