Selecting a microprocessor for a music looper

Discussion in 'The Projects Forum' started by kabum, Oct 28, 2009.

  1. kabum

    Thread Starter New Member

    Oct 28, 2009
    Hi all, as you can see I'm new on this forum. I'm designing a music looper that will take 1/4" input, sample, store, and playback. I was thinking of using audio A/D's and running them into a PIC, then running the output through audio D/A's. If there are any inherent gaping flaws in this basic design, let me know (kindly :)).

    My main concern is with memory. 2 min of stereo audio at CD quality (16-bit, 44.1kHz) = 44100 x 120 x 16 x 2 = 21.168 MB

    Are there microcontrollers available with this sort of on-board memory? You'll notice I mentioned the PIC; I'm relatively familiar with these but do not know how to interface one with external memory. Maybe another product is more suited for this application. Another concern is with processing speed- I have to wonder if a microprocessor is going to be able to have time to do everything it needs to do between samples, or be able to sample and playback at the same time.

    It could be possible to have two dedicated memory banks, one for storage and one for the playback buffer. The first would hold all of the samples for each track, and the second would hold the mix as it's to be heard, essentially the sum of all layers.

    Before going into any detail about its features and design, I need to figure out how I'm going to work with memory. I'm hoping you guys can help me out with this part, finding what I can use for the microcontroller and its memory. Thank you!
  2. davebee

    Well-Known Member

    Oct 22, 2008
    I don't know of any microcontrollers with that much internal RAM, but an SD card might be a good solution to this.

    I know that playback rate is possible using a microcontroller because a few years ago I made an audio board for a museum exhibit that read WAV files from an SD card and played the audio. During development of the board, I tested the playback rate and found no problems playing 16 bit 44 kHz stereo from WAV files.

    I used the Parallax propeller microcontroller for this.

    I also made a GPS logger using the same processer that writes the GPS location to an SD card, so I know that writing to an SD card is not that difficult. I haven't myself tried recording audio at that rate but don't see any reason it couldn't be done.

    Doing both recording and playback simultaneously may be possible. SD cards are pretty fast, but I've never worked the numbers for this particular task. My guess would be that it can be done.
  3. BMorse

    Senior Member

    Sep 26, 2009
    I have just recently developed an application for the Pic32MX uc to playback wave files from an SD card (FAT16/32 file format)...... Working on Audio recording now..... I do not use any external RAM, just internal RAM for buffering audio data for playback....

    I used the output compare module in the pic to pulse width modulate the audio signal.... and I will be using one ADC channel to decode the audio for recording....

    My .02