Offline
Newbie
Karma: 0
Posts: 21
|
 |
« on: January 15, 2013, 01:55:27 am » |
i just finished an arduino sketch that allows decent audio processing with just a few resistors and capacitors. the arduino sketch is up here: http://wiki.openmusiclabs.com/wiki/PWMDACit takes in audio on ADC0 and uses a dual pwm to create 16b audio out. you can process the audio in-between and make a low-fi effects pedal. it can be used for just analog out as well, and is much higher quality than using analogwrite (although more complicated too). there is a much more in-depth tutorial on pwm in general up here: http://www.openmusiclabs.com/learning/digital/pwm-dac/
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #1 on: March 23, 2013, 02:58:22 pm » |
Hi I have tried your code on my Arduino Mega2560, it doesn't work. Are the code for Atmega328 and Atmega2560 different? Any hint to convert the code to Arduino Mega2560?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #2 on: March 24, 2013, 03:20:31 pm » |
the ports are different between the mega and uno (what pins map to what functions), so those need to be changed.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 6
Posts: 918
Arduino rocks
|
 |
« Reply #3 on: March 25, 2013, 03:57:50 pm » |
HI.. (sorry for being thick headed here)  but would this be used for AUDIO playback? (like a .wav file?) or just for use like, say.... a voice changer/voice effects type of project? thanks!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #4 on: March 25, 2013, 06:03:56 pm » |
it can output .wav, but there isnt an SD card reader setup for it yet. so if you have something that can read SD cards, you can use the PWM to output it. this is what the simpleSD does.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 180
|
 |
« Reply #5 on: March 26, 2013, 01:55:27 am » |
This is interesting. What might you use this for? Are there audio examples?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 6
Posts: 918
Arduino rocks
|
 |
« Reply #6 on: March 26, 2013, 02:48:53 pm » |
HI-
SimpleSD.. as in the SimpleSDAudio library?
(I have played with that before)
I guess Im missing a 'purpose' this can be used for then??
Was a wrong to assume it could be used for some sort of real-time voice changer/FX platform??
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #7 on: March 26, 2013, 04:12:02 pm » |
yes, its primarily for doing guitar/voice effects on the cheap. but, the pwm side is just a generic setup routine to configure the pwm for various data rates and bit depths, so that can be used for any audio application.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 180
|
 |
« Reply #8 on: March 26, 2013, 09:41:13 pm » |
Would be nice to see a full sketch that does some audio effects.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #11 on: April 01, 2013, 11:49:22 pm » |
if you take a look at the circuit here: http://wiki.openmusiclabs.com/wiki/MiniArDSPyou just need to put a guitar preamp before it. a simple opamp circuit with gain of 100 would be fine.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 2
|
 |
« Reply #12 on: April 07, 2013, 06:01:03 am » |
I have this sketch bread boarded with the analogue in circuit from instructable here.Thank you GUest, Brilliant! All working a bit noisy but I am fine tuning resistor values and caps. http://www.instructables.com/id/Arduino-Audio-Input/?ALLSTEPSThis is the project I am working on to use it with, Just going to do a quick video and then ´´once more unto the breach´´
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|