Re: Sample-rate conversion
Re: Sample-rate conversion
- Subject: Re: Sample-rate conversion
- From: Jens Bauer <email@hidden>
- Date: Wed, 4 Feb 2004 20:33:47 +0100
Hi Paul,
On Wednesday, Feb 4, 2004, at 10:27 Europe/Copenhagen, Paul Kellett
wrote:
Jens Bauer <email@hidden> wrote:
I pull around 79 or 80 samples from the 3.5MHz signal add them up,
averaging them by dividing them by # of samples read (say 80), then I
multiply them by the playback volume, and store them in the left+right
channel (mono).
The signal I am converting, is a square signal, which can be either hi
or lo.
Maybe you should ask the music-dsp mailing list about this (even if
your
square signal isn't music!)
Averaging 80 samples makes a lowpass filter - not a good one (which is
why the output has some alias frequencies in it) but enough to distort
the transitions of your square wave. You need to choose the right
filter depending on how well the waveform shape needs to be preserved,
and how much aliasing (wrong frequencies present in the output signal)
is acceptable.
If you know your signal is square and at an audio frequency, and is
a data stream rather than something you want to listen to, maybe you
can save some calculation - each block of N samples must be all high,
all low, or contain one transition.
I know this, as there will never be noise from my source. The out
states are repeated N times, and will most likely be between 300 and
3000.
It might be better to detect the
transitions and synthesize a new signal from them.
Now I think I'm starting to get a feeling about where the problem
actually is.
It's still not so clear to me that I can put words on it, but I know
approximately what to investigate. =)
Thanks for your help, I appreciate it very much! (this applies to all
of you!)
Love,
Jens
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.