[net.music.synth] Harmonizer guesswork tutorial

janzen@pldvax.DEC (Tom J. LMO2-1/E5 279-5421) (03/25/86)

The Mail daemon got me when I tried to mail this to the asker, so I sent
it to the newsletter.
I do not know the details of fine harmonizers, except I think they may
suppress the natural flutter of these devices.  If you listen closely to 
Laurie Anderson doing her low voice, you can hear about a 10Hz flutter,
so it may be that the major differences between expensive and inexpensive
harmonizers are the most important parameters is DSP: sampling rate and 
sample word size.
Possibly the worst harmonizers use CCD memories, and the good ones are
digital with high sampling rates.  Since harmonizer outputs are 
typically spec'd
at +/- 1200 cents (it can change pitch from an octave higher to an octave 
lower), the output sample rate may be from half to double the input rate.  
Therefore, it may be desirable to use a doubly high sampling rate on the input, 
say, 88kHz.  I am going to build a chintzy digital harmonizer (8 bits companded,
ca. 30kHz or so)  to learn how to use one, because the cheapest ones are $540, 
and I think I can do it for $100 or less.  

The Radio Shack Variable Speed cassette deck has a CCD harmonizer in it
I think, although it may be digital.  The harmonizer is all
on one chip.  It is used there to allow you to adjust the pitch of a 
recorded lecturer when you listen to the tape at a different speed
(usually faster, so you would lower the pitch to make it seem more natural).

The technique of harmonization can be compared to an imaginary 
tape-based process:

1: Record yourself saying "hello Sam" at 7.5 inches per second.
2: Play it back at 3.75 ips.  It is an octave lower, but, alas, it is
twice as slow as well.
3.  Ah, hah!  Use a razor blade to cut out every other 1/8 inch of
tape (pretty impossible, I imagine).  Throw away every other 1/8 inch, and
splice together in order the remaining every alternate 1/8 inch piece of tape.
4.  Now play the resulting tape, which has only althernating 1/8 inches of
the original, at 3.75 ips.  It is still an octave lower, but it takes the
same length of time as the original.  It has been harmonized an octave lower.

If you  wanted to raise the pitch, you must duplicate the tape and
splice the duplicate 1/8" pieces next to each other, so that each 1/8 inch
piece is played twice before going to the next one.  The tape will take the
same length of time to play but be at a higher pitch (when played at 15 ips).

In a digital harmonizer, I guess (but I am a good guesser), data from the
line in and the ADC are stuffed into a little RAM, say 8K words.
The reader steps through the RAM at VARIABLE rates and plays whatever is 
where it is pointing.  It is almost exactly like the tape.
So the RAM writer and the RAM reader are asynchrounous, and both access
the RAM and should be arbitrated in some way.  Modern dual-ported video RAMs
could be very useful in musical electronics because they eliminate the need for
arbitration between a separate reader and writer.

A CCD harmonizer is like a swiss watch, an intricate machine.  Since the rate of
reading and writing must always be the same at a given instant for CCDs, 
there are TWO parallel CCD circuits doing the same thing 180 degrees out of
phase.  The clock for the CCD can be from a VCO controlled by a ramp.  To 
lower the pitch the ramp (about 10Hz) falls slowly down and suddenly 
rises to its peak.  This makes the clock (twice the sample rate, or about
40kHz) slowly fall in frequency.  That way, the output
of the CCD is always coming out at a slower rate than it went in, except
just after the fast ramp up.  That's why you need the other CCD working.
An analogue switch switching back and forth at about 20Hz chooses which CCD 
is putting out correctly pitched signals while the other resets to the top 
of the ramp.  There are two ramps, two VCOs, two CCDs, in parallel,
and a switch to select one CCD or the other.
Tom Janzen DEC 111 Locke Dr. marlboro MA 01752