The STGPR
A machine for melodic experiments


1. Historical preliminaries

The concept and realization of the Special Tone Generator and Pitch Recorder resulted of several combined facts and needs.
First, after the realization of a Harmonic Synthesizer, it appeared that, contrary to expectation, this HS could not contribute really to melodic studies, and a small apparatus, called JUSTIN, was adjoined to HS. But this device happened to lack precision and reproducibility, on account of frequency drifts very difficult to master or compensate. Also this device presented a single timbre, while a large palette of tone colors appeared necessary to perform interesting melodic experiments. Pure tones were needed, but also others with strong low order harmonics, even and odd, and if possible rich timbres such as trumpet or oboe. At that time the author mastered a number of synthetic tones of musical quality, easy to produce directly by analog and digital circuits, adaptable to the new techniques of CMOS programmable digital gate arrays.
With the suggestion of Jacky Renaux, an electronics engineer of the firm TEKELEC AIRTRONIC (now at XILINX), to use standard RAM memory, the project took an attractive form and was implemented, named MELODIAL.

2. Device description

A drawing of the device appears in Figure 1. On the photograph, one can see the active key n°6, on round n°56, displaying address content 23:37 (octal number 22337), corresponding to a frequency of 105.94 Hz. The organization diagram is given in Figure 2, where dark grey areas represent keyboards or groups of keys.

2.1. General features

The STGPR includes a master permanent quartz oscillator at 64 MHz, very accurate and constant, a programmable divider D fed by a dividing number d, a tone synthesis section, a memory M of 2048 words of 14 bits, displays, and control means. The fundamental sound frequency obtained is 1 MHz/d, since a factor 64 is necessary to realise the tones synthesis. The maximum d being 16324 (or 37777 in octal system), the lowest fundamental pitch lies near 60 Hz. The highest useful fundamental frequency depends on the desired precision in pitch. If one wants a precision of one savart (i.e. 4 cents, rather ambitious for melody), the upward limit will be about 2300 Hz, which leaves a rather comfortable range to investigate. The displays concern the dividing number d expressed in octal system, and the address parameters in two groups of two decimal digits each, the melodic key number (0 to 31), and the round number (0 to 63). The control means fall into four separate groups. A melodic keyboard KM of 16 keys, doubled to 32 by a common auxiliary bar, a group of 3 keys controlling the choice of melodic keyboard round RND among 64 possibilities, a capture-read/write-tuning control CRWT of four large keys, and a timbre-switching command TC of 10 keys. All keys are fixed metallic pads with epidermic sensitiveness, feeding appropriate switching circuits. Sounds are heard through intrinsic preamplifiers, external conventional stereo amplifier, and headphones BST SH10.

2.2. Operation

The KM keyboard is by design strictly melodic, i.e. with only one key active at a time. In normal interval experiments the right hand deals with the CRWT four keys, and the left with KM, RND and TC, but sometimes the right hand is used to actuate the reference key, the pitch of which must remain constant, in order to avoid any reference loss by inadvertent action on CRWT.
When a key of KM is touched, RND being fixed and a timbre chosen, an address is reached in M, and a tone is produced, the fundamental of which results of the divider d stored in this address. The divider d is the 14 bits output of an auxiliary up-down binary counter under the control of CRWT. Actuating CRWT causes finally the pitch to vary at convenience, then at release leaves the last divider value inscribed in the address played.

3. Tone synthesis

The STGPR tones fall into two main categories, the purely digital tones, and the mixed analog-digital tones. These last tones are resistor weighed sums of digital signals.

3.1. Origins

At the beginning, the author considered the building of an electronic organ, for which original timbres were desired. Having observed that various digital functions issued from AND, OR and EXOR gates combinations produced in some (rare) cases sounds of obvious musical value, this synthesis solution was more thoroughly studied. A first round of trials used source "square" functions with frequencies in integer ratios 2,3,5, and their low octaves, which gave interesting issues. But owing to the complication of the "3" and "5" sources, a more simple way using only one source and its octaves was considered and developed, guided by the preceding results. Briefly stated, a solution judged musically satisfactory after spectrum computing and analysis, was drawn over a period, and an " octave " solution with nearly same form was looked for, either directly, or by addition of more basic functions.
All digital functions thus obtained presented spectra in "1/n", that is the general trend was a decreasing harmonic intensity as the inverse of order. More precisely a given digital function could be described spectrally by means of a "master spectrum" addressing a group of first ranks (e.g. first 4 ranks, or first 8, 16, etc..., depending on function complexity), repeating itself further indefinetely, with the 1/n law applied to homolog orders. A typical example will be given further (see section 3.3.3.4). This type of harmonic composition corresponds to tone qualities rather harsh, coming from the vertical voltages variations inherent in digital functions. For softer tones slanted voltage changes are necessary, to provide spectra in 1/n². A typical example of such soft function is the isocele broken line, with only odd harmonics, and a relative intensity

an = a1/n²

This particular function is used in STGPR for F1,F2,F4.
A number of mixed analog-digital soft functions were studied, with a very large field of spectral options, but at cost of a high circuit sophistication. Happily the new programmable circuits in PAL architecture (Programmable Array Logic) formed of Boole "sums of products" were particularly suited to implement complex solutions. One of these has been exploited in the STGPR, under the name "sesquialtera".

3.2. Vocabulary and syntax conventions

In the following description of functions, use of Boole algebra is absolutely necessary to translate electronic operators such as NAND and OR gates for examples. We shall adopt, for ease of Internet HTML edition, the following conventions, with respect to Boole equations and expressions.

  • a) operator OR (Boole addition) will be expressed with a double comma: ",,".
  • b)operator NOT (inversion) by a "!" preceding the term to be inverted, without space.
  • c)operator AND (Boole multiplication), by "&".
  • d)operator EXNOR, complementary exclusive OR function (equivalent to an algebraic multiplication) by a double colon: "::".
  • e)Boole equality, by double equal sign with a median colon: "=:=" .

The use of other operators can be dispensed with, since inversions can be effected within the programmable circuit.
The computing usual arithmetic signs, =, /(for divide), *(for multiply), +, -, are maintained for algebraic or arithmetic expressions.

Examples :

C, a Boole sum of products, for [(D AND W) OR (E EXNOR F)], will be transcribed here as:

C =:= (D&W,,E::F).

An algebraic sum of Boole functions will be transcribed like:

W = a(B&C) + b(!D&E) + c(X::Y::Z),

where a,b,c, are weighing coefficients, implemented in wiring by a parallel resistor array Ra,Rb,Rc, with Ra=R/a, Rb=R/b, Rc=R/c.


The primary digital functions are the outputs of a binary divider, square functions in negative sine phases. They will be designated as O1 for fundamental, O2 for first higher octave, and O3,O4,O5, etc, for upper octaves. So the frequency of On will be 2n-1 times the frequency of O1.

3.3. STGPR tone functions

Ten primary tones are provided in the STGPR:

  •   1.      Sinonde, a pure tone
  •   2.      Flute F1, similar to organ gedekt (bourdon)
  •   3,4.   Flutes F2, F4, like F1 at octave and double octave
  •   5.      Sesquialtera, a soft odd harmonics function
  •   6.      Bassoon, recalling oboe or bassoon
  •   7.      Rebec, recalling a string
  •   8.      Clarinet, recalling this instrument
  •   9.      Cromorn, similar to organ Cromorne
  • 10.      Trompe, similar to organ Trumpet

Forms and spectra of complex functions are given in Figure 3 and Figure 4. Spectra of digital functions or digital parts of functions are computed from the forms, by the Euler-Fourier formulae, which give sine and cosine components, negative or positive. On Figure 4, signs have been ignored (only one line symbol), since for melody (only one tone heard at a time), the angle of components vectors are irrelevant.

3.3.1. Pure digital tones

3.3.1.1. Rebec (name of an ancestor of violin)

Formula:
      RB =:= O1&O2&O3,,!O1&O2&!O3&!O4,,!O&O2&!O3&O4&!O5,,O1&O2&!O3&O4&O5.
Form is given in Figure 3a and spectrum in Figure 4a. Note that harmonics multiple of 4 are nul.

3.3.1.2. Bassoon

Bassoon formula is:
      BAS =:= O2&O3,,O1&O2&O4,,!O1&O2&!O4,,O1&!O2&O3&!O4,,!O1&!O2&O3&O4.
See Figure 3b and Figure 4b.

3.3.2. STGPR nearly pure digital tones (1/n spectra)

This group includes the tones Trompe and Cromorn, which are each arithmetic sums of 2 digital functions (resistor adding).
The Trompe function has the form of an asymmetric rectangular ripple. The asymmetry is necessary to avoid ill-placed harmonic minimum drops at zero, and also to have a first harmonic not too weak, which brings the tone closer to its real model (organ trumpet). The width of ripple controls directly the spectrum, a narrowing favoring the higher parts of spectra. The compromise here chosen is acceptable for the considered melodic experiments.
In Cromorn, the oddity function symmetry is obtained in repeating at a distance Pi the Trompe inverted ripple (see Figure 3d ). Thus the even harmonics are cancelled and the odd terms doubled.

The formula of Trompe is:
      TR =:= (1/2)(!O1&!O2,,!O1&O2&!O3,,O1&!O2&!O3&!O4) + (1/2)O1.
See Figure 3f, Figure 4d.

Formula of Cromorn is:
      CR =:= (1/2)(!O1&!O2&O3,,!O1&O2&O3,,O1&!O2&!O3,,!O1&O2&!O3&O4,,O1&O2&!O3&!O4) + (1/2)(O1::O2).
See Figure 3e,Figure 4e.

3.3.3. STGPR soft tones (n-2spectra)

3.3.3.1. Flutes F1,F2,F4

F1 is the weighed sum of square functions in cosine phase:
      F1 = (O1::O2) + (1/2)(O1::O3) + (1/4)(O1::O4) + -- + 2-(n-2) (01::On).
Similarly F2 will be
      F2 = (O2::O3) + (1/2)(O2::O4) + etc...
      F4 = (O3::O4) + (1/2)(O3::O5) + etc...
No figure is necessary, since the spectrum is quite simple, with H2 = H4 = ......= H2p = 0, and H2p+1 = (2p+1)-2 H1

3.3.3.2. Sinonde

This synthesis uses 8 different functions, with weighing coefficients computed to eliminate harmonics other than the first. Formula is:
      SIN = 0.54 (O1::O2) + 0.22(O1::O3) + 0.107 (O1::O4) + 0.053 (O1::O5)
      + 0.044 (!O1::O2::O3::O4)
      + 0.021 (!O1::O2::O3::O5)
      + 0.0105 (!O1::O2::O4::O5)
      + 0.00436 (!O1::O3::O4::O5).

3.3.3.3. Sesquialtera

This sophisticated function required a long study, in searching for a satisfactory 5 pikes form. Its formula is:
      SQ = (O1::O2::O4::O5) + (1/2)(Y1::O6) where Y1 is a multiplying function:
      Y1 =:= O1::O2::O3::(!O4::O5,,!O3::O4,,O2::O3).
See Figure 3d and Figure 4c.

3.3.3.4. Clarinet

This tone is obtained by mixing several digital combinations:
      CLA = O1::O3 + (1/2)O3 + (1/2)O4
The product O1::O3 gives dominant harmonics 1,3,5, and O3 and O4 bring in even harmonics 4,8. Clarinet cannot be faithfully imitated with a fixed spectrum, and this mixture has not been much used in experiments.
The master and normal spectra of O1::O3 are given in Figure 5, with the form in Figure 3c, to illustrate the theory of pure digital tones alluded to in section 3.1. The following table I gives the values of master spectrum components up to order 23, in cosine phases, of that function.


Table I
Master spectral components for O1::O3

  Spectral order (n) 1 3 5 7  
  (continued) (n) 9 11 13 15  
  (continued) (n) 17 19 21 23  

  Master value (An) 0.414 2.414 -2.414 -0.414  

Table II gives the normal spectrum values up to order 23, applying the formula an = An /n .


Table II
O1::O3 spectrum

  n : 1 3 5 7 9 11 13 15 17 19 21 23  
  an: 0.414 0.805 -0.483 -0.059 0.046 0.219 -0.186 -0.028 0.024 0.127 -0.115 -0.018  


Minus signs correspond to a negative phase of harmonics.

3.3.3.5. Soft tones filtering

At output of resistors summing, the preceding soft functions present residual high frequency harmonics which must be eliminated.
Two low-pass filters were included in the preamplifiers output stages. One for the functions F1, F2, F4, Sesquialtera, with a cut-off at 1500 Hz, and another for Sinonde with a cut-off at 1000 Hz.
These filters were 5 orders Legendre polynomial types with a slope of about 30 dB/octave.

4. Realization (Figure 2)

4.1. Frequency divider

Referring to Figure 2, this part is a programmable divider, clocked from the quartz master oscillator 64 Mz (IQXO-5000), and receiving as input the 14 bits of divider number d from the up-down counter. Output is the clock for timbre synthesis section, at (64/d)Mhz. The device used is a fast classic PLD Intel iPLD910N, with 24 macrocells.

4.2. Up-down counter

This circuit feeds the preceding with the divider d 14 bits, and is clocked by a Voltage Controlled Oscillator (VCO) under action of right hand. It uses an Intel device 5AC324. Right index finger key controls the counting direction.

4.3. Memory

The 14 bits of current number d are stored in a double 2Kx8bits SRAM (UM6116-3M), where inputs are:

  • addresses MK (5 bits) and RND(6 bits), coming from the appropriate keyboard keys and associated circuits. The KM keys are interconnected and inter-inhibited in an iPLD910.
  • a control Read/Write, coming from right hand control keys.
  • in Write State, the 14 bits of d.

Outputs are:

  • in Read State, the 14 bits of d.

4.4. VCO

The VCO clocking the up-down counter is part of a PLL CMOS device CD4046. The controlling voltage comes from analog circuits using CMOS inverters CD4069 and author original switching circuits by finger action on epidermic sensitive pads (see neighboring file of web site keyboard.htm).

4.5. Displays

Displays are conventional liquid-crystal circuits with appropriate coding means. The d display uses economically a 4 ½ digits type, where the middle 3 points address the 3 most significant bits of d (the first digit of d varies only from 0 to 3).

4.6. Timbres synthesis

The pure digital functions and tones digital components described above (see section 3), are produced in two programmable circuits iPLD610 and iPLD910. For mixed functions, adding is obtained by appropriate resistor arrays feeding filters and preamplifiers.

4.7. Timbres switching

The timbre keyboard TC keys feed a relay circuit which controls switching devices CMOS CD4066, efficient and noise free. The switched signals go into 2 filters and output preamplifiers, built with CD4069 inverters and appropriate condensers and resistors.

4.8. Keying means

All control keys are metallic pads, epidermic sensitive, included in appropriate detecting electronic circuits (see web file keyboard.htm). Use of PLDs enable processing control signals before action, for example the melodic keys KM circuits are interconnected to insure automatic inhibition of all keys other than the one touched first. Also PLD outputs are key number bits for memory address (see above 4.4).
This epidermic system is silent, reliable, and inexpensive.

4.9. Future perspectives

In case of future duplication of the STGPR device, advantage could be taken of present existence of new programmable devices with great numbers of gates and macrocells, and embedded memory sections, to integrate practically all digital operations, reducing the layout to a quartz oscillator, a digital processor, and a few analog complements.