Not sure my problem is ‘fixable’ but I’m currently building a text=based adventure game with a piece of software called Twine. The software allows you to use mp3 sound clips in your game, and has a ‘loop’ feature for when you want the sound playing continuously (such as one might with the sound of rain, wind or a crackling fire).
However, when the clip comes to an end, then starts the loop again, there’s a very noticeable ‘pop’ of silence between it ending and starting up.
I’ve tried a fade out on the end of the track, and I’ve also tried it with a fade out and fade in, but these methods only accentuate the split.
Is there anything I can do to eliminate or mask this transition noise?
There’s a similar problem with DVD splash page looping. "Welcome to the Doobly-Doo DVD, Welcome to the Doobly-Doo DVD, Welcome to the Doobly-Doo DVD.
It seems to perfectly and seamlessly loop between all those iterations—which is physically impossible. What you don’t know is the loops were produced as one single two minute video and in two minutes, you’re going to get a big lurch and pop as the DVD resets…but nobody ever hangs around that long. So you might try that. How long a track are you allowed to post in a single pass?
Never do production in MP3. MP3 has “magic” stop, start and delay times because of its heritage. It was originally part of a video format and depends on video to do all the timing. No video, ratty timing.
Do they allow you to use a different sound format?
Right, tried .wav and it was just as bad. I tried the Zero Crossings (didn’t really understand the tutorial) but highlighting the whole clip then choosing it from the menu made no apparent (visual) change to the clip. I then did the Offset thing.
None of these things made a difference.
Unfortunately I suspect there’s not a lot I can do, as what I’m hearing is the split-second of silence when the clip stops then begins its loop again.
I could make the clip longer, but the bigger the audio file size, the bigger the finished game file size. And in any case the problem will still there be as certain sounds are meant to run virtually the entire duration of the game, such as the wind, which is only told to stop when the player enters a building.
Thanks for your help, and feel free to not give up if you want
I understand seamless looping within Audacity is possible, but this is not the problem. The problem is that I’m using the clip with a text-based adventure creator program, and then using its loop command.
If it’s the way Twine (the adventure writing program) handles audio looping, then I’m not sure there’s a solution.
Thanks, Trebor. Not that I’m doubting this, but perhaps I’ve misled by saying I hear a ‘pop’. It was a bad choice of word, as what I’m really referring to is a split-second of silence at the point of loop end / loop start. It’s like there’s a split-second delay is starting the loop once it’s ended… which there probably is.
However, I shall try the silent track and report back.
[EDIT] Okay, tried it with a silent WAV track and there’s no noise at the loop.
That’s a limitation of the MP3 format. The MP3 format does not precisely define the start of the track, so there is always a little bit of silence at the start of an MP3.
If you ensure that your loop points occur during silence (such as the gap between words, or a gap between notes of an instrument) then you can hide this limitation, but if you need the audio to play continuously across the loop boundary, then you need to use a different format that does not have this limitation (such as Ogg or WAV).
This is the second time I’ve been told using WAV will fix the issue, and it’s the second time I’ve explained I’ve tried WAV and it made no difference.
I do like your idea of clipping the track during silence, although this is going to be tricky as the sound clip is an ambient ‘outside/wind’ noise, but at least I can try looking for a very quiet spot.
Can you not carefully select one loop from the WAV or MP3, Edit > Find Zero Crossings, Edit > Remove Special > Trim Audio, then Effect > Repeat… that? If it is stereo wind noise then you may have to manually select as close to a zero crossing in both channels as you can.
In actual fact, Gale Andrews, it’s the third time I’ve been told to try using WAV.
Both are correct. The silent track was an idea which was suggested to try and determine if the delay was a problem at the their end (their being a program I’m using called Twine which is a text adventure creator).
As is probably obvious, I’m familiar with only the basic functions of Aud. I was advised to try the zero crossing, but wasn’t sure how. When you say loop, do you mean a single peak in the timeline?
Okay, I think we can safely assume this is a problem I have no control over. Clearly the issue lies with Twine, in that there’s some kind of delay in their loop function, meaning there’s an unavoidable, split-second pop of silence between the loop ending and the loop starting.
OurJud, Edit > Find Zero Crossings trims a mono track so that both ends are at silence (zero amplitude). This isn’t usually a silence you can hear, just a sample point where the wave crosses between positive (above the horizontal line) and negative (below the horizontal line). You’d have to zoom in (look in the View Menu) to see what I mean. If you join or repeat at silences you should not usually get any clicks at the joins.
If you have a stereo track, the silent points may be at a different places in each channel, so you may have to zoom in and select a place at each end of the desired audio where both channels are almost silent (close to the horizontal line). Or, if the wind gets very loud or rattles something, you could select there because any click at the join would be masked by the loudness of the wind.
When you have made a selection, Trim removes everything outside the selection, leaving only that selection. After Trim, you should have a selection you can safely Effect > Repeat… as many times as necessary.
By “loop” I mean a section that is suitable and sounds good when repeated over and over by Effect > Repeat…, bearing in mind that the edges must be silence, near silence or loud enough to mask any clicks from joining. It does not have to be exactly the region that your app repeats over and over.
I don’t know how to make it any clearer what I suspect the problem is. I can do seamless looping in Audacity, no problem, but the problem is when I use the track as part of a third-party program (in this case Twine - a text adventure writing program).
In Twine I tell the game to play the sound with: <<audio “out_side” play>>. This script will play the track from beginning to end, then stop.
If I want to loop that sound so that I have a constant ‘ambient’ outside noise, I’d use: <<audio “out_side” loop play>>. This will play the track from beginning to end, then start/loop it again.
If this loop function within Twine isn’t very good, and has any delay between the track ending and starting again, then I will here a ‘pop’ of silence that I have no control over.
This is what I suspect is the problem, but I just needed to check with Aud users that the fault wasn’t because of the way I was butchering the trims etc.
I don’t know if there are other applications than Twine that you could use.
Can it use two files for the wind noise and mix them together? You would have to have each file about half as loud as now, but if the files were of different lengths then when one file came to loop, the other file would be mid loop and so you would not get silence, just a halving of the wind loudness.
I did try this, Gale. You can have two tracks playing at once, and you can also control when they are triggered with a timer. So what I did what create a two second ‘filler’ clip from the same ‘outside’ file, and have it timed to play one second before the main one gets to the end and begins its next loop. This way the ‘filler’ clip masks the transition of the main track, and vice versa.
In theory this should have worked, but because the main track is scripted to loop in the game, I also had to script the ‘filler’ to loop too. The result was that because the filler is only two seconds long, it loops every two seconds once it’s been triggered the first time and gives a very obvious looplooplooplooploop effect.
Having said that, though, you may be right, and maybe the answer is, like you say, to create two tracks of the same file, one marginally shorter than the other, so that they mask one another’s loop transition.
[UPDATE] That’s about the best I’m going to get, and it’s not bad at all. I think the only reason I notice the slight dip in volume (as is goes to a single track for a second, at the point of the mask) is because I know it’s there.