Shop OBEX P1 Docs P2 Docs Learn Events
looking for some audio delay program/circuits — Parallax Forums

looking for some audio delay program/circuits

Keith HiltonKeith Hilton Posts: 150
edited 2005-08-19 13:37 in General Discussion
tongue.gif· I have been looking for some audio delay program/circuits.· Nothing comes up when I search audio delay, delay, etc. I am looking in the range of 0 to 400ms.· Thanks! ·tongue.gif

Post Edited By Moderator (Chris Savage (Parallax)) : 8/12/2005 2:37:42 AM GMT

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-08-12 11:27
    do you want a delay 'affect' or a way to slow down audio without distorting the sound (slowing it down and make it a lower octave).?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-12 13:06
    Hi Keith,

    Turns out the term you should have been searching is "analog delay" (sometimes it's a real asset to be a professional searcher).

    The very first return in Yahoo produced this simple yet effective circuit using a single op amp·to accomplish what you are looking for. You'll likely want to replace the R with a potentiometer or a digital potentiometer. I don't know if a 0ns delay with this circuit will be possible, so you may need an analog switch to provide support for a 0 delay time.

    I noticed that in the equations the author uses τ (tau), but uses π (pi) in the discusssion, I think these are supposed to be the same thing (2RC). The one problem with this circuit is that the delay is frequency dependent, meaning if you have·an audio signal containing frequencies 20Hz-20kHz, a 20Hz signal will be delayed a different amount than a 20kHz signal, this is because the variable s in the Laplace transformation is a function of frequency (s is not seconds, it is the variable Laplace is based on and is frequency dependant). But creating a uniform delay requires a much more complicated circuit. Test the circuit out, you may find the difference in delay times small enough to be unimportant.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-08-12 13:18
    Here is another circuit which is based on a 1 bit ADC, 1 bit·DAC, and a shift register. If you use a longer shift register (more than the single bit·figure·1 uses), then use a multiplexer to choose an output tap (like 1 of 8 possible taps in a 74'165) you can get a variable delay, by chaining multiple shift registers and adding multiplexers you can expand the range of delays possible. The advantage of this circuit is that all frequencies experience the same delay.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • BeanBean Posts: 8,129
    edited 2005-08-12 13:29
    Paul,
    That last circuit I guess is similar to the old "bucket brigade" delay chips. I know radio shack used to sell one, but I doubt if they do anymore.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • Keith HiltonKeith Hilton Posts: 150
    edited 2005-08-18 02:05
    Thanks for the information.· I don't think anyone makes the old Bucket Brigade chips anymore.· I tried to get some and could not find them anywhere.· I suppose I should of been more exact when I was talking about delay.· Actually I'm talking 20HZ to 20KHZ-audio range.· By delay, I mean the repeat of the signal.
    Really repeat of the signal is totally different than delay.· So, I should of been more exact.
  • steve_bsteve_b Posts: 1,563
    edited 2005-08-18 12:52
    So...echo?? or Reverb??

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Keith HiltonKeith Hilton Posts: 150
    edited 2005-08-19 04:24
    Echo is what I was looking for.
  • steve_bsteve_b Posts: 1,563
    edited 2005-08-19 12:39
    So a sample and hold circuit is kind of what you're after?

    What you can still do is use a delay circuit that will mix its "delayed" signal with the original signal.

    I've attached a schematic for a delay box.

    (Note: this was downloaded freely from the net; it's not known to me whether this is a trademark/copyright issue....moderators please use diligence![noparse];)[/noparse] )

    Now setup they way I described would only give you one echo'd "call".....so if you wanted a continued, diminishing echo, you might want to pick off the outgoing "echo'd" signal and pass it through a buffer.....depending on how you have this buffer set up (re: gain) you could get a very long 'sustained' echo.· Which could be good or bad!!

    If you were to pick off the outgoing "echo'd" signal and NOT use a buffer (re: no gain) then you'd get a lesser amplitude signal being fed-back, so you'd definately get that diminishing effect.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Dave PatonDave Paton Posts: 285
    edited 2005-08-19 13:37
    Keith-

    I think what you really want to do is some virtualized DSP work. A standard echo/reverb box uses a DSP to apply a transform to a circular buffer, and then it mixes that transformed and slightly delayed signal back in with the original. If some feedback is inserted as well, the echo becomes a reverb, with the quality determined by the feedback equation.

    If I was trying to build a simple slap echo, I'd probably start with a good AD-DA set, and a large, fast RAM. Sample at 44.1KHz and load up the RAM as a circular buffer, and use an offset index (current_position-n) to figure out where to read back from. Add the buffer signal (preferably scaled downward to prevent an annoying and completely unrealistic effect) abck to the 'real' one right before the DAC, and you're good to go.

    Of course, the devil is in the details. Overflow could be a huge issue for you unless you prescale the analog signal before it hits the ADC. Timing will be hard to maintain if you do more than a simple scaled echo. And, of course, making circular buffers work without any repetetive delays for resetting the index on a processor that doesn't have truly circular buffers or a barrel shifter can be tricky. I'd suggest trying to read up on it.

    Unfortunately, I'm the wrong guy to ask about the details these days. I built a few in years gone back when I was a student, and had a lot of assistance. Since then I've stayed away from DSP.

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.
Sign In or Register to comment.