DSPRelated.com
Forums

Transitional samples in AFSK encoding

Started by anonymouse September 13, 2011
I wrote an AFSK encoder but am unhappy with it. I did the math to find
a sample rate where it would be an integer number of samples based on
the bitrate so the math is easy. I would prefer to be able to use an
arbitrary bitrate and sample rate instead.

I am wondering what the best practices method would be for these
transitional bits. For example let us assume I have the following
samples to send:
Space 20.3 samples
Mark 20.3 samples

Sample 21 is 0.3 space, 0.7 mark.
Sample 41 is 0.6 mark, 0.4 silence

What is the best way to encode those two samples without damaging the
output? I realize that with a high enough sample rate it would not
matter for most things, 44.1khz sample rate for example each sample is
only 0.02ms, but I would rather do it right than have garbage in the
output.

For sample 21 I am guessing (SPACE_FREQ*0.3)+(MARK_FREQ*0.7)
For sample 41 I am guessing (MARK_FREQ*0.6)

Is this correct? Is there anything that would be considered better/best
practice?

Thanks