audioplayer function: clicks during playback of sine waves
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Daniel Shub
le 15 Juin 2012
0 votes
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 commentaire
Walter Roberson
le 15 Juin 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?
Catégories
En savoir plus sur Audio and Video Data dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!