I am going to make an audio project inwhich I need to assess so many audio file(1-3 second long each) from SD card.
If it requires low latency to trigger for all audio files and some need to be playing seamlessly loop mode with playback speed control .
what type is needed on SD card ( .wav ?/ .raw ?) or any more??
I am new to Teensy audio project.
Finally I will create many Banks.
where Each bank will contain [ 24 mono Audio files]
[ 12 drum loop files(each 1-3 seconds long) one time only one file will be played. (Mono_mode) ]
[ 12 drum sounds to be play along with running drum loop file (poly_mode) ]
I am using Win7 32 bit/Arduino 1.8 .19
I have received Teensy 4.1 + audio shield Rev d .I tested it with SD Card. It is working play .wav and .raw file .
to play loop mode i use this code from built-in example
after upload code, i got file is being played in repeat mode with a small gap (not seamlessly)
to get low latency i tried text replace in line54 from
with
after upload code, i got No sound from Audio board but getting (USB disconnected sound from PC) repeatly after few seconds.
Do i need special audio library to my project???
Do i need to do modification in .cpp / .h files for above functions???
Please suggest me with code example simple way .
like , how a sd wav file is trigger with minimum low latency, how to play audio file in seamlessly Loop mode.???
thank you....waiting hint examples... thank you
If it requires low latency to trigger for all audio files and some need to be playing seamlessly loop mode with playback speed control .
what type is needed on SD card ( .wav ?/ .raw ?) or any more??
I am new to Teensy audio project.
Finally I will create many Banks.
where Each bank will contain [ 24 mono Audio files]
[ 12 drum loop files(each 1-3 seconds long) one time only one file will be played. (Mono_mode) ]
[ 12 drum sounds to be play along with running drum loop file (poly_mode) ]
I am using Win7 32 bit/Arduino 1.8 .19
I have received Teensy 4.1 + audio shield Rev d .I tested it with SD Card. It is working play .wav and .raw file .
to play loop mode i use this code from built-in example
Code:
void loop() {
button0.update();
button1.update();
if (button0.fallingEdge()) {
playWav1.play("12.WAV");
Serial.println("12 Wav running");
pad=1;
}
if (button1.fallingEdge()) {
playWav1.play("13.WAV");
Serial.println("13 wav running");//
pad=2;
}
if(!playWav1.isPlaying()&pad==1) { playWav1.play("12.WAV"); }
if(!playWav1.isPlaying()&pad==2) { playWav1.play("13.WAV"); }
if (Serial.available() > 0) {
int incomingByte = Serial.read();
if (incomingByte == 51) { Serial.println("stop"); playWav1.stop(); playWav2.stop(); pad=0; }
}
}
to get low latency i tried text replace in line54 from
Code:
C:\Program Files\Arduino\hardware\teensy\avr\cores\teensy4\AudioStream.cpp
C++:
#define AUDIO_BLOCK_SAMPLES 16
Do i need special audio library to my project???
Do i need to do modification in .cpp / .h files for above functions???
Please suggest me with code example simple way .
like , how a sd wav file is trigger with minimum low latency, how to play audio file in seamlessly Loop mode.???
thank you....waiting hint examples... thank you