What microcontroller for sound sample and manipulation

Thread Starter

Chillum

Joined Nov 13, 2014
546
I realize most microcontrollers have limited memory, but I'd like to load a fart sample (1-2s) and then manipulate it's tone/pitch to achieve 12 notes and halfnotes. Where do I start? Arduino/RaspberryPi (but that would be too easy, for it's got a sound card and cpu and gpu). My budget? I don't know, I've got money saved up, but that's for all my life and not just for electronics, although I favour using it for electronics... :D

Hit me, and then we'll investigate price options ;) if there are any options
 

BobTPH

Joined Jun 5, 2013
11,515
dsPIC33FJ128GP802 or 804

These have a 16-bit stereo audio DAC and 128KB of flash memory, and a 12-bit ADC, which should be enough to do what you want, with just a couple of opamps in addition.

Bob
 

Papabravo

Joined Feb 24, 2006
22,082
If you can find one with the right shield, it could work for you. As I understand what you need it is:
  1. At least 1 A/D channel with a microphone input to do sound sampling.
  2. Enough memory to hold 40,000 samples for each second of sound
  3. At least 1 D/A channel with a speaker output to play back the modified sound.
The processor in the Arduino may or may not be capable of handling this process. As I understand the implementation the sketches are interpreted. This means the program is recompiled each time it executes. At least this is the way it was with the Duemillenove (ca. 2009). Maybe things have improved since then.
 

Robartes

Joined Oct 1, 2014
57
The processor in the Arduino may or may not be capable of handling this process. As I understand the implementation the sketches are interpreted. This means the program is recompiled each time it executes. At least this is the way it was with the Duemillenove (ca. 2009). Maybe things have improved since then.
In my understanding, the sketches are compiled and then downloaded to the microcontroller - no interpreter runs on the micro. However, the Arduino libraries do add some overhead which might result in code running slower then code that is 'hand rolled' in C.

That said, the AVR in most Arduinos (an ATMega32 running at 16MHz) should probably be able to handle the 40K samples per second.
 

Papabravo

Joined Feb 24, 2006
22,082
In my understanding, the sketches are compiled and then downloaded to the microcontroller - no interpreter runs on the micro. However, the Arduino libraries do add some overhead which might result in code running slower then code that is 'hand rolled' in C.

That said, the AVR in most Arduinos (an ATMega32 running at 16MHz) should probably be able to handle the 40K samples per second.
Yes, I would think so. 40 KHz. is a 25 μsec period. You won't be able to do much else while you are sampling.
 

djsfantasi

Joined Apr 11, 2010
9,237
Is the fart sampling done in real time? Or is your objective to create a system that plays 12 notes and half notes that sound like farts?

In the latter case, one could perform the sound processing offline, and load the samples into memory at run time.

?
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
Is the fart sampling done in real time? Or is your objective to create a system that plays 12 notes and half notes that sound like farts?

In the latter case, one could perform the sound processing offline, and load the samples into memory at run time.

?
I was thinking make one sample, load it on microprocessor, and use the microprocessor to generate the 12 (11) notes from the base sample
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
how much storage do I need to save a 2s wave file, and is it possible to manipulate the pitch/tone of that wav file with a microcontroller? would it be cheaper than a RaspberryPi type B? edit: or type A+? edit: the point is it's a kids project using the RPi listen to switches and play to the headphone out, I'm here to learn, that's why I wanna go the microcontroller route (proudly self taught hand-on mostly, and still very noob)
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
Audacity is open source software that can manipulate the sound clips. It is almost one command to change the tone and pitch.

I thought I had an idea of what you were attempting Was ready to suggest ways of adding memory to an Arduino or other microprocessor (it's described on the Arduino site), but now feel like your requirements keep changing.
 

Thread Starter

Chillum

Joined Nov 13, 2014
546
Audacity is open source software that can manipulate the sound clips. It is almost one command to change the tone and pitch.

I thought I had an idea of what you were attempting Was ready to suggest ways of adding memory to an Arduino or other microprocessor (it's described on the Arduino site), but now feel like your requirements keep changing.
not requirements that change, looking for solutions change, requirements are still 12 musical farts, however its possible to do it?
 
Top