audioplayer function: clicks during playback of sine waves
Mostra commenti meno recenti
I'm using audioplayer to generate sound from a series of sine waves (~200 - 500 Hz). My sample rate is 2KHz and each wave is played for 500ms. I'm presenting 16 waves, in series. However, the playback is riddled with audible clicks. These are not at the transition points between each consecutive wave. If I play the wave series (x) directly using 'sound(x, 2000)', I get no clicks. If I write the sounds to a .wav file, I get no clicks and the waveform looks clean in a sound file editor. The clicks are independent of output device also.
Risposta accettata
Più risposte (1)
Daniel Shub
il 15 Giu 2012
0 voti
That is because MATLAB sound support is essentially broken. Look for some of the answer on the site referring to port audio.
Also note that with a 2KHz sample rate you are going to get aliasing.
1 Commento
Walter Roberson
il 15 Giu 2012
Why would there be aliasing when the sample rate is at least 4 times the frequency? I would expect aliasing if the sample rate was not at least twice the frequency?
Categorie
Scopri di più su Audio and Video Data in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!