Custom Auto-BPM Continuous Sweep Looper (Teensy 4.1 + Audio Shield)

mikeloops

Member
Hey guys, how you all doing? I am looking into possibly building my own audio looper handheld device customized only for my specific needs, something along the line of this device:


Chat GPT gave me this info below and the 2 questions, can any of you guys advise/help me with this by first confirming if all of this info should be accurate please?

Custom Auto-BPM Continuous Sweep Looper (Teensy 4.1 + Audio Shield)Project Goal: I am building a standalone, line-level hardware looper box to sit between my PC (3.5mm out) and a Boss DD-200 delay pedal. It needs to intercept stereo live audio and perform instant, quantized rolling loops/stutters (1/1, 1/2, 1/4, 1/8, 1/16).

Hardware Stack: Teensy 4.1 (Pre-soldered headers)Teensy Audio Adaptor Board Rev DBourns Rotary Encoder with Push-Switch (For selecting and triggering the loop)0.96" I2C SSD1306 OLED Screen (To display current loop fractions)Two 1/4" TRS Female Panel-Mount Jacks (For physical Line In / Line Out)

Software Approach: I am using AudioEffectGranular for the loop freeze, and a parallel background path utilizing AudioFilterStateVariable (Low-Pass at 130Hz) paired with AudioAnalyzePeak to track the kick drum envelope for Auto-BPM calculation.

Has anyone optimized a similar Peak-Tracking Auto-BPM algorithm for live electronic/pop music to prevent double-triggering on fast syncopations?

Are there any known I2C noise bleeding issues with the SSD1306 OLED screen sharing the ground plane with the Audio Shield, and what is the best routing practice to keep the audio signal completely quiet?
 
Ive used this library for beat detection.
Was simple to implement and quite accurate

Thank you very much! I am planning to run this using an AudioAnalyzeRecordQueue block at a 44100Hz sample rate and 128-sample window size. Did you run the library successfully on a bare-metal Teensy 4.x board, or did you have to adjust any memory parameters please?
 
Awesome, thanks for confirming! Running bare-metal without an RTOS is exactly what I'm aiming for to keep latency down.

Since you've already had it running, did you notice if it needs a large historical buffer of samples to accurately lock onto the BPM, or does it update quickly? Because I am tracking live streaming audio from the PC Line-In rather than a static .wav file, I am planning to stream 128-sample chunks into it continuously using the AudioAnalyzeRecordQueue block.

If you happen to have the initialization or configuration code snippets you used for your bare-metal setup handy, I would love to see how you configured it? If you wouldn't mind sharing please.
 
Thank you so much for linking that thread! A Teensy-based CDJ project is the exact cousin to what I am trying to build. [1]
Looking at the architecture discussed there, feeding the audio block stream into the Michael Krzyzaniak tracking library seems like a perfect fit for a bare-metal loop design.

Since you already got it compiling in that ecosystem, do you have a small snippet showing how you initialized the btt_create function and passed the audio data into it within the standard Teensy loop structure? I want to make sure I bridge the Teensy's 16-bit integer audio blocks over to the library's float requirements cleanly without causing any memory leaks or buffer under-runs
 
Yeah sorry. Last question please. Do you think I will have success with this project to loop live playing audio like the Pioneer RMX 500? My skepticism comes from having tried different failed 'midi' options for this purpose, buying different equipment and losing money in the process. But what's worse was all of the ecperimenting, frustrations and dissapointment.
 
Whats your goal? Capture a sample and play it back in a loop? Apply effects which are BPM synced?
 
No, not with first having to record any piece of music then loop it as with using a sampler. Like what I am doing here in virtual dj software from the 17 second mark if you can listen to it please, to trigger loops of a few different sizes live on the fly to any music playing from my pc


The Novation dicer does this live on the fly seen here from the 36 second mark:


but that works only with a turntable and Serato DJ software.

I need to make my own device only to stutter or loop 4 different quantized lengths on the fly sweepable as in my VDJ video, specifically 1/8, 1/4, 1/2 and 1/1. So the device I am contemplating will be using a simple large jog dial rotary knob to sweep between the 4 looping lengths.
 
Last edited:
Back
Top