Show Posts
Pages: [1]
1  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: March 26, 2013, 01:38:30 am
Tuttut, thanks for the great library. I have an alpha release of my ChipKit port, BasicSDAudio, available on GitHub. I am also working on an amplifier board that would work for any PWM audio output.

Check out the release at:
http://github.com/cobra18t/BasicSDAudio

another demo at:
http://cobrainnovations.blogspot.com/2013/03/basicsdaudio-alpha-release-and-demo.html

and info on the amplifier/filter at:
http://cobrainnovations.blogspot.com/2013/02/babyboomer-audio-amplifier-and-filter.html


I have yet to incorporate the 1.03 improvements.
2  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: December 19, 2012, 05:18:54 pm
@Tuttut

Any suggestions for changing the code so multiple files could be played at once/asynchronous from each other. Would I just keep track of a "_fileinfo" object and a buffer for each file playing? Then the worker routine would service each buffer as necessary and the PWM output would be some sort of summation of the individual outputs?

Note that this is for my port of your library to the faster ChipKit compatible microcontrollers. My ideal scenario would be to create a library capable of 4-8 channels of audio. You could designate 1 or more of those channels to be protected, by which I mean they would not stop playing if the user requests another file to be played. Instead, the next file would go to the next available unprotected channel, where "next" is determined by a ring buffer.

As an example, Super Mario Brothers sounds. Assuming 4 channel audio. You would want the background music to be protected, because you don't want it to stop when the sound effects play, so maybe it plays through channel 0. If you jump, then the jump sound effect would play in channel 1. Then you shoot two fireballs while you are in the air, whose sounds play in channels 2 and 3. If the first fireball hits a bad guy, then the jump sound would be stopped and the hit sound would play back in channel 1.


-Thomas
3  Using Arduino / Microcontrollers / Re: Arduino clones with more RAM than Uno? on: December 19, 2012, 04:19:26 pm
@bratan and tack

I highly recommend the SimpleSDAudio library. You get good audio with minimal parts. I am working on a board which has buffers and an amplifying filter to improve audio further, but it is pretty good as it is.

I am porting the SimpleSDLibrary over to ChipKit compatible boards to hopefully take advantage of more powerful computation at a lower price point. I have a video of the preliminary port (which I refer to as BasicSDAudio, to distinguish from the pure Arduino version) here:

http://cobrainnovations.blogspot.com/2012/10/basicsdaudio-chipkit-library.html

I am also editing a new ChipKit compatible board, the FubarinoSDt. It uses an 80MHz, 512k Flash, 32k RAM, 32bit PIC processor and has a microSD socket and native USB in a breadboard form factor. With built in SD, this board will prove very useful for audio projects. If I do decide to make them available for sale, $25 is the target price. Check it out:

http://cobrainnovations.blogspot.com/2012/12/fubarinosdt.html
http://cobrainnovations.blogspot.com/2012/11/fubarino-sd-new-pic32-dev-board-on-block.html


-Thomas
4  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: October 26, 2012, 06:15:51 pm
@Tuttut: I saw my changes in the newest version, I will have to try it out in 0023. Thank you for abstracting the SD card library so that I only had to change the "0" level. That made it much easier.

I have a video of a basic 8-bit 78.125kHz stereo sample running on my ChipKit Uno32 using a minimal setup. Check it out:
http://cobrainnovations.blogspot.com/2012/10/basicsdaudio-chipkit-library.html


-Thomas
5  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: October 19, 2012, 11:29:42 am
For anyone interested in further details regarding my chipkit port, follow the progress at http://chipkit.org/forum/viewtopic.php?f=7&t=1652&p=7026#p7026.


-Thomas
6  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: October 19, 2012, 11:02:01 am
Well, I am starting to port the code over to the chipkit Uno32. First I had to port the library back to Arduino 0023, since that is what the chipkit software--MPIDE--is based on. This was mostly just changing

Code:
#include <Arduino.h>

to

Code:
#if ARDUINO < 100
#include <WProgram.h>
#else
#include <Arduino.h>
#endif

as well as converting the examples from .ino back to .pde files. After this massaging, I got it to compile in 0023.

The code is not pretty at the moment since I am using a lot of "#if defined (__PIC32MX__)" to switch between AVR and PIC specific code. I have the SD card library working on the Uno32, so now I need to port over the PWM.

I am running the SD card at 400kHz during initialization and then at 20MHz for everything after that. It is looking like the PWM will be sampled at 78125Hz for full rate and 39062.5Hz for half rate. These values were chosen to give perfect 8bit resolution on the PWM and still be close to the original 62500 and 31250Hz values.
7  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: October 17, 2012, 03:09:21 pm
Hello,

This looks like a great library. Any chance that it could be ported over to include support for the chipkit Uno32? How difficult do you think it would be to do so? It appears that PWM would be relatively simple to port over, but I am not sure about the SD card interface. Any ideas?

With the 80MHz 32bit processor on chipkit, you could have faster SD card read times and high sample rates that would enable more processor free time and better sound. The chipkit is also natively 3.3V, so no level shifters are necessary.


-Thomas
Pages: [1]