Inside Outside

In this example, a yarn is created to model a situation where a music track has different accoustics when the user is inside a building than when the user is outside that building.

Initially, two polygon-shaped scroops are created, one for each of the two versions of the music track. The two music tracks are of the same length, and one is simply an edited version of the other, emulating the indoors accoustics (the effect has been applied using some other audio software). Furthermore, the volume function of both polygon scroops is set to be constant while the user is inside the polygons and zero when outside. This way, when the user goes from being inside the outer polygon to being inside the inner polygon, the music changes as if the user moved from outside a building, to the inside of that building.

Finally, a scroop of circular shape is added, being the start scroop with no associated sound, whose function is primarily to sync the two sounds associated with the two versions of the music track.