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

Thread: Eurorack drum machine to show - and a question about Teensy 3.2 DAC

Hybrid View

  1. #1

    Eurorack drum machine to show - and a question about Teensy 3.2 DAC


    I had some spare space in my Eurorack and decided to make a little drum machine to fill it.

    I used a Teensy 3.2 with samples and a LED matrix as the primary control for connecting beats to samples.

    In "bar" mode they are beats in the bar, but in "poly" mode they are "every nth beat" - leading to much more interesting rhythms.

    Click image for larger version. 

Name:	IMG_0159.jpg 
Views:	32 
Size:	76.2 KB 
ID:	25386Click image for larger version. 

Name:	IMG_0160.jpg 
Views:	37 
Size:	98.4 KB 
ID:	25387Click image for larger version. 

Name:	IMG_0163.jpg 
Views:	33 
Size:	82.7 KB 
ID:	25388

    Here's a short video demo:

    Anyway, I realised it would also be quite cool to have the output send pitch CV to mod a VCO so it could also work as a sequencer, so I wrote an alternative firmware to support that.

    What I would like to do is support both - but I can't work out how to turn off the AudioOutputAnalog that is writing to the DAC so I can write to it independently when I am in CV mode. I can destroy and recreate the object, but then I think I will get stuck in the dynamic creation bugs in the Audio library.

    I'd appreciate any thoughts.

    Best I could come up with is using a constant DC source and so work within the audio library in both cases.

  2. #2
    Senior Member
    Join Date
    Apr 2021
    Cambridgeshire, UK
    I was going to suggest you use my Dynamic Audio Objects library, which allows creation or deletion of AudioStream and AudioConnection objects on the fly, but then noticed you're using a Teensy 3.2 and I've only (so far) implemented it for 4.x. I don't have a 3.x to test on, and not much motivation as I don't think anyone else is using it...

    Anyway ... would something like this work?
    Click image for larger version. 

Name:	2021-07-28 21_37_28-Audio System Design Tool for Teensy Audio Library.png 
Views:	36 
Size:	6.4 KB 
ID:	25394
    For audio output you set mixer3.gain(0,1.0f), mixer3.gain(1,0.0f), mixer3.gain(2,0.0f); for CV either 0.0, 1.0, 0.0 and call dc2.amplitude() to set the level (a bit crude), or 0.0,0.0,1.0 and queue1.getBuffer() and queue1.playBuffer() to create sample-accurate output at the cost of a bit more processing in your code.



  3. #3
    Thanks for that. I did try the dc option with some success. I didn't think of using a queue, so I'll try that too. There seemed to be some glide in the steps so maybe the queue option will be cleaner.

    I'm also a bit confused by the levels. I know what voltage I need to appear on the DAC to get the 1V/octave output from the little amplifier that follows it, but I don't know what the AudioAnalogOutput object does to the incoming signal.

    Is it simply an input of 0 maps to 0V, and 1 maps to the analog reference voltage?

    I assumed that at first but it wasn't in tune. It was late though and I could easily have muddled something while exploring options. I need to keep plugging into the rack to get the voltages for the op-amp, so there's only so much I can easily test using the computer. :-)

    I'll have another go today.

  4. #4
    Must have been just working too late. :-)

    It's all good now - and proving a lot of fun.

    I must say I'm very happy with my first use of the T3.2. Small, fast, and with a DAC! Glad to be able to avoid the audio shield for this little project.

Posting Permissions

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