Audio Effects using ARM7

Discussion in 'Embedded Systems and Microcontrollers' started by ActivePower, Apr 9, 2013.

  1. ActivePower

    Thread Starter Member

    Mar 15, 2012
    155
    23
    Hi,

    I am trying to build an audio effects synthesizer on an ARM7-TDMI processor for a lab course and am stuck on a couple of things.
    My idea, to start with is this: the processor's 10-bit ADC would read a speech sample from a microphone, sampling at 8 kHz (there is a 4 kHz lowpass analog filter before the ADC), generate a suitable delay-based audio effect using a ringbuffer to hold the data while a DAC would simultaneously retrieve data from the buffer and send it out to a speaker.

    What should be the size of the ringbuffer? Based on the sampling frequency 8000 samples would be generated per second, how fast should the DAC retrieve the data and in what sequence? The buffer size should depend on the delay required, so what value of delay is reasonable for generating a perceivable audio effect?

    Processor: LPC2148 at 60 MHz
    I am thinking of a 1024-element ringbuffer whose only purpose is to generate the delayed element. The program sequence might go as follows: Init ADC and get data -> Store it in ringbuffer location -> Retrieve an element from sometime back -> Add the current and old element to get the final output.

    Is the above process reasonable or is there an alternative?
     
    Last edited: Apr 9, 2013
  2. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    1024 sounds OK.
    Typical effects pedals work from mS to seconds.

    Just make sure the loop gain is less than one or you might oscillation.
     
  3. ActivePower

    Thread Starter Member

    Mar 15, 2012
    155
    23
    Based on the sampling rate, the maximum delay possible would be somewhere around 128 milliseconds. Would that be enough?
    I tried testing the effects in a MATLAB script and the effects were fairly perceivable when the delay was around a second or so. That made me a little doubtful about the ms delays.
     
Loading...