Thursday, April 29, 2010

Function Generators

The idea for this post started from a thread on VSE, talking about the use of test equipment as electronic music instruments. There is, of course, a long history of such, actually pre-dating the invention of synthesizers per se. Significant parts of early electronic themes and soundtracks, such as the "Doctor Who" theme and the soundtrack to Forbidden Planet, were realized using laboratory electronic test equipment such as oscillators, RF modulators, and sweep generators.

The function generator I have is a Hewlett-Packard 3312A, one of the company's last analog models. (Note that the former Hewlett-Packard test instrumentation division is now owned by Aglient.) Its controls and capabilities are pretty typical for its era; I think the one I have was built around 1980. It is a solid-state, purely analog device. Here is a look at the front panel:



The front panel is divided into two sections: the main generator section, and a modulation generator section. The left two-thirds of the panel contains the controls for the main generator:



The big knob on the left is the frequency control, which moves through a range of 0.1 to 1 to 13. The big plastic dial is part of the knob and rotates with it. The frequencies available are chosen by pressing one of the nine decade buttons across the top, which provide ranges (with the frequency knob set to 1) from 0.1 Hz to 1 MHz. The knob multiplies the decade setting, so for example, if the knob is at the 4 position and the 1 KHz button is pressed, the output frequency is 4 KHz.

The signal generator can produce one of three basic waveforms: sine, square, and triangle. The FUNCTION buttons at the top right select the waveform. There are several controls that can modify the waveform. The first and most basic is the amplitude control. This consists of two nested knobs; the inner knob is a rotary switch that selects a peak-to-peak voltage range of 10 mV, 100 mV, 1V, or 10V. The outer knob is a vernier control that varies from 0 to the selection of the inner knob.

The symmetry control, to the right of the amplitude control, varies the generator's time base such that other derived waveforms can be produced. The knob is only effective when the blue "CAL" button in the middle of the knob is out; when it is pressed in, the waveform is symmetrical and the knob's position is ignored. It effects all three waveforms. When square wave is selected, the symmetry knob serves as a pulse width control. For the triangle wave, the knob at its extremes produces ramp and sawtooth waves. Here's an example of the symmetry being varied from triangle to ramp:


Audio -- click here

With sine selected, it produces various distortions of the sine wave; turning it all the way to either extreme produces a waveform that moves through half of a sine wave and then jumps back to the starting point. Example:


Audio -- click here

I noted the pitch variations caused by the use of the symmetry knob. As I understand the circuit (I still need to look at it some more), the generator core is a triangle-core VCO, with separate integrating capacitors for the positive-going and negative-going halves of the waveform. The symmetry control works by varying the charging current for the two capacitors; it increases one to speed up that half of the waveform, and decreases the other to compensate so that the overall wavelength, in theory, remains the same. Apparently that process isn't perfect, or perhaps my unit is just in need of calibration.

The offset knob adds a negative or positive DC offset, when the blue CAL button is out. Offset can range up to +/- 10V, but the manual cautions that if it causes the waveform to exceed 10V in either direction, clipping and possible damage to the output circuit will result. Pressing the CAL button in cancels the offset. The phase knob is used to produce non-continuous waveform bursts. I'll get to that in a minute; for now, note that it has to be in the "free run" position in order for the generator to run.

The waveform emerges from the jack under the amplitude control. Note that all of the jacks on this unit are BNC (bayonet) jacks, which are common in test equipment but not generally used in synths or audio production, so you'll need an adaptor. Also note that the settings on the amplitude control are rated for connecting the output to a 50-ohm load. Most synths and audio equipment have a much higher input impedance than this, which means that the peak-to-peak output voltage will be higher than indicated by the knob position. You'll have to tweak the amplitude control to get the output level than you want, and avoid clipping. The jack to the left, marked "sync", outputs a square wave whose trailing edge is at the positive-going zero crossing of the main output waveform. This can be useful for syncing other oscillators or sequencers.

The area occupying the right 1/3 of the panel is the modulation section:




The modulation section contains all of the circuitry needed to do amplitude modulation (AM) or frequency modulation (FM) on the main generator's waveform. It also contains its own low frequency oscillator to use as a modulation source. The three buttons at the upper left allow the selection of AM, FM, or sweep (labeled SWP) generation. These are not radio buttons; they are individual on-off switches, and any combination can be selected. To the right of those buttons, the next three allow selection of the LFO waveform: sine, square, or triangle. A concentric control underneath the waveform selection buttons controls the LFO frequency: the outer knob is a four-position rotary switch that can select a range of up to 1 Hz, 100 Hz, or 10 KHz. (The 0 position is for setting up the sweep function; it "freezes" the LFO at a zero crossing point.) The inner knob is a vernier that allows selection of the desired frequency within the selected range.

The knob directly underneath the modulation selection buttons (the one with the little arrow) controls the amount of modulation. The modulation generator has its own symmetry knob, whose CAL position is a click-stop at full counterclockwise rotation. The BNC jack in this section is both an input and an output; when the internal LFO is in use, its waveform is output from this jack. When external modulation is selected (by partially depressing and then releasing a waveform selection button, so that all three of the sine, square, and triangle buttons are out), it is input via this jack.

The AM is powerful and useful; both the modulation generator and external modulation can achieve 100% modulation of the generator output (from 0V output to maximum output). AM is a very useful capability which is seldom found on commercial synths for some reason. Here's an example of a triangle wave being AM modulated with a square wave:


Audio -- click here


The FM mode, on the other hand, is limited to +/- 5% of the carrier frequency. Audio FM synthesis usually requires far more modulation than that, so this is not very useful from a musical perspective. (There is another way to do it, which is described further down.) Example of a sine wave, FM'ed with a square wave (the photo is a multiple-trace exposure):


Audio -- click here


The "sweep" modulation mode is one of those things that is common and useful for the function generator's intended purpose, but rather peculiar when viewed from a musical standpoint. In this mode, basically the modulation generator creates a ramp wave which can FM the main generator from the minimum to the maximum frequency for the frequency range selected. The starting frequency, ending frequency, ramp rate, and time between sweeps are all controllable. There are several controls which have alternate purposes in the sweep mode (which unfortunately are not labeled on the panel). First, the modulation frequency control's range switch must be set to the 0 position. Once this is done, the modulation percentage knob sets the starting frequency of the sweep. The modulation symmetry control sets the rate of the sweep, and the main frequency control sets the ending frequency. The modulation frequency vernier sets the repetition rate. The controls interact to an extent, and I had to do a fair amount of experimenting to get something that would be illustrative when viewed on the scope. I finally settled on a high frequency triangle wave with a fairly slow repetition rate for the scope photo. The audio sample is a mix of different settings.


Audio -- click here


The one other interesting mode of operation is the "burst" mode. In this mode, the function generator can be made to produce either single-cycle waveforms, or short bursts of waveform separated by periods of 0V output. The burst mode is activated by turning the main generator's trigger phase knob (below the symmetry knob) away from the "free run" position.

Two switches and a jack on the rear panel come into play: the slide switch at the upper left of the rear panel selects the single-cycle or multi-cycle burst mode. The switch below it selects internal or external trigger. With single cycle and internal trigger selected, the main generator will output one complete cycle of whatever waveform is selected, repeating at a rate determined by the LFO in the modulation section. The trigger phase control determines the starting and ending phase of the cycle. With the single/multi slide switch set to multi and internal trigger selected, the square wave of the modulation LFO gates the main generator on and off. When the LFO square wave goes high, the main generator starts at the phase selected by the trigger phase knob and continues to output until the LFO square wave goes low. When it does so, the main generator completes the cycle it is on and then stops. In either single or multi mode, when the trigger switch is set to external, gating of the main generator is controlled by the signal input at the rear panel EXT jack. This signal needs to be at "TTL" levels; that is, 5V for the high state, and 0V for the low state. Here's an example of the burst function at work, with the triangle waveform, and with the phase control and burst interval being varied. The first two-thirds is multi-burst mode; the last portion is single cycle burst mode.


Audio -- click here

Same as above, but with a different starting phase setting:




The rear panel VCO jack provides for a control voltage to control the main generator frequency. Unfortunately, the signal format is not even slightly compatible with the 1V/octave standard used in most synths. Basically, with the frequency control set at its minimum position, the VCO input does what the frequency control does; that is, it varies the frequency from the minimum to the maximum for the frequency range selected. All of the ranges constitute 10:1 ratios between maximum and minimum frequency, so if you do the math, that's slightly over three octaves. However, the VCO input is linear, that is, it is a V/hertz input. The scaling is about 0.2V per one-tenth of the frequency range (so, for example, if the 10 KHz range is selected, it's 0.2V per 1 KHz.) It also uses negative voltages; the minimum frequency is at 0V and the maximum is at -2V.

To wrap this up: Just for fun, here's a mix of the six sample waveforms: Audio -- click here

No comments: