octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio playback and classes


From: pantxo diribarne
Subject: Re: Audio playback and classes
Date: Thu, 4 Jul 2013 14:16:55 +0200


>
>  - The output sounds chopped, as if the signal was composed of multiple
> frames separated by zeros (or discontinuities at least). I didn't notice
> this issue before the last changes you commited.  I tried with two sampling
> frequencies for the same signal duration :
> fs = 44100;
> t = 0:1/fs:5;
> signal = cos (2 * pi * 440 * t);
> ap = audioplayer ([signal(:) signal(:)], fs);
> playblocking (ap)
> fs = 10000;
> t = 0:1/fs:5;
> signal = cos (2 * pi * 440 * t);
> ap = audioplayer ([signal(:) signal(:)], fs);
> playblocking (ap)
>
> Pantxo
>
>
>
> --
> View this message in context: http://octave.1599824.n4.nabble.com/Audio-playback-and-classes-tp4654378p4655190.html
> Sent from the Octave - Maintainers mailing list archive at Nabble.com.


The same happens to me with those particular calls. However if I
change cos to sin or if I try playing back audio files with music in
them I can hear no glitches. Can someone with better octave knowledge
then mine can comment why can this be?

If I remove the initial step from the cosine signal by windowing, with a hanning window for instance, it sounds clean (and modulated as expected):

fs = 44100;
t = 0:1/fs:5;
signal = hanning (length (t))' .* cos (2 * pi * 440 * t);
ap = audioplayer ([signal(:) signal(:)], fs);
playblocking (ap);

Ideally, the initial step is expected to produce wide frequency band contribution but localized in time. Due to the discrete nature of the signal, there must be some sort of temporal aliasing that artificially  spreads the initial step contribution on the whole signal. I can't be clearer at the moment but I'll think of this and try to be more precise.

Sorry for the noise :-)

Pantxo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]