Teensy3.1 PlayWavSDcard Beeps

Status
Not open for further replies.

Teenfor3

Well-known member
I have Teensy3.1 with audio shield running the example PlayWavSDcard sketch. When I play the sound file from the SD I get a short beep as the file starts to play. I generated a square wave tone file in Audacity stereo 16 bit 44.1 and it plays OK as a clean sound no crackling except for the beep at the start. The type of sound I get is "Be Beeeeeeeeeeep" instead of "Beeeeeeeeeeeeeep" for the tone only, it is only 10 seconds long. I have tried several files and faded the sound in at the start and even created abou 0.5 seconds silence at the start and still get the "Be Beeeeeeeeeeep". Is this due to reading the file header or likely to be something else..???
 
I haven't noticed any extra beeps but I do notice one, and sometimes two, clicks while a sound effect is playing. I've checked these same files on my PC and they playback clean.

Pete
 
I had one file that would click the second time it played. After hours of troubleshooting I reformatted the sd card and it solved the issue... pretty strange.
 
Yes I am still getting the problem although when the file starts playing it sounds good and clean. I get a short blip as the file stars to play, just like a tap -tap.
I plugged the output of the board into my PC line in on the sound card to try and record what was happening and looked at the wave in audacity. I can see several short bursts of high frequency just before the file waveform starts, then I can then see the whole of the waveform (my square wave tone file) being played. I can see the start bit I faded in so all of the file is being played. The bursts come before the faded in bit starts to play. I could attach it but don't know how to attach a wav file...?????
 
The bursts of high frequency come from the SD.begin(10). This is in setup so only get it once at start if wave.play comes after it. I put a series of wave.play sounds in the loop with delays between the plays and stops and still get the double beep at the start when each sound starts playing. The code is from the example PlayWavSDcard with my additions in the loop.....??????? Each sound play smoothly except for the Beep beep at the start of each sound...??????. Iam using the teensy3.1 stacked on the audio adaptor powered by USB lead.


void setup() {
// Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example
AudioMemory(5); //set memory allocation

audioShield.enable();
audioShield.volume(20);

SPI.setMOSI(7);
SPI.setSCK(14);
delay(1000);



if (SD.begin(10)) {

}
}

void loop() {
// float vol = analogRead(15);
// vol = vol / 10.24;
// audioShield.volume(vol);
// delay(20000);

delay(2000);

wav.stop();

delay(1000);

wav.play("L1.WAV");

delay(2000);

wav.stop();

delay(1000);

wav.play("L2.WAV");

delay(2000);

wav.stop();

delay(1000);

wav.play("L3.WAV");

}

==========================
 
Status
Not open for further replies.
Back
Top