Heyo everyone,
So I've been working on implementing live scrubbing through audio on the teensy for a large project I'm creating. Think scratching vinyl or scrubbing through a tape machine. I was trying to implement it with the queue object, but I was running into a ton of issues with clicking and weird sound artifacts, so I decided to create an object to make it easier: AudioPlayScrub.
Basically, the object stores a pointer to an audio array (an array of 16 bit int values), which you can store in PROGMEM, and then, after being activated, you can set a target position (from 0.0 to 1.0), and the internal playhead of the object will approach that target by a rate that you can change with the setRate(float 0.0-1.0) function. It's super easy to fit into projects, and it sounds quite nice. I'm still working on smoothing out the sound a bit to get rid of some weird digital artifacts, but I'd love to let everyone take a look, get some feedback, and give it to anyone that needs a live scrubber for their next project.
Here's a GitHub link:
https://github.com/dangelo729/teensy_audio_library_scrubber
Let me know if anybody has any questions about it.
So I've been working on implementing live scrubbing through audio on the teensy for a large project I'm creating. Think scratching vinyl or scrubbing through a tape machine. I was trying to implement it with the queue object, but I was running into a ton of issues with clicking and weird sound artifacts, so I decided to create an object to make it easier: AudioPlayScrub.
Basically, the object stores a pointer to an audio array (an array of 16 bit int values), which you can store in PROGMEM, and then, after being activated, you can set a target position (from 0.0 to 1.0), and the internal playhead of the object will approach that target by a rate that you can change with the setRate(float 0.0-1.0) function. It's super easy to fit into projects, and it sounds quite nice. I'm still working on smoothing out the sound a bit to get rid of some weird digital artifacts, but I'd love to let everyone take a look, get some feedback, and give it to anyone that needs a live scrubber for their next project.
Here's a GitHub link:
https://github.com/dangelo729/teensy_audio_library_scrubber
Let me know if anybody has any questions about it.