bleeps at start or end of exported wav files

Hi everyone,

I am noticing something I cannot seem to work around regarding 16 bit WAV files at around 20k hz. Here is my situation:

I am taking two WAV files and editing them so that they seamlessly flow together and repeat, but remaining separate tracks. I make sure to start end each track on the zero line, and fade in and out the last 0.02 seconds for a small but not noticeable transition.

When I play the two tracks I can hear a little soft blip at the end of one of them. I made sure that I cut off the track at the zero line and even gave it silence for a couple ms. When exporting it, and using both sounds in a phone app i am making, i can definitely hear blips at the start and end of the files. They’re louder than the sound itself, and it is like a tearing or a blip.

I have tried this on audacity 2.0 and 1.2.6 but right now do not even know if there is a way to make sure they do not blip. Does anyone have any suggestions?

Both files, despite intended to be played as a continuous seamless piece, must remain two files.

Thank you!

You appear to be doing everything right so this is a bit of a mystery.
Would it be possible for you to post an example of this behaviour?
WAV files less that 1 MB may be uploaded directly to the forum (see “Upload attachment” below the message composing box). For larger files please upload somewere on the Internet (such as a free file sharing site e.g. sendspace.com) and post a link.

I will be happy to, but they’re at my work. I will post them by 9.30 am PST Wednesday. They are around 40kb or less as well.

How are you playing back those two separate files?

I know from experience that if I burn wav files to CDR, then there is a seamless transition between tracks where there is continuity. But if I play them via a PC player like VLC Player, then there will be a momentary “burp” between tracks.

mdubin

I think it actually has something to do with my coding, instead of the files now. When I give each wav file a 0.02 second fade in and fade out, it plays without any blips in Audacity. I was giving them initially 0.002 seconds of fade in and fade out, and even with Audacity I was hearing some hard blip at the end, as if it wasn’t read all the way.

You can hear that in the D22.wav I have uploaded here, just at the end.

Using c#, I am playing this file as a constant loop with a Soundeffect instance, for when a person presses down on a button. While the button is held, the file will continually loop. When the user releases the button, the second wav file (not included) will play once, to give this note the reverb/completeness.

The bleeps I am experiencing happen as a result of the program instantly trying to play the first file (often creating an initial sound disturbance… is this a buffer issue?) and when the user releases the button (for whatever reason it cuts off the first file immediately, so it doesn’t complete the final iteration to the end). Since there’s a good shot these abrupt starting/endings don’t hash at the zero line, that’s where I’m getting some distortion.

So I may have at least figured out that it is not the sound file itself (although giving it more fade in and out time did help with the file itself not bleeping at the end.)

Hardware/buffer/playback software could be a contributing factor, but putting that to one side for a moment.


Here I have made 2 copies (3 clips in all) from the file that you posted. They are placed end to end and then “joined” into one audio clip (click on the line between to adjacent clips to remove the “split” line and join them).

Switching to the Spectrum vies (click on the name of the track and select “Spectrogram” from the drop down menu).
firsttrack002.png
The horizontal white line at around 600 Hz is the main tone that you hear.
The horizontal red/pink lines above that are harmonics of that tone.
The interesting thing for us is the two vertical lines. Even though the audio clips appear to be smoothly joined there is a clearly visible discontinuity in the spectrum.

Switching back to the normal Wave view, undoing the “joins” and zooming in really close on where the audio clips meet we can see a slight “wiggle” in the waveform. It is this “wiggle” that you can hear.
firsttrack003.png
Ironically the very short fade-out/fade-in has made the join less smooth that it might have been without it.
Here I’ve trimmed a little off the ends of the audio clip so that the start and end are at zero crossing points without any fade.
Here you can see that the waveform matches almost exactly.
firsttrack004.png
Switching to the Spectrogram and joining the “splits” (so that the spectrogram treats the audio as continuous), the vertical lines have virtually disappeared and the track plays quite smoothly.
firsttrack005.png
As to whether or not this will loop smoothly in your application you will need to test, but if you load the sample into Audacity and press Shift+Play (loop play) then it loops pretty well.

Definitely thinking the hardware/buffer/playback is screwing it up now. I am considering just finding a c# audio engine and creating sound from it instead of relying on clips.

The sound file you altered did however sound phenomenally better as a loop. I don’t hear it oscillate as much, which is one great thing. Any blips I hear now stem from the stopping/starting of the next button press after this finishes.

I’ll keep hammering away, but this is also a technique I didn’t know about in Audacity. Thank you.