I wish to play a short sound in an app (60 Milliseconds is ideal), however I'm noticing glitches in the sound on the current clip I have made.

I'm wondering if these glitches have to do with any ambient noise and improper audio recording (by me). I.E.: audio with reverb is longer than the audio length (after cut).

So my question, Is it possible to record such a short sound and (after noise reduction) won't sound like a static glitchy mess?

I have a Zoom H4N, and am using a sample rate of 48000 Hz. I suppose if I lower my mic gain, I can try to eliminate some noise off the bat. Otherwise I'm not used to having to be this specific about recording audio, so any help is appreciated.

Just for a background on the sound I'm trying to record: Try picturing a short synthesized beep, except created through percussive means (ex: a clap, or a knock on wood, etc.). The more I think about it, I feel like the reverb of the short sound in the room might make this difficult.

Alternatively, would a MIDI sound be a better choice?

  • Hi Matthew and Welcome. A sample of the sound would help provide better answers, as we'd know what kind of distortion or artifacts you're referring to. Does it only sound distorted when played back through the phone's speaker/s?
    – n00dles
    Apr 6, 2019 at 5:37
  • @MarcW How can I share a raw file snippet? (I'm encoding it into Raw 16-bit PCM). Otherwise I can take the clip from my audacity project and share that somewhere. Audacity doesn't seem to like to play short (<100 ms) audio previews in the project, but when I play longer previews, I can hear the sound fine. Otherwise the distortion in question is coming from the android speakers, which I am also debugging to see if my program is at fault (I'm using low level C++ code to play audio, or more specifically the Oboe native library).
    – Matt Strom
    Apr 6, 2019 at 8:16
  • Curious, why are you encoding it in RAW PCM? That's a headerless format I think (i.e. no SR/Bit Depth info). Also, you need to check Audacity's setting for auto-fades if it won't play short audio snippets. Because there's no other reason I can think of why it wouldn't play it fine. Check that first. Then check if a WAV version will play in any media player after export.
    – n00dles
    Apr 6, 2019 at 19:16
  • I'm Currently using RAW PCM to output into a audio buffer on a phone app (that's the format google suggested). There is also a new option to use MP3 if I change some of my application. I might be having issues with Audacity since I'm on Linux, it might work better on windows. Otherwise I've tried using a fade at the end of the clip, and I think it sounds a bit better on some android devices. I also output a new sample to wav, and it does sound relatively fine, but I believe part of the issue may also be from my application code so I'll try some different things there as well
    – Matt Strom
    Apr 6, 2019 at 21:58
  • 1
    All of the feed back has been helpful by the way, thanks everyone!
    – Matt Strom
    Apr 6, 2019 at 22:00

2 Answers 2


You can use any sound you like and at the length you want, if you use an simple audio editor like Audacity, or a more advanced solution that can offer MIDI/synths, and additional tracks like Pro Tools.

I would first source the sounds either by recording them or using an instrument or synth that you can record into a digital audio workstation, then edit and fade them to the length that is most compatible.

When exporting the sounds, ensure that it is also compatible with the app or mobile OS by also matching the correct sample rate and Bit depth. You might benefit by converting it to MP3 to save disk space (Audacity or iTunes can do this).


You're probably experiencing the joys of a non-zero crossing at the edit points. Sure, you can record a sound and then shorten it in a DAW, as Joel has mentioned, but you do need to make sure you put a short fade in and fade out at the start and end of the sample.

If you do not, the DAC will have to deal with outputting sample values that will ensure that you have a very hard edge at the start and end of the sample which will result in a very nasty audible click at the start and end of playback.

To fix this you need to fade that sample in gradually and then fade out again. Doesn't have to be a long fade, just enough to get from a sample value of 0 to your audio level and then back again to zero once you have finished.

  • I will give this a try!
    – Matt Strom
    Apr 6, 2019 at 8:17
  • I +1'd because it's helpful and explanatory ;)
    – n00dles
    Apr 7, 2019 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.