changing pitch of audio samples - TeensyVariablePlayback library

@horstmaita, I've taken a look at starting playback from an arbitrary point in the sample file: you can find the first try on a new branch in my fork.

To use it, set up your playback objects as usual, but before you start playback, call something like playSdWav1.setPlayStart(play_start_arbitrary,22050);. This will cause playback to begin 22050 samples from the start of the file, i.e. 0.5 seconds in at the default sample rate of 44.1kHz. You still can't make a sudden jump in playback position while playing, though. Also, there's something wrong with stereo playback - I need to look into this further.
Today I tested the AudioPlaySerialFlashResmp and the sound goes really bad when setting pitch up (only one semitone and has distortion/artefacts... ) which does not happen with the SD player. Also in the serial flash player, with this last release my teensy gets stuck if I try to play with the loop on, this does not happen with the previous one.
 
Today I tested the AudioPlaySerialFlashResmp and the sound goes really bad when setting pitch up (only one semitone and has distortion/artefacts... ) which does not happen with the SD player. Also in the serial flash player, with this last release my teensy gets stuck if I try to play with the loop on, this does not happen with the previous one.
You might want to try increasing the number of buffers and their size in ResamplingSerialFlashReader.h:
Code:
#define RESAMPLE_BUFFER_SAMPLE_SIZE 512
#define RESAMPLE_BUFFER_COUNT           7
This might help the "sound goes really bad", could help the loop issue too. I don't have serial flash fitted so can't test this anyway, so won't bug you about the Forum Rule to post a small complete program that compiles with the Arduino IDE and demonstrates the issue...
 
I see you made a lot of changes and improvements in this topic.
Could you point me to the best/most recent version of your various branches to try to adapt for my scenario, meaning playing polyphonic, pitched samples from SerialFlash ? (or even SD Card)
 
I've changed nothing since post #100, so https://github.com/h4yn0nnym0u5e/teensy-variable-playback/tree/feature/set-start-point is the most recent (October 2023). Best? Who knows? It seems to take months to get any feedback on changes, and even then it's never in the form of a sketch I can compile to reproduce any apparent issue...

I can see Nic's made a few changes, which appear at first glance to be unrelated, but enough to require some conflict resolution if one were to try to get to the point of submitting a pull request. As far as I know his repo doesn't have any of my adaptations to improve playback from a filing system.
 
I've changed nothing since post #100, so https://github.com/h4yn0nnym0u5e/teensy-variable-playback/tree/feature/set-start-point is the most recent (October 2023).
I can see Nic's made a few changes, which appear at first glance to be unrelated, but enough to require some conflict resolution if one were to try to get to the point of submitting a pull request. As far as I know his repo doesn't have any of my adaptations to improve playback from a filing system.
Thanks so much for your quick reply.
Hopefully i have some time next week to look deeper into it. It still surprises me that so few? users seem to have any interest in this topic, even it is the only way to produce pitched samples on the teensy - looks like the teensy is not that commonly used in this field or somehow really few people are interested in playing pitched samples at all with it.
 
live sequencer

LSEQ.png

 
Back
Top