Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: DC coupled delay. Beginner

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    11

    DC coupled delay. Beginner

    I would like to delay short bursts of control voltage for synths. Like an audio delay but for envelope CVs.
    I had a look at an audio delay with Teensy (audio Library) but I need to be able to control sample rate and effectively have more channels and also I would like to add a random generator in order to set the delay times.
    I cannot find any info on how I stream an incoming signal into RAM to be accessed after a (short) period of time. Essentially to record.
    Can someone help a beginner out. Just some resources on where I could find the relevant info. I'm struggling to find any in my searches.

  2. #2
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    141
    Hi Tardishead,

    I found this tutorial on circular buffers and delays useful, it isn't for the teensy platform (it's for bela) but the principals apply. It might help with streaming incoming signals and delaying.

    A few questions that might help understand what you are looking to achieve :
    - I don't know how many channels of CV you are looking to sample and delay?
    - you say you want to modify the sample rate - what sort of rate are you aiming for?
    - do you have a particular Teensy in mind (i.e. 3.2, 4.0 etc)

    cheers, Paul

  3. #3
    Junior Member
    Join Date
    Oct 2020
    Posts
    11
    Quote Originally Posted by houtson View Post
    Hi Tardishead,

    - I don't know how many channels of CV you are looking to sample and delay?
    - you say you want to modify the sample rate - what sort of rate are you aiming for?
    - do you have a particular Teensy in mind (i.e. 3.2, 4.0 etc)

    cheers, Paul
    Well I need to do one cv channel first and get to know the concept
    It only has to capture changes in envelope attack etc so I reckon 4000sps should work well
    I have a Teensy 3.6 but I was thinking of modding the code on Ornament and Crime to include my app. It has 4 separate DACs which would be very useful and all the add on circuitry to standardise synthesiser inputs and outputs
    Cheers

  4. #4
    Senior Member houtson's Avatar
    Join Date
    Aug 2015
    Location
    Scotland
    Posts
    141
    O&C is a great idea for the cv hardware, the code base is quite complex (highly optimised) - i've never looked at how easy it is to add an app.

    If it was me I'd start with one channel, use analogRead() to sample with a simple timer, put the sample in a circular buffer and implement the delay. I'd get that going then add extra channels.

    Let us know how you get on particularly if you do an O&C app. cheers Paul

  5. #5
    Junior Member
    Join Date
    Oct 2020
    Posts
    11
    Quote Originally Posted by houtson View Post
    O&C is a great idea for the cv hardware, the code base is quite complex (highly optimised) - i've never looked at how easy it is to add an app.

    If it was me I'd start with one channel, use analogRead() to sample with a simple timer, put the sample in a circular buffer and implement the delay. I'd get that going then add extra channels.

    Let us know how you get on particularly if you do an O&C app. cheers Paul
    For the time being I will not bother with the O&C and just do a standalone unit
    I got a Teensy and started programming. My first program choses a set of 4 random values on receiving a sequencer trigger pulse. Woop!
    So I am looking at delaying positive unipolar envelope CVs 0 to +5v. When dealing with analogue input pins am I ok just to scale down the input CV by half? Because the 3.3v max input is peak to peak right? And then I'll use an opamp with a gain of 2 after the DAC.
    And for potentiometers on analogRead I use the 3.3v output pin right?
    Forgive the beginner questions

  6. #6
    Junior Member
    Join Date
    Oct 2020
    Posts
    11
    Quote Originally Posted by houtson View Post
    O&C is a great idea for the cv hardware, the code base is quite complex (highly optimised) - i've never looked at how easy it is to add an app.

    If it was me I'd start with one channel, use analogRead() to sample with a simple timer, put the sample in a circular buffer and implement the delay. I'd get that going then add extra channels.

    Let us know how you get on particularly if you do an O&C app. cheers Paul
    Sorry forget about the last post. I figured that stuff out
    I did it. My first Teensy program. Woot. Sample time is approx 20000 samples per sec. I had to slow it down it was way too fast to start with. Works really well. 2 sec max delay time.
    Have programmed 4 separately tapped outputs but now I need to implement at least two more external DACs
    That video you posted really helped me understand the concept and get the code right
    Awesome! thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •