FORMANT FILTERING [Practical Electronic Filters]

Home

AMAZON multi-meters discounts AMAZON oscilloscope discounts

Previous sections have described different types of filter. This section describes a special way in which these types of filter are used. Formant filtering is a way of producing musical effects and is often used in electronic keyboard instruments and electronic percussion sets. Filtering is always a matter of filtering out or removing various components of a composite signal. In formant filtering, which is applied only to audio signals, we begin with a signal and remove certain components from it, to give the resultant signal distinctive characteristics.

Often the characteristics are those which make the signal sound like a specific musical instrument. However, we also use formant filtering to produce musical sounds that can not be produced in other ways.

Harmonics

Before explaining how formant filtering is done we must describe how musical sounds are produced. One of the simplest ways of producing a musical sound is to pluck a taut string or wire. This is the basis of the guitar. The members of the violin family are played by bowing the string to transfer energy to it and make it vibrate.

A string can vibrate in a number of ways, as shown in Figure 63. The most obvious way is that shown at (a). The frequency of vibration depends inversely upon the length of string vibrating; the longer the string the lower the frequency and the lower the pitch of the note. In (a) the two ends of the string are at rest but the whole string between them is vibrating. This is the maximum length that can vibrate and therefore this is the lowest frequency obtainable, given that other factors, such as the tension in the string, are not to be altered. We call this the fundamental frequency, and refer to it as f, measured in hertz.


Fig. 63


Fig. 64. Frequency spectrum of a 'cello.

A string may also vibrate so that not only are its ends stationary but also a point exactly half way between its ends.

We call such a stationary point a node. This in effect divides the string into two halves (Fig. 63(b)), so the string vibrates with double the fundamental frequency, 2f. A doubling of frequency is referred to as an octave (page 22), so the string is producing a note pitched one octave above the fundamental.

We refer to this note as the second overtone, or second harmonic. The string is able to vibrate in both ways simultaneously so it produces both the fundamental and the second harmonic at the same time. The two modes of vibration are not necessarily equal in amplitude; usually the fundamental is the louder of the two.

Figure 63 also shows higher modes of vibration with the string vibrating in thirds (c) and quarters (d). These modes give the third and fourth harmonics with frequencies 3f and 4f respectively. The 4f note is an octave above the 2f note, and the 3f note comes between them. This is a fifth (in the musical sense) in the next octave above the fundamental so that if, for example, the fundamental is C, the 2f note is C; and the 3f note is G*. The string also vibrates with higher modes (5f, 6f, 7f, etc.), not shown in the diagram.

The relative loudness (or amplitude) of the fundamental and harmonics may be represented in a frequency spectrum, as in Figure 64. Here the vertical lines are plotted on a frequency scale, their heights being the relative amplitudes in decibels. In the example shown, the cello, it is noted that the fundamental is not the loudest component of the sound.

Although the basic sounds originate from the vibrating strings of the instrument, the body of the cello resonates at a number of frequencies, thus enhancing certain harmonics but not others. The relative loudness of the harmonics gives the total sound of the cello its own particular timbre, different from that of other stringed instruments. The second harmonic (2f) dominates the sound, while 3f, 4f and If are relatively strong. The relative strengths may change slightly, depending on which note is being played.


Fig. 65. Frequency spectrum of a clarinet.

Figure 65 shows the spectrum of a clarinet. In this, the fundamental is the strongest component and, for the first few harmonics at least, the odd ones (3f, 5f, 7f) are appreciably stronger than the even ones (2f, 4f, 6f, 8f). This is a consequence of the modes of vibration favored by the column of air in the clarinet. By contrasting Figures 64 and 65 we begin to see why a cello sounds differently from a clarinet, even if they are playing the same note. On the other hand, the spectrum of a double-bass is very much like that of a cello, making the two instruments difficult to distinguish, except by knowing that the cello plays in a higher register than the bass and has higher-pitched resonances.

Filtering in Action

In order to reproduce the sound of a musical instrument such as a cello, we must begin with a signal that contains the fundamental and all the harmonics. It is preferable that this basic signal is one that is easy to produce electronically. Fortunately, some of the signals that are easiest to produce are rich in harmonics. The square wave is easy to generate but its limitation is that it contains only the fundamental and the odd harmonics (f, 3f, 5f, 7f, etc.). Formant filtering to produce the cello sound involves adjusting the relative proportions of the component frequencies to match the spectrum of Figure 64.

As it happens, few instruments other than woodwinds have a spectrum dominated by odd harmonics, so the square wave is of limited use. As Figure 65 shows, the clarinet produces even harmonics too, so a square wave filtered with a low-pass filter to reduce the higher harmonics does not sound exactly right. One way of improving the realism is to use two square waves, one running at double the frequency (2f) of the other.

The double-frequency wave is mixed in at lower amplitude to add the even harmonics (2f, 4f, 6f, etc.) to the spectrum.

The triangle wave is similar to the square wave in harmonic composition, except that there is not such a great reduction in the strength of the higher harmonics. The sound is brassy and can be filtered to give a reasonable simulation of the brass instruments.

The best source that contains both odd and even harmonics is the sawtooth wave. Unfiltered it has a brassy sound and, with band-pass filtering, is used for the trumpet. With a high-pass filter to retain the higher harmonics and slightly reduce the fundamental (Fig. 64), it gives a realistic cello sound. The sawtooth wave is the most useful basic waveform. Another waveform commonly used is the pulsed wave, a square wave in which the mark/space ratio is not 1:1. This contains all the harmonics and has a reedy quality.

Further Modifications

Formant filtering is not enough to give a completely realistic effect. Reproducing a typical sound spectrum creates the distinctive timbre but there are other features by which we learn to recognize a specific instrument. Principal among these is the amplitude envelope. This is the way in which the amplitude of the sound varies during the playing of a note. Simply to turn the sound signal on and off merely produces a 'beep'. By contrast, the volume of sound from a violin increases gradually as the string is bowed and begins to vibrate. We say the rate of attack is slow. What happens next depends upon the intention of the player but usually the amplitude falls slightly from its initial peak; this is the release phase. Then it is sustained at a fairly constant though lower volume. Finally, when bowing ceases, the volume dies away, or decays rather more rapidly. This sequence of attack, release, sustain and decay is met with in all musical sounds, but the rates of change and the duration of each phase may differ. When a note is played on a piano, the string is struck by the hammer and the volume reaches it maximum level almost immediately. Attack is rapid, but decay may be relatively slow, particularly if the dampers are held off the strings. Projects 8 and 9 at the end of this section show how the filtered sound is modified in this way to produce a more realistic effect. To simplify the circuits we have concentrated on the attack and decay phases, particularly the former. This is because the human ear (or brain?) is most influenced by the rate of attack, and uses mainly this to identify the apparent source of sound.

Although both violin and cello sounds are produced by similar filtering, the attack of the cello is slower than that of a violin, and this is how we distinguish them.

Certain instruments are recognized also by particular features of their sound, often acquired by the method of playing. One well-known feature is vibrato, in which the pitch of a sustained note varies slightly up and down regularly while the note is being played. This may be achieved electronically by modulating the input signal to a voltage-controlled oscillator. A low-frequency waveform from an oscillator running at a few hertz is used for this purpose. Another effect is tremolo, in which the volume of the sound is varied regularly, as in bells and chimes. In more complex circuits the characteristics of the filter are altered during the period of the sound.

For example, the sound of brass instruments is made more realistic if the higher harmonics are present during the attack phase but are filtered out during the decay phase.

Filtering Noise

Many of the percussive instruments, such as the various types of cymbal, the xylophone, the glockenspiel, and the triangle have a very complex sound spectrum. The mode of vibration of these is so complicated that any pattern of regular harmonics may be almost indistinguishable. To a greater or lesser degree their spectra are a-harmonic. This makes it difficult or impossible to synthesize the sounds of many of them. One approach is to take as the original sound signal one that contains all frequencies. This is the purely random hissing noise usually known as white noise. This is generated electronically by relying on the random movements of the electrons in a semiconductor, usually in a reverse-biased pn junction, and amplifying the electrical effects of these motions. In the project we use the base-emitter junction of a transistor, but it is also possible to use a reverse-biased Zener diode.

Unfiltered white noise sounds like rushing water or escaping steam. If we filter it and apply an amplitude envelope, we obtain sounds near to those of some of the percussion instruments. Those instruments which have an entirely a-harmonic spectrum are the easiest to imitate. Project 9 shows how to simulate cymbals, hi-hat and the sound of a drum being played with wire brushes.

PROJECT 8--Musical Box

There are a number of inexpensive ICs that are pre-programmed to play a selection of popular tunes. The simple ones are intended for use in 'musical greetings cards' while the more complicated ones are for use in door-chimes and similar devices. The latter can often be set up so that they play one tune when there is someone at the front door and a different tune for the back door. There are a number of circuits published, either employing these ICs or in some other way producing a short musical output.

Usually the musical signal produced by such devices is a series of square-wave notes or 'beeps'. This project adds another dimension to the sound. The sound is filtered to give it interest, and possibly to make it sound more like a recognizable musical instrument. For this purpose the circuit incorporates an amplitude envelope generator. The project can be used as the heart of a novel musical box, or it can be used as a door alert or for any purpose where a signal is required on the pressing of a button. It can also be used as a convenient signal source for anyone wanting to try out the effects of various filtering techniques, either as a matter of general interest or with the idea of eventually building them into an electronic keyboard instrument or synthesizer.


Fig. 66


Fig. 67

Level 2--How It Works

The description assumes that the musical signal is being produced by the simplest of the ICs, the UM66. This is available in several versions, each producing a different tune or selection of tunes. The UM66 (IC1, Fig. 66) requires a power supply between 1.5V and 3.5V. We provide it with 2.5V, using the band-gap voltage reference, D1. The tune is played once when power is switched on. To repeat the tune the power must be switched off momentarily. This can be done by turning off the whole circuit, and this method is probably better when the circuit is being used as a door alert.

For other applications the optional push-to-break button S1 interrupts the supply to the IC when briefly pressed.

The biggest problem in using signal sources such as the UM66 is that there is no easy way of knowing when each note begins. It is important to know this because otherwise it is not possible to shape the envelope of each note correctly. In this circuit the problem is solved by using a phase-locked loop, IC2. The essential property of a PLL is that it locks on to any signal in its frequency range. The PLL contains a voltage-controlled oscillator which is made to oscillate at the same frequency as the incoming signal. This is done by using a built-in comparator to match the incoming signal against the signal from the VCO. The comparator generates a voltage which is applied to the VCO, through a filter (R3, R4, C3). The input to the VCO (pin 9) is thus varied until the VCO is operating at the same frequency as the incoming signal. If the frequency of the incoming signal changes, or if there is a gap between notes, there is a sudden change in the input at pin 9 until the VCO has been brought into phase with the next note.

This takes only a fraction of a second but, by monitoring the voltage being sent to the input of the VCO at pin 9, we can tell when the input signal changes in frequency. In other words, we can tell when one note has ended and a new note has begun. We use the output of the VCO, at pin 4, as the musical signal. This has the same frequency as the original signal from IC1, and has the advantage that if the original signal is 'noisy5 or poorly shaped, it will have been squared up by the VCO.

While a note is sounding, TR1 is held on, but the brief fall in voltage between notes turns it off. This produces a low-going pulse which triggers the next IC into action. This is a timer (IC3) wired to give a single high output pulse of constant length whenever it is triggered. The length of pulse is adjusted by the setting of VR1. When the pulse goes high, current flows through VR2 and D2 (Fig. 67), charging C6. The rate of charge depends on the setting of VR2, which thus determines the attack rate of the note. If the pulse is longer than is required to fully charge C6, the charge on C6 remains steady for the remainder of the pulse; this gives the sustain phase of the note. When the pulse ends, C6 gradually discharges through VR3. The rate of discharge, and hence the rate of decay of the note depends on the setting of VR3.

When a capacitor is charged through a resistor from a supply at fixed voltage, the rate of charge falls off more and more rapidly as the voltage across the capacitor approaches that of the source. This makes it impossible to obtain an attack that rises steeply throughout the phase. This is the reason for using the amplifier IC4. This amplifies the voltage across C6 so that the output from the amplifier corresponds only to the initial stages of charging, during which the voltage is rising rapidly. The discharge phase is relatively unaffected, allowing for a slow decay.

The output of IC4 goes to the control terminal of IC5, which is a transconductance amplifier. The current produced by this amplifier is proportional to the difference in voltage between its input terminals. The voltage at the (-) input is held steady and the musical signal is presented to the (+) input. The amplitude of the signal current coming from this amplifier depends on the voltage present at the control terminal. Thus the musical signal is modulated by the attack-sustain-decay envelope. Part of the current from IC5 becomes the base current of TR2 which undertakes the first stage of amplification of the modulated musical signal. The second stage of amplification makes use of a Darlington pair, TR3 (shown as a single transistor in Fig. 67). This provides sufficient power to drive a small loudspeaker producing a volume of sound appropriate to a musical box. If a louder sound is required the circuit from C7 onwards can be replaced by the power audio amplifier of Figure 61.

The use of filters in this project has been left to the preferences of the constructor. The output from pin 4 of IC2 can be connected directly to R11, giving an unfiltered tone that is shaped by the envelope generator. This alone is sufficient to produce a different type of sound, illustrating the great importance of the amplitude envelope in synthesizing sounds.

The sound is given greater interest by connecting a filter between IC2 pin 4 and R11. It is suggested that this stage of development of the project is undertaken on a breadboard, using filters of various types. If a tunable audio filter (Project 5) is available, this can be used to discover the effects of filtering at different frequencies and with differing levels of Q. Section 11 describes how to build filters with specified characteristics. Low-pass filtering with cut-off frequency in the region of 1kHz produces the twangy noise of a plucked string, especially if Q is high, with rapid attack, no sustain period (adjust VR2 so that C6 is only just charged during the attack phase), and slow decay. If the decay is short the effect is more like that of a blown whistle. The use of a low-pass filter set to a few hundred hertz, with slow attack and decay is another field to explore. Also try a band-pass filter, set to 10kHz, high Q, with slow attack and decay. The sound of a bowed string is obtained by using a high-pass filter set to a few kilohertz, with low Q, slow attack and rapid decay; the main defect in this sound is that there is no vibrato, but this does not matter if the overall length of the note is moderate. More elaborate filtering techniques, such as that used to produce a clarinet effect (page 100) can also be used.


Fig. 68. Using an LED to indicate the sweep rate.

Visual Effects

A musical box may possibly be improved by adding some light-emitting diodes of several colors, flashing in time to the music. There are a number of circuits already published which use band-pass filters to switch on banks of lamps, such as disco-lamps when notes within their pass-band are played.

Such circuits can be adapted to flash small filament lamps or LEDs instead. A simple approach is to use the output from IC3 pin 3. Figure 68 shows the circuit to flash one or more LEDs wired in parallel; reduce the resistor value for more LEDs. A relay could be wired instead of the LED and resistor for switching other devices such as a motor or a solenoid to animate a doll dancing on top of the musical box.

Construction

The circuit requires a dual power supply of ±6V. A pair of 6V battery holders, each with 4 type AA cells is suitable for intermittent use as a musical box or door-alert. It requires about 150mA from each battery when using the power audio amplifier. For more protracted use a dual mains PSU is preferred. Note that the 0V rail does not appear in Figure 66; all negative-going connections in that diagram are to the -6V rail. If all that is required is to set the envelope once and for all, VR1-VR3 can be preset potentiometers. For experimental applications, use panel-mounting potentiometers, with pointer knobs.

Special Components

Integrated Circuits:

UM66 melody generator

4046 CMOS phase-locked loop

+7555 CMOS timer

LF355 JFET operational amplifier

CA3080 operational transconductance amplifier.

IC1 IC2 IC3 IC4 IC5

Level 3 PROJECT 9--Rhythm Sequencer


Fig. 69. Project 9, Rhythm sequencer, system diagram


Fig. 70. Project 9: Clock and counter.

A rhythm sequencer is a device which can be programmed to produce a regular sequence of sounds simulating percussion instruments. This project allows for a variety of sounds including cymbals, a brushed side-drum and other staccato drum-like sounds similar to bass drum, snare drum, bongos, and maracas. The circuit operates on a cycle of up to 8 beats to the bar, with variable tempo. The system diagram (Fig. 69)

shows the main sections of the circuit, but there is much scope for adding to this to give even greater programming flexibility or to omit any sections that the reader does not require. This is rated as a 'Level 3' circuit because it has many parts and care is required in planning and laying out the circuit. However, the individual sections of the circuit are simple to build and align, and the beginner could easily start with just a few of the facilities offered and expand the sequencer later.

How It Works



Fig. 71


Fig. 72

There are two subsections of this circuit:

(1) Noise-based sounds--e.g. cymbals, hi-hat, brushed drum.

(2) Filter-based sounds--e.g. drums, blocks.

These sections are both under the control of the clock and counter, and their outputs are combined by a mixer circuit.

The clock generates pulses at a rate that is variable between about 5Hz and 15Hz. The setting of VR1 (Fig. 70) sets the clock rate or tempo hence the time of the repeating sequence or bar. The output of the clock goes to an 8-stage counter.

The outputs of this are normally at logical low, but go high one at a time, in sequence. These give the beats within the bar. The rotary switch SI allows the counter to be reset to shorten the sequence, so that we may have 1, 2, 3, 4, 6 or 8 beats to the bar. Thus we can obtain all the common time signatures, such as 2/4, 3/4, 6/8 and others.

The noise-based sounds are produced by taking the random ‘white noise' from a noise generator, filtering it and giving it an envelope. Figure 71 shows that the noise generator is simply an npn transistor with its base-emitter junction reverse-biased. The leakage current varies erratically in a totally random manner, generating a fluctuating voltage across R3. To obtain the cymbal effect, the white noise is first amplified (IC3a) and then filtered by a 4th-order high-pass filter (IC4a, b). The filtering is further enhanced by R14 in conjunction with the capacitance of the next stage. For the brush effect we send the white noise directly to a 2nd order low-pass filter (IC5a).


Fig. 73


Fig. 74. Envelope generator Y.


Fig. 75. Project 9: Drum pulse generator W.

Drum sounds are made by using a band-pass filter as a voicer (Fig. 72). Comparison with Figures 43 and 55 reveals that this circuit has a twin-T rejection network in its feedback loop. As in Figure 43, feedback is negative since any increase in base current to TR2 results in an increase in collector current and hence a fall in potential at the junction of R26 and C10. When the circuit is triggered by a positive-going pulse a brief damped signal at the selected frequency appears at its output. The frequency is selected by choosing suitable values for the resistors and capacitors of the twin-T network and the feedback capacitor. R21 and R22 must be equal in value and R23 should be approximately half this value. C11 and C12 should be equal in value with C10 and C13 being about double this value. Values are discussed later. The sound is also affected by the value of the resistors in the emitter circuit of TR2, as explained later. Because the voicer circuit is a filter with relatively low Q the oscillations die away quickly.

The noise-based sounds are produced continuously and therefore require an envelope to shape them into the sound of a cymbal or brushed drum. The envelope is obtained by using a transconductance amplifier (Fig.73) controlled by an envelope shaping circuit. This is triggered into action by pulses originating from the counter (Fig.70). In Figure 73 we see that there are eight inputs Z1 to Z8 which may be connected either to the counter outputs or left unconnected. Those that are connected to the counter receive a positive-going pulse on the beat. The NOR gate produces a negative-going pulse when any one (or more) of inputs Z1 to Z8 is triggered. This in turn triggers the pulse-generator (IC7). As its output at pin 3 goes high, current flows through D3, charging the capacitor C28.

The rising potential causes the amplifier (IC8) to begin to pass filtered noise to the mixer. The envelope rises rapidly simulating the striking of the cymbal. When the pulse ends, the charge on C28 leaks away through D4 and R46, giving a moderate decay time. A similar circuit is used for controlling the brush sound. The circuit is similar to that in Figure 73, with inputs Y1 to Y8 leading through 39nF capacitors C27 to C34 to IC9, which replaces IC6 of Figure 73. Similarly, IC7 and IC8 are replaced by IC10 and IC11. The difference in Generator Y is that its envelope rises and falls rapidly, so the length of the pulse is shortened by using lMf2 as timing resistor (replacing R45) and 47n as timing capacitor (replacing C11). Also, the envelope generator is reduced to a single resistor (R58) and capacitor (C38) as in Figure 74; these replace D3, D4, R46 and C28 of Figure 73.

The filter-based sounds are triggered by the logical network of Figure 75. The inputs W1 to W8 are connected either to the counter or to 0V. Whereas the circuit of Figure 73 is edge-sensitive, because of the capacitors C19 to C26, the circuit of Figure 75 is level-sensitive. The problem is that if A1 is connected to, say, output 1 of the counter and W2 is connected to output 2, there is no gap between 1 going low and 2 going high.

The circuit would register only the first beat, not the second.

In Figure 75 we NAND the outputs from the counter with the signal from the clock. Figure 76 explains the section.

The noise-based and filter-based sounds are combined into a single audio signal by a mixer (Fig.77). The variable resistors allow the relative volume of each component of the signal to be controlled. Note that, since the signal from the filters has a naturally sharp attack and decay, there is no need for an envelope-shaper. The output from this mixer may then be fed to an amplifier such as one of those shown in Figures 61 and 67.


Fig. 76. Timing diagram of the logic of Fig. 75, with W1 and W2 connected to consecutive counter outputs.


Mixer. Fig. 77.

Variations The system diagram of Figure 69 shows two noise-based and two filter-based sources of sound, but there is no need to incorporate all of these. Conversely, the system can easily be extended to include an even wider range of sound sources of both types. It is possible to simplify the triggering circuit by using a gate with fewer inputs in place of IC6 (and IC9). The 4075 4-input NOR gate or the 4023 3-input NOR gate are suitable. Similarly a 4-input NAND gate (4012) or 3-input NAND ggte (4023) can be used in Figure 75. Indeed if only two beats per bar are required, a single 4011 IC can be used to replace IC 12 and IC14 (also IC 15 and IC17).

There is much scope for experimentation to find which combination of component values gives the required sounds.

Here are some suggestions worth trying:

Figure 71, Noise filters: The capacitors shown give a cutoff point of 6kHz for both filters. Try varying C3 to C6 (keeping them all equal) to change the high-pass filter, and vary C7 and C8 to change the low-pass filter.

Figure 72, Drum voicers: For a low-pitched drum, C1 1 and Cl2 can be 100nF or even more, with C10 and C13 equal to 220nF, the resistors having the values shown in Figure 72. For a high-pitched maracas effect, C11 and C12 are 4.7nF and C10 and C13 are 10nF. If R27 and VR2 are to be replaced by a fixed resistor, one of 100 k-O is generally suitable for a low-pitched drum, while a resistor of about 390 ohm produces a sharper sound.

Figure 73, Envelope generators: Vary pulse length by changing R45 and C27. Vary attack by inserting a resistor of a few tens of kilohms between pin 3 of IC7 and D3. Vary the decay period by replacing R46.

IMPORTANT: do not vary R47; reducing this can destroy IC8.

Construction

The project requires a dual ±6V supply; two 6V batteries are suitable. The current required depends on the size of the system, the system of Figure 69 requiring about 180mA, on each power rail. When working from the figures, note that some show only the +6V and -6V lines while others show the 0-V line as well. It is important not to confuse the 0-V and -6V lines.

Before beginning construction, consider what means is to be used for connecting the counter outputs to the trigger inputs.

The size of board required and the nature of the enclosure depends on this. Several methods are possible, including, 1 Alligator clips: Outputs from IC2 lead to terminal pins.

Inputs W1 to Z8 have flying leads ending in clips. A few terminal pins on the -6V line are provided for the inputs that are not being used.

2 PCB switches: Banks of 8-way d.i.l. subminiature switches may be used to connect each input to any one or more of the 8 counter outputs.

3 Rotary switch: A multipole switch may be used to perform the function of SI and also to make various connections to counter outputs. A limited set of sequences such as rock, mambo, waltz, etc., can be implemented in this way.

It is permissible for two or more trigger inputs to be connected to the same counter output. However, unused inputs must always be connected to or switched to -6V.

Stripboard is recommended for this project because this makes it easier to adapt and expand the system. Begin with a rather larger board than you think you will eventually need, as it is almost inevitable that you will want to add more sounds later.

If you do not have an audio amplifier available, build one using the circuits of Figures 61 or 67. Next build the noise generator and its amplifier (IC3a). The circuit diagrams are based on using the LF353 dual FET op amp but, if you prefer, you can use the single version, the LF351. You could consider using the quad version, the LF347, but this may result in having to crowd rather too many resistors and capacitors around the IC, making it difficult to change things later. It will probably be necessary to try several transistors for TR1 before you find one that produces a sufficient volume of noise. A BC109 is shown in Figure 71 but any other type of npn transistor can be used. With an especially noisy transistor, IC3a may have too high a gain, in which case reduce the value of R5. At this stage the output from IC3a may be connected directly to the input of the audio amplifier that you intend to use. To complete this section of the system, build the high-pass and low-pass filters (IC4 and IC5a), possibly with different capacitor values (see above).

Next build the clock and counter; the rotary switch allows for all the usual time signatures but, if you will never require anything but 8 beats to the bar, omit S1 and wire pin 4 pin 15 directly to -6V.

The control circuit for the envelope generators is the next stage to be constructed. Notes on the selection of component values have been given above. The outputs from these envelope circuits are wired to the mixer and the signal from this goes to the audio amplifier. At this stage the sequencer can be tested, using only noise-based sounds.

The drum pulse generator and drum voicers complete the system, and are wired directly to the mixer. The whole system can now be tested. Depending on the layout you adopt, it may be necessary to add a few capacitors to the circuit to smooth out 'spikes' on the supply line, particularly near the logic ICs. These may cause unwanted noise and oscillations.

Use 100nF polyester capacitors in the area of the board where IC2 and IC12-IC14 are situated. Solder one wire of the capacitor to the +6V line and the other to the -6V line. You may also need a 100 uF electrolytic capacitor soldered as close as possible to pins 1 and 8 of IC1.

Using the System

The sequencer can produce any sequence of effects, working on a bar length of up to 8 beats. Although the variety of possible sequences is enormous, here are a few suggestions for obtaining some popular rhythms, showing which counter outputs to use:

Swing: 4/4 time, 8 quavers to the bar, S1 to 8; cymbal to 1,3, 4, 5,7, 8; drum to 1,3, 5, 7.

Rock: 4/4 time, 8 quavers to the bar; S1 to 8; cymbal to 1,2, 3, 4,5, 6, 7, 8; drum to 3, 7; bass drum to 1,4 (optional).

Modem Waltz: 3/4 time, 3 crotchets to the bar, SI to 3; drum to 1; hi-hat high-pitched cymbal to 2, 3.

Latin American: 4/4 time, 8 quavers to the bar, SI to 8; drum to 1,4, 7;hi-hat to 2, 3, 5, 6. This is the basic habanera rhythm, and can be played without the hi-hat accompaniment.

Samba: 2/4 time, 8 semi-quavers to the bar; small drum to 1,4, 5, 6, 8; large drum to 1, 5; hi-hat to 1,5, 7 or to 1,3, 4, 5,7. The bossa nova is the same rhythm, played more slowly.

Special Components

Resistors are all 0.25W carbon or metal film; 5% tolerance is adequate for all, including those used in the filters.

Capacitors are electrolytic or polyester, as indicated in the diagrams.

Integrated Circuits

IC1, IC7

7555 CMOS timer & IC101

4022 CMOS divide-by-8 counter with 1-of-8 outputs

IC3-IC5

LF355N dual operational amplifier with JFET inputs

IC6, IC9

4078 CMOS 8-input NOR gate

IC8, IC11

CA3080E operational transconductance amplifier

IC12, IC13

4011 CMOS quadruple 2-input NAND gate IC15, IC16

IC14, IC17

4068 CMOS 8-input NAND gate 1C2

PROJECT 10--Electronic Organ Levels 2 and 3

This is a complete organ project which, in its simpler versions, has a range of up to 5 octaves (61 keys) and has a formant filter and envelope-shaper to imitate one or more of a range of musical instruments. The project is based on a relatively inexpensive organ chip and configures it for use as a solo instrument.

It can play single notes or chords and the circuit may be set to sound the note for as long as the key is held down (sustain off) or to continue the note until the next note is played (sustain on). The organ IC has several other facilities not made use of in this project, but which can be incorporated at a later date to produce a sophisticated keyboard instrument. These include the ability to split the keyboard into two sections to play solo and accompaniment, and a number of options for automatic chording. To implement the full range of features the reader is referred to the manufacturer's data sheet.

Since this project relies on only the more basic features of the chip, it should prove possible to adapt the design to use other similar organ chips instead.



Fig. 78

How It Works

This organ is based on digital electronics. Compare this with Project 11 in which pitch depends on an analog voltage. In this project the frequency of a clock (1.00012 MHz) is divided repeatedly to produce any note in the range from three octaves below middle C (32Hz) to 4 octaves above it (4186 Hz). The frequency or frequencies played at any moment depend on the result of automatic scanning of the keyboard.

Each of outputs B1 to B6 (Fig. 78) are normally high but go briefly low in turn. These correspond to the 5 octaves of the instrument and a number of function keys. Each output is connected through a diode and a normally-open switch to 12 inputs F1 to F12, one for each note of the chromatic steps of an octave. If any one or more of these keys is pressed (closed) at the instant the low pulse appears on the B output, the note(s) in that octave is sounded. The output signal appears at 3 different outputs, known as the footages. These are one octave apart so that the 8; output has half the frequency of the 4’ output and the 16’ output has half the frequency of the 8' output. The output signal consists of true square waves, with 1:1 mark/space ratio (page 100). There are 5 other audio outputs shown in Figure 78. These are for the accompaniment, but are not used in this project.

To simplify the circuit diagram. Figure 78 shows only the connections between the B1 output and the twelve F inputs.

If a complete keyboard of 61 keys is to be used, an identical network, complete with pull-up resistors, diodes and key-switches, is required for each of the five B outputs, B1 to B5.

However, a smaller keyboard may be used, covering fewer octaves. In this case you may decide to omit the lowest one or two octaves, and to connect key networks only to B3 to B5. This will cover notes from middle C upward on the 8; output. Outputs B1 and B2 may be left unconnected.

Output B6 provides only a single note, the top C (switched to FI). The main function of B6 is to scan the control switches. The circuit is the same as for the other B outputs in Figure 78 except that slide or toggle switches are used instead of key-switches. These control several functions (see data sheet) but in this project we need only one, the sustain ON/ OFF selector. Figure 79 shows how this is wired.


Fig. 79. Project 10: Sustain control.

The clock is built from two NOR gates (IC1) and its frequency is controlled by a crystal. For greatest precision this should be a 1.00012MHz crystal, but the more easily obtained 1MHz crystal is good enough. A third gate in IC1 is used to give a short high pulse to reset the organ chip whenever power is switched on.

Format Filtering

The square-wave output signal can be fed directly to an amplifier such as that in Figure 61 or Figure 67. This gives a reasonably pleasant 'organ' tone suitable for practicing. For more interesting effects the signal is filtered. For greatest flexibility, build the tunable audio filter (Project 4), either as a separate unit, or on the same board as the organ. With its range of LP, HP and BP outputs it enables a wide variety of sounds to -be produced. If you require only one or a few sounds, build fixed active filters for each effect, as described in Section 11. Project 4, if available, is used in the initial stages to investigate the possibilities and decide on cut-off points.

As explained , sounds obtained by filtering a square wave are usually imperfect, owing to the lack of the even harmonics. However, it is still worth experimenting with the square-wave output, especially by using an amplitude envelope, as explained later. Fortunately, the even harmonics can be obtained in this project by mixing two adjacent footages. Figure 80 shows a mixer circuit for this purpose. The signals from the 8' and 4' outputs are mixed in equal amounts by feeding them to inputs A and B, input C being left unconnected. For certain instruments we require one signal to be stronger than the other. One is connected to A (the stronger one) and one to input C (the weaker one). The values of resistors in Figure 80 are possibly subject to changes, depending on the exact sound required. The connections from the footage outputs to A, B and C could be made by a rotary switch, wired for different instrumental effects.


Fig. 80 Project 10: Mixer.

Virtually no sound is realistic without a suitable envelope (page 111). In this project we use the envelope generator of Project 8 (Fig. 67). This is triggered by a rising pulse but here we need to trigger it with a falling pulse. The triggering signal is the KPS (key pressed solo) output from pin 15 of IC2 (there are several other similar outputs not used in this project).

This output is normally high but goes low for as long as any key is pressed and held. The low-going signal turns on the pnp transistor (Fig. 81), causing the voltage at its collector to rise.

This starts the attack phase. The sustain phase lasts for as long as the key is held. The decay phase begins when the key is released. In order that the note is heard during the decay phase, SI must be switched to 'sustain ON' whenever the envelope generator is in use.

Construction


Fig. 81. Project 10: Triggering the envelope.

The circuit requires 75mA on each power rail to operate the complete system, including the audio amplifier, tunable filter and envelope generator. It can be powered by a pair of 6V batteries or by a dual ±6V power pack.

Keyboards with piano-type keys may be purchased ready-made, either with 61 keys or in a cheaper version with only 49 keys. Keyboards are sold without any supporting frame so it is necessary to build a 'box' of some kind. This may also hold the circuit board and power supply. The loudspeaker and control switches are mounted on top of the box. As with several of the projects in this guide, there is much scope for expansion, so leave plenty of room in the box for additional circuit boards and on top of the box for extra control switches.

You may at some time wish to include the Percussion Sequencer (Project 9).


Fig. 82. Project 10: Earphone socket. The resistor is chosen to reduce the earphone volume to a suitable level.

In the initial stages the expense of a piano-type keyboard may be avoided by using a calculator keypad. These are available very cheaply with 12 or more push-buttons. Although they are far less easily playable than a proper keyboard, some fun may be had using such a keypad. However, keypads usually have a certain amount of internal wiring which means that the keys are not individually accessible. This may make it impossible to use the pad with this project, so check the connecting matrix of the pad before purchasing it.

The output from the audio amplifier will normally go to a loudspeaker, but it is useful to provide a socket so that the user may use earphones instead. A jack socket is wired as in Figure 82 so that inserting the earphone plug disconnects the loudspeaker.

Filter Options

The matter of deciding what type of filter or filters are required is left to the preferences of the constructor. These are very many possibilities, which are best tried out in advance on a breadboard. Below are some suggested starting points, all of which are made on the basis of a state-variable filter as in Figure 51. If only a single effect is required, the variable resistors may be replaced by fixed resistors and the switched capacitors by single capacitors. Alternatively use a 2nd-order active filter (or a pair of such filters for band-pass filtering) as described in Section 11. Similarly, the circuit of the envelope generator may be simplified by substituting fixed resistors for the variable ones.

Piano: Connect 4' and 8# outputs to A and B (Fig. 80). Low-pass filter with cut-off about 20kHz, high Q. Rapid attack, slow decay.

Organ (open diapason): Connect 4' and 8' to A and B. Low-pass filter with cut-off about 2kHz. Fairly rapid attack and decay.

Clarinet: Connect 4' to C and 8* to A. Low-pass filter with cut-off about 10kHz. Rapid (almost maximum) attack and decay.

Oboe: As for clarinet, but with the connections to A and C reversed.

Trumpet: Connect 4' to A and S' to C. Band-pass filter with cut-off about 10kHz. Rapid attack and fairly rapid decay.

Horn: As for trumpet with cut-off at 1kHz, moderate rate of attack and more rapid decay.

Violin: Connect 4' to A and 8' to C. High-pass filter with low cut-off, about 1kHz or even a few hundred hertz. Slow attack, moderately fast decay.

Cello and Double-bass: As for violin but with slower attack and slightly slower decay.

Special Components

Integrated Circuits

IC1

IC2

4001 CMOS quadruple 2-input NOR gate

M108 single chip organ (solo + accompaniment); an alternative is the M208 which differs only in the split of the keyboard in accompaniment mode.

Top of Page

PREV. |   Next | Guide Index | HOME