Modifications

Sauter à la navigation Sauter à la recherche
1 695 octets ajoutés ,  2 janvier 2016 à 13:49
Ligne 20 : Ligne 20 :     
We suggest sticking with 16 bits, but reducing the sample rate to 22KHz unless you are piping the audio into a quality stereo system or expect users to have fancy headphones plugged in. If you're doing 'voice' type effects, you may be able to go down to 11KHz. Every time you reduce the sample rate, you can double or triple the length of audio.
 
We suggest sticking with 16 bits, but reducing the sample rate to 22KHz unless you are piping the audio into a quality stereo system or expect users to have fancy headphones plugged in. If you're doing 'voice' type effects, you may be able to go down to 11KHz. Every time you reduce the sample rate, you can double or triple the length of audio.
 +
 +
== Quelques exemples ==
 +
=== Fichier WAV non compressé ===
 +
The absolute biggest files you can generate and play are CD quality uncompressed stereo WAV files, at 44.KHz/16 bit.
 +
 +
* '''Stereo WAV 44.1 KHz 16 Bit''' - (2 bytes * 2 channels * 44100) = ~175 KB per second, so 2MB can hold 12 seconds, 16MB can hold 90 seconds
 +
* '''Mono WAV 44.1 KHz 16 Bit''' - (2 bytes * 1 channels * 44100) = ~88 KB per second, so 2MB can hold 23 seconds, 16MB can hold 180 seconds (3 minutes)
 +
* '''Stereo WAV 22 KHz 16 Bit''' - (2 bytes * 2 channels * 22050) = ~88 KB per second, so 2MB can hold 23 seconds, 16MB can hold 180 seconds (3 minutes)
 +
* '''Mono WAV 22 KHz 16 Bit''' - (2 bytes * 1 channels * 22050) = ~44 KB per second, so 2MB can hold 45 seconds, 16MB can hold 6 minutes
 +
* '''Stereo WAV 11 KHz 16 Bit''' - (2 bytes * 2 channels * 11025) = ~44 KB per second, so 2MB can hold 45 seconds, 16MB can hold 6 minutes
 +
* '''Mono WAV 11 KHz 16 Bit''' - (2 bytes * 1 channels * 11025) = ~22 KB per second, so 2MB can hold 90 seconds, 16MB can hold 12 minutes
 +
 +
=== Fichier OGG compressé ===
 +
You can compress or convert any kind of file (like MP3) to Ogg Vorbis and its royalty free!
 +
 +
Since it's compressed, Ogg Vorbis does lose a little quality but its very unlikely that you will notice. The only real tradeoff for Ogg files is that the Codec is a little slower so it takes longer to play files, on the order of 50 milliseconds or so. In general this is not noticable, but if you are looping audio with a TnnHOLDL.ogg file, you'll notice a small gap.
 +
 +
'''Ogg Vorbis is about 1:5 to 1:10 compression over WAV files, so you can store 5-10x as long audio if you compress it to Ogg, compared to the numbers above'''
    
{{ADAFRUIT-AUDIO-FX-TRAILER}}
 
{{ADAFRUIT-AUDIO-FX-TRAILER}}
29 836

modifications

Menu de navigation