Show Posts
Pages: 1 ... 4 5 [6] 7
76  Using Arduino / Audio / Re: Can someone recommend a good audio analyzer? on: April 18, 2013, 10:12:07 am
if you just need a spectrum analyzer, "spectrum lab" is freeware, and ive been very happy with it.  it can take in external audio from a soundcard, or work on saved wav files.
77  Using Arduino / Audio / Re: Problem: Custom PWM frequency interferes with SoftSerial on: April 05, 2013, 02:04:56 pm
timer0 is used by arduino for a lot of different things.  i would suggest switching your pwm to timer1 or timer2.
78  Using Arduino / Audio / Re: analog audio in to PWM audio out on: April 01, 2013, 11:49:22 pm
if you take a look at the circuit here:
http://wiki.openmusiclabs.com/wiki/MiniArDSP

you just need to put a guitar preamp before it.  a simple opamp circuit with gain of 100 would be fine.
79  Using Arduino / Audio / Re: analog audio in to PWM audio out on: March 26, 2013, 10:40:52 pm
i have a sketch up here:
http://wiki.openmusiclabs.com/wiki/MiniArDSP

sorry, no sound samples yet.
80  Using Arduino / Audio / Re: analog audio in to PWM audio out 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.
81  Using Arduino / Audio / Re: analog audio in to PWM audio out 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.
82  Using Arduino / LEDs and Multiplexing / Re: Reading multiplexed data in Pd on: March 24, 2013, 05:09:56 pm
i must be confused about how analogRead() works.  i thought you put in a number, and that was the pin it read.  so analogRead(1) reads the first pin, analogRead(2) reads the second pin, and analogRead(16) reads the 16th pin.  i dont know exactly what your circuit looks like, but i am assuming you have a mux which funnels all your inputs into a single analog input pin (if you had 16 analog input pins, you wouldnt need the mux).

your for() loop increments i from 1 to 16.  therefore you are reading in analog from pins 1 to 16, but there are no pins above 8 on the chip you are using.

Code:
 for (int i = 1; i < 17; i++) {
    digitalWrite(CONTROL0, (i&15)>>3);
    digitalWrite(CONTROL1, (i&7)>>2);
    digitalWrite(CONTROL2, (i&3)>>1);
    digitalWrite(CONTROL3, (i&1));
    unsigned int mod = analogRead(i);
    muxarray0[k++] = mod & 0x007f;
    muxarray0[k++] = (mod >> 7) & 0x0007; // in order to get 0 - 1023
  }
83  Using Arduino / LEDs and Multiplexing / Re: Reading multiplexed data in Pd on: March 24, 2013, 03:24:12 pm
why is it analogRead(i) below?  there are only 6 analog ins, and this will make it count up to 16.

Code:
   digitalWrite(CONTROL3, (i&1));
    unsigned int mod = analogRead(i);
    muxarray0[k++] = mod & 0x007f;
84  Using Arduino / Audio / Re: analog audio in to PWM audio out 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.
85  Using Arduino / Audio / Re: Spectrum analysis on: March 19, 2013, 01:42:42 pm
try changing serial.write to serial.println

the data is currently coming out in binary and not ascii, so its hard to read.
86  Using Arduino / Audio / Re: WavePro Shield - Beta Testers wanted on: February 27, 2013, 02:49:06 pm
bootloaders are a pain, and you will be faced with the added layer that your target is not an arduino, so the code will have to written in some other interface anyways. honestly, once youve put the dsPIC on there, its unclear what the arduino is needed for.

out of curiosity, what was your decision making process for choosing between the dsPIC and a micro + codec?  the micro + codec option would be cheaper and allow for better sound quality, and 16b ADC.  but, it is not as flexible, and cant do a lot of audio processing.
87  Using Arduino / Audio / Re: WavePro Shield - Beta Testers wanted on: February 27, 2013, 02:26:46 pm
this is really cool.  the dsPIC can do a lot more than playback wav files.  will there be the ability to bootload from the arduino perhaps?  it would be awesome for effects pedals and synths if you could have the horsepower of the dsPIC, but the ease of programming of the arduino.
88  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: January 28, 2013, 07:02:24 am
hello Tuttut,

one more thing.  you can pre-distort a wav file so that it plays back identical to the source material.  the pwm transform is a known function, and although not invertible, it can be compensated for perfectly.  i have yet to implement this, but i have read research papers on it, which prove it mathematically.
89  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: January 26, 2013, 05:21:24 am
hello Tuttut

i just finished an analysis of pwm distortion, and then thought it would be cool to make a good and cheap wav player.  and it turns out it is cool, and you have already done it.  thanks for the work, i always enjoy finding projects like this.  if you are open to suggestions, here are some things that my research has shown to make improvements in the audio quality.

1. use 14b, phase correct pwm, at 62khz clock rate.  you never really get the full 16b anyways, even with perfect resistors, due to distortions building up in the noise floor.  also, perfect resistors are difficult to come by, even with trimming, due to the variability of the internal resistance of the arduino.

2. use 3.9k / 499k resistors for the mixing.  the output resistance is around 40ohms, so this keeps its error component low in comparison to the 3.9k.

3. dont bother with the external logic chips, they have a lot of jitter in comparison to the arduino itself, and introduce phase modulation and associated distortions.  also, the noise floor on the arduino i tested was -110dB, which was below the pwm noise floor for frequencies above 1kHz.  with the usb disconnected, the arduino isnt that bad.

4. you can try changing the depth / location of pwm to get further gains, but its probably not too significant for audio (as compared to pure tones), as the maximum amplitude is usually low anyways.

here are the writeups if youre interested:

distortion analysis:
http://www.openmusiclabs.com/learning/digital/pwm-dac/pwm-distortion-analysis/

dual pwms:
http://www.openmusiclabs.com/learning/digital/pwm-dac/dual-pwm-circuits/

again, great work, im looking forward to trying it out.
90  Using Arduino / Audio / analog audio in to PWM audio out 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/PWMDAC

it 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/
Pages: 1 ... 4 5 [6] 7