RIFF is short for Resource Interchange File Format. WAVE format (extension: wav) is one of the basic audio formats used in multimedia digital audio, which is based on RIFF format as a standard. Therefore, when we follow the sampling frequency speed to read the audio data one by one, the file is converted to analog signal by DAC, thus, the sound can be represented. And this file we saved, is WAV format file.
Without any compression, now we got a sound card(either integrated or stand-alone) with build-in microphone port, under the support of WINDOWS platform, we can record, that is, turn the sound into digital audio and save it in the computer. The most typical digital audio data file is WAV, which is mostly by using the original PCM encoding to store the raw data for each sampling point. To obtain a CD-level quality digital audio, the data amount for every second is 88.2k that amount is 176.4k for a two-channel stereo. As for a second audio signal, when it’s a telephone-level quality digital audio, the amount of data is 8k bytes with each byte stored the level value of one sampling point. Apparently, the better sound quality a digital audio has, the greater the amount of data it has to deal with.
In fact, the human ear cannot tell 1/256 level (8) precision changes, but for the CD sound quality, we use 16 quantization bits, precision 1/65536. Additionally, the higher sound quality you require, the higher ADC quantization bits.
The following table shows the common standard:Īs you can see from the above table, according to the sampling theorem, for audio signal with different qualities, the digital audio ADC sampling frequency is twice the highest frequency analog signal. Of course, during the playback, the digital data goes through the DAC digital analog converter to restore the analogy signal form to be played out by the sound device.ĭepending on the application range of the audio signal, the sampling frequency and the quantization accuracy of the analog audio digital 0ADC varies. The basic principles and methods of digital audio processing technology is to use ADC, the analog digital converter, to take sample, quantize, encode and convert the analog audio signal into digital data and files to be saved. The Principle 2.1 Digital Audio 2.1.1 Digital Audio Basics The WAV player is easy to make on different platforms and applicable for various scenarios like voice broadcast system, electronic keyboard, as long as you understand the principle of sound. You can make SD card based WAV player by referring to this idea. Basically, the player cannot be regarded as a pure WAV playback, because by extracting the data from the WAV file and storing it in an array format in UNO, this tutorial is for reference. Integrated with the homemade low-pass filter, this Arduino-based simple WAV player is to send out PWM signal generated by UNO, then through the low-pass filter and make the PCM data stored in the flash of UNO into sounds. See Arduino Simple Wav Player 2 using SD card. Use a SD card, there’ll be no time limitation. PS: For the demo we’re gonna show you, since the RAM for the Arduino is very small, hence we can only keep a 2-3 second music.
But specifically how do you make it? Let us take a look.
If you got a small Freaduino Nano or Freaduino Pro to put this into fact, then I’m sure ipod won’t be your consideration. Do-it-yourself a home-brew MP3 player for dear daddy or little daughter is fascinating. Only Arduino can perfectly play the music you like. We don’t need any MP3 shield, tone(), or SD card. Talking about using Arduino to play music, is it the Arduino MP3 shield not the first thing you come up with? Or maybe some geeks will consider about tone() function? They are not the things our topic is about today.