Shop OBEX P1 Docs P2 Docs Learn Events
Delay audio/data between 24bit ADC and DAC — Parallax Forums

Delay audio/data between 24bit ADC and DAC

Keen6Keen6 Posts: 5
edited 2010-10-01 03:55 in Propeller 1
Hi there, for a project i would like to delay audio in between 24bit 96khz ADC and DAC's. The goal is to control the delay in a precise manner, between 5-50ms. Although i've read a lot about the propeller, im not sure if its capable of doing this (big stream of data). Could anyone explain to me if this would be possible?

(stereo would be even better, but mono - so single audio stream - would be fine for now)

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2010-09-29 15:07
    Let's see what is possible:

    1sec = 1000ms

    50ms = 1/20th of a sec

    24 bits @ 96Ksps = 288,000 bytes per sec

    So if we used a circular buffer, with three bytes per sample, for the maximum specified 50ms delay we would need the buffer to be 288,000/20 = 14,400 bytes

    Therefore, the answer is yes - it is possible.

    Note that the buffer manipulation would be simpler and faster if you used a long for each sample, in which case the buffer would have to be 19,200 bytes. This precludes doing stereo.

    If you could live with preserving only sixteen bits, you could use a 9,600 byte buffer, which would allow for two circular buffers for stereo sound.


    Keen6 wrote: »
    Hi there, for a project i would like to delay audio in between 24bit 96khz ADC and DAC's. The goal is to control the delay in a precise manner, between 5-50ms. Although i've read a lot about the propeller, im not sure if its capable of doing this (big stream of data). Could anyone explain to me if this would be possible?

    (stereo would be even better, but mono - so single audio stream - would be fine for now)
  • localrogerlocalroger Posts: 3,452
    edited 2010-09-29 15:29
    You could probably use SPI RAM for the data buffers, and even a separate SPI RAM for each channel to reduce the per-chip data rate for stereo. Since SPI RAM operate at 20 MHz this should comfortably accommodate 300K bytes/sec even with constant readdressing. Also, since SPI RAM are byte-oriented you can use 3 bytes instead of a long (4) per sample.
  • JonnyMacJonnyMac Posts: 9,236
    edited 2010-09-29 15:36
    You might have a look here for ideas:
    -- http://www.openstomp.com/wiki/index.php?title=Main_Page
  • Keen6Keen6 Posts: 5
    edited 2010-10-01 03:55
    Thanks guys thats precisely the sort of info i was looking for!

    If i understand correctly, i can use SPI RAM like localroger suggests, to get the performance i need for a stereo delay at 24bit?

    Either way, im impressed with the numbers and will have a go at it as soon as possible :D
Sign In or Register to comment.