AdaFruit Wave Shield Conversion Fichier

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche

Intro

The wave shield is designed to play a very specific type of audio. If your music sample is in MP3 format, or 44KHz wav, you'll want to convert it to the right format. This way you will get the best sounding audio Check the file

If you have a wave file already, you should check to see if its already in a proper format. That way you will save yourself some time! In windows, right-click on the file, and select Properties then click on the Summary tab

ADF-WaveShield-Convert-01.jpg

This file is 16KHz, 16-bit, mono PCM. Since thats below the maximum (22KHz, 16-bit, mono PCM) you are good to go. No need to convert the file

OK lets say the file is an MP3 or 44KHz or stereo wave file. We will need to convert it down.

Option 1. Use iTunes

You can do the conversion easily with iTunes (available for Mac/Windows) if you have your music in iTunes already this will be super fast to convert multiple files!

You'll have to set the preferences first, but you only have to do it once

ADF-WaveShield-Convert-02.jpg

Go to the Advanced->Importing tab. Make sure it is set to 22KHz (or less), 16bit (or less) and Mono channels. Click OK

ADF-WaveShield-Convert-03.jpg

Next find the files you want to convert. Select Convert Selection to WAV from the menu

ADF-WaveShield-Convert-04.jpg

Then simply drag the sounds onto an SD card

ADF-WaveShield-Convert-05.jpg

Option 2. Use SoX

Check out this tutorial on using a command-line tool to quickly convert files

Option 3. Use Audacity

If you dont have or don't want to use iTunes you can convert files (one at a time) with Audacity

This is pretty easy. You can use the free Audacity software - available for windows, linux or mac

ADF-WaveShield-Convert-06.jpg

Grab it from the download page and install it on your computer

Step 3. Start up Audacity and open the file

Start up Audacity

ADF-WaveShield-Convert-07.jpg

Select File->Open... and open the file. In my case its an MP3

ADF-WaveShield-Convert-08.jpg

Audacity will spend some time uncompressing and opening the file and then present you with something like this

ADF-WaveShield-Convert-09.jpg

Step 4. Split and Mix a stereo track

Next, if you have a stero track, you'll probably want to turn it into a mixed mono track. That way it will sound most like the original. Click on the title and select Split Stereo Track

ADF-WaveShield-Convert-10.jpg

Next, when you mix a track you'll end up adding both of them together. This means that if both sides are loud, you'll get distortion. Reduce the gain on both tracks to -6dB

ADF-WaveShield-Convert-11.jpg

Then convert both tracks to Mono by clicking on each title. Make sure you do it for both tracks!

ADF-WaveShield-Convert-12.jpg

Now to mix! From the menu select Project -> Quick Mix

ADF-WaveShield-Convert-13.jpg

A few seconds later, you have converted your stereo track to mono!

Step 5. Convert to 16 bit audio

If your audio rate is higher than 16-bit, you will want to downconvert it. Click on the track title and select Set Sample Format -> 16-bit

Fichier:ADF-WaveShield-Convert-14.jpg

Step 6. Convert to 22-KHz or less

Finally, make sure the audio file will be saved as 22KHz. If the the track label says 44KHz you will want to convert it.

At the bottom of the window there is a little button named Project rate: Make sure this is 22KHz or less

ADF-WaveShield-Convert-15.jpg

Step 7. Prepare to export

Check the Preferences menu item and select the File Formats tab. Make sure the Uncompressed Export Format is WAV (Microsoft 16 bit PCM)

ADF-WaveShield-Convert-17.jpg

ADF-WaveShield-Convert-18.jpg

ADF-WaveShield-Convert-19.jpg

ADF-WaveShield-Convert-20.jpg

ADF-WaveShield-Convert-21.jpg

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.