Home made drum kit - How can I speed up the response time after my sensor gets triggered?
This is not really a 'solution', but it might help you in finding out where the real problem is.

Check out which of the statements in the loop function uses up the most time, probably;


int fsrADC = analogRead(FSR_PIN);
Serial.println(String(fsrADC));
snare_file = SD.open("606snare.wav");
while (snare_file.available()) {   
snare_file.read(snare_buffer, 1024);
Audio.prepare(snare_buffer, 1024, 1024);
Audio.write(snare_buffer, 1024);
snare_file.close()


Try improving the most time consuming item if possible.

Some possibilities you can try in the steps above:


Do not use AnalogRead but direct port commands
Remove this completely or at least remove the String instance.
Not much you can do here, except not using a file system but raw SD read (you might have problems getting the files on your SD) without a dedicated program on your PC
Not sure about improving this one
Read less bytes, although it might even worsen things. Or read the bytes BEFORE waiting on the trigger (if you know which sample will be played).
Execute the prepare as before the trigger as 5 if possible.
Not sure about this... High likely you cannot keep too many files open at the same time.


Afaik in my synthesizer (Korg Kronos), it reads from all samples the initial part, meaning it can startup the data from RAM, while the rest is read through SSD (in your case SD). However, you might not have enough memory in an Arduino for that.