
                                Retune.txt
                                By Robert Dick
                                rdick@writeme.com

    The program "retune.asm" runs on the TI DSK3.  It is an automatic
    tuning-corrector for mistuned single-sideband suppressed-carrier (SSB)
    voice signals.  Before the author's work SSB tuning had to be done
    by prior agreement on the (missing) carrier or by trial and error
    using a human listening to judge if the result sounded right.

    The author has explained the principle of operation of his SSB tuner
    in an article published in the Jan/Feb 1999 issue of QEX magazine for
    radio amateur experimenters sponsored by the American Radio Relay
    League (ARRL), Newington, CT 06111, USA.  The present program follows
    the C language code of that article closely, except that in this DSK3
    implementation the "aafilt" anti-aliasing filtering is done by the
    AIC hardware, rather than by software.

    The program is generally successful on human speech shifted anywhere
    from about 100 Hz down to about 770 Hz up.  It continuously applies
    a (tuning correction) frequency shift using a 31-tap Hilbert transform.
    Every eight seconds it adjusts this correction.  The technique involves
    both t->f and f->t fast Fourier transforms (FFTs) and use of a 
    frequency-domain histogram.  The tuning is generally accurate to within
    two or three Hz.

    The software and data memory just fit into the DSK3.  In fact, they
    could be improved were more memory available.  The DSK3 has time to
    spare.  In fact, it spends a majority of its time idling waiting for
    data.  There are three modes of operation, with mode selection 
    controlled by the contents of AR6.  AR6 < 0 is pseudorandom shift
    mode, useful for generating test recordings to exercise the retuning.
    In this mode, once each minute a shift frequency is selected at
    pseudorandom.  AR6 == 0 is constant shift mode.  (Integer) content of
    AR7, taken to be in Hz, is used as the shift.  AR6 > 0 is automatic
    retuning mode.  The program default is AR6 == 1.  The software puts
    out a DC level which is nominally 100 millivolts plus the frequency
    shift in Hz multiplied by 0.1 millivolt.  However, the AIC DAC has
    an output bias on the order of -40 millivolts which varies somewhat
    from unit to unit.  The software does not compensate for this bias.

    The tuner principle of operation is in the public domain because the
    author developed it during US Government-sponsored research. He has
    donated his time and effort for both the QEX article and this DSK3
    implementation.  If you like this work why not send him an Email
    telling him so?
