Änderungen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche

SimpleSDAudio

2.057 Byte hinzugefügt, 17:35, 7. Apr. 2015
/* It does not compile */
WARNING<div style="clear: both; border-width:0px; border-color:#333300; border-style:solid; padding:5px; background-color:#FFEFEF; margin:1em; margin-left:5em; margin-right:5em;">Please note: If you got here by clicking a f***ing link from internet parasites like http://"gotlinks.co/1rdF " that force you to install software that takes over you computer or force you to do other things that you don't want to just to get the correct link to this free site, please be aware that we are NOT responsible for such shitthat! Feel free to correct such links if you have access to those sites (often wikis like arduino.cc are affected. </div>
[[Datei:SSDA Minimal.jpg|320px|right|thumb|Minimal setup for SimpleSDAudio (here without level-shifters - only for Arduino running at 3.3V)]]
* Integrated SD library (minimal FAT only, optimized for low RAM usage and high performance)
* Works with most SD card shields that are hooked to SPI port
* Easy to use API: 1. init library, 2. select audio file, 3. call play, 4. call worker while audio is playing
* Supports SD and SDHC cards formated with FAT16 or FAT32
* Combination of fullrate and quadro-output actually leads to buffer underruns
* Minimum controller required: ATmega368. ATmega168 is too low on RAM.
 
=== Alternatives ===
Now there is an alternative library called '''TMRpcm''' that does something similar: https://github.com/TMRh20/TMRpcm/wiki . This is a little bit easier to use (no conversion of WAV file needed). Here a table with the differences:
{| class="wikitable"
!Feature!!SimpleSDAudio!!TMRpcm
|-
|Highest sampling rate||X||-
|-
|Native WAV playback (no file conversion needed)||-||X
|-
|Highly speed-optimized code (using Assembler for audio core)||X||-
|-
|Using size-optimized minimal SD-FAT library||X||-
|-
|Universal SD library in the background supporting fragmented files and many other uses||-||X
|-
|Stereo operation possible||X||X
|-
|Quad speaker operation possible||X||X
|-
|Volume setting support||-||X
|}
So depending on your needs, try the library that best fit your needs. TMRpcm might be easier for beginners. Both libraries should work with the same connections. You can take the information about the connections from here and use the TMRpcm library with that.
 
You want even more, multi-channel audio playback, digital filters, mixers, DSP functions? Then take a look at the [http://www.pjrc.com/teensy/td_libs_Audio.html Teensy 3.1 Audio Library] using a serious (but still affordable) micro controller but still using the Arduino IDE.
= Download =
Datei:SSDA Better16bit.png|Still unexpensive solution to get nice 16-bit audio output
</gallery>
 
The 16-bit output is done by operating two 8-bit outputs together: One will provide an 8-bit signal containing the higher 8-bits and the other one contains the lower 8-bits. If you listen to each of those channels separately, you will hear the usual audio on the upper 8-bit outputs but with noticable 8-bit noise especially on quiet audio parts. On the lower 8-bit you will hear just noise. But when you add this noise (reduced in volume by a factor of 256th done by the resistors) to the higher 8-bits then something magic will happen: The 8-bit noise will vanish (but unfortunately often a lot of noise originating from power supply might still be left).
=== Audio amplifier for loudspeakers ===
== It does not compile ==
* Are you using the latest version of Arduino IDE?
** SimpleSDAudio_V1.00 need at least V1.0.1 of Arduino IDE. It has been tested and works ok also under V1.6.1.
** SimpleSDAudio_V1.01 need at least V1.0 of Arduino IDE (remove complete block with !Serial from examples when using with Arduino IDE V1.0).
1.954
Bearbeitungen