+1 vote
by (1.4k points)

Hello all!

I am using SugarCube 2.21, and using the audio macro for looping:

<<audio "test" loop play>>

But each time the sound repeats it stops and starts again instead of playing seamlessly, which is pretty useless as I am using it for an ambient, background sound.

Is there something that will play looped audio seamlessly?

I checked that the stop is not in the sound itself: the same sound loops seamlessly in Audacity.

Thank you in advance!

1 Answer

0 votes
by (1.1k points)
<<audio "ambient" stop>>
<<audio "ambient" play>>
<<repeat 42s>>
<<audio "ambient" stop>>
<<audio "ambient" play>>
<</repeat>>

bit of a hack, I quickly put together a sort of ambient track and doing a repeat and replacing the seconds in "repeat" with the length of your track should get you a more seamless play.

 

There might be a cleaner way but I've no clue what it'd be.

by (1.4k points)
It cuts out the delay alright, but still makes a "twitch" sound when it repeats. It also stops repeating when you go to another passage.

Another option I am thinking of is having two ambient tracks which fade in and fade out, offset so they make more or less a continuous background. To offset them it would be good to have a time delay which does not cancel when the passage is left.
by (1.4k points)
Actually, I think it would be better to have the two ambient tracks somewhat different lengths, so that they align differently each time they repeat, and it would give the ambiance a much less repetitive and more natural sound. They would rarely go silent at the same time, and it would no doubt fit well enough in the natural flow when they do.
by (1.1k points)
Give it a go! For ambient noises I've no clue what else would be good, though if you give a gradually fading beginning and end of the clip it would at least not be a jarring stop
...