Announcement

Collapse
No announcement yet.

Why are sample rates 44100 and 22050 recommended?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Why are sample rates 44100 and 22050 recommended?

    The Audio File Import Documentation says:

    The engine currently supports importing uncompressed little endian 16 bit wave files at any sample rate (although sample rates of 44100 Hz or 22050 Hz are recommended).
    Why are those two rates specifically recommended? Really the question is why is 44100 recommended, as 22050 makes sense given 44100 (22050 is exactly half which means 2x upscaling a single frame would fit perfectly into one 44100 frame).

    Initially I thought that Windows used 44100 by default, but I checked my machine (after hitting restore defaults) and saw that it was actually 48000.

    Perhaps the recommendation is because 44100/22050 saves a bit of space (~8%) over 48000/24000 and the sample rate conversion artifacts are imperceptible?

    Anyway, just wondering if there was a deeper reason to this recommendation than I'm understanding.


    Click image for larger version

Name:	Speaker-Properties.PNG
Views:	1
Size:	14.7 KB
ID:	1567423

    #2
    The Engine will support any sample rate, but any sample rate mismatch between the source file and the user's device settings will require a real-time sample rate conversion (which is linear and can result in artifacts).

    My recommendation is to select your source sample rate deliberately.

    If you have a source sound which has no audible content above 12kHz, then it is a waste of space to store it as a 48kHz file. Know your Nyquist Theorem, always:
    https://en.wikipedia.org/wiki/Nyquis...mpling_theorem
    Dan Reynolds
    Technical Sound Designer || Unreal Audio Engine Dev Team

    Comment


      #3
      dan.reynolds Thanks for the quick response and information. Let me restate what you said to make sure I understand:
      1. There isn't something deeper to Epic's recommendation of 44100/22050. Anytime you play a sample rate different than the device settings, you could get artifacts. It doesn't matter if the sample rate is exactly half of the device sample rate since the conversion is linear.
      2. Choose the lowest sample rate possible (maintaining perceptible audio quality), and don't worry about sample rate conversion.
      Regarding the Nyquist theorem: I don't know how to use it to automate my selection of sample rate. The only way I know is to resample the audio, play and listen, and subjectively evaluate the result.

      The reason for this question is that I'm making a simple script to process audio I get from various sound effects websites so that I can easily import them into UE4, rather than opening Audacity and processing them one at a time like I was (IMO this is the biggest advantage workflow-wise that Wwise has over the new UE4 audio system). In addition to the container format/codec conversion (the only real requirement to get the audio into UE4), I also wanted to automate downmixing stereo to mono for spatialized sounds and also resampling from high sample rates (e.g., a lot of my source audio is 96000Hz) to Epic's recommended rates (hence this question). I had thought the 44100 recommendation may have been an outdated, historical artifact due to Windows previously defaulting to 44100... but as I'm only looking at my computer, I don't know how common 48000 actually is.

      IIRC, Minus_Kelvin mentioned in a video (can't remember which) that there were plans to make UE4 audio import to handle more formats, so this is just a stopgap measure until that is available. I'll share the script on github when I'm finished with it later today... or if something like this already exists, tell me now and I'll stop wasting my time

      Comment


        #4
        There is not something deeper to 44,100 Hz being standard at all. 44,100 Hz as a Sample Rate was set as CD standard (Red Book Audio) because of NTSC and PAL scanlines rates for audio encoding on Television signals.

        https://en.wikipedia.org/wiki/44,100_Hz

        It simply became a kind of defacto sample rate because of the proliferation of existing digital audio technologies.

        Ideally, your sample rate should be above 40kHz because of Nyquist-Shannon Sampling Theorem which relates frequency fidelity to sample rate.

        However, if your target device has a known sample rate, then you should take that into consideration to reduce artifacts from real-time linear resampling. So for example, if you KNOW that your target device's sample rate will be 48kHz, then by all means target that sample rate.

        If you need to save space, you can use a lower sample rate. Understanding Nyquist-Shannon Sampling Theorem will inform you about the consequences of sourcing lower sample rate content.
        Dan Reynolds
        Technical Sound Designer || Unreal Audio Engine Dev Team

        Comment


          #5
          The conversion scripts I mentioned before are here. I decided not to modify the sample rate on import as I believe it can be controlled during a cook with Sample Rate Quality.

          Comment

          Working...
          X