Home -> Magazines -> Issues -> Articles in this issue -> View
Article Group: | |
The Programmable Digital Sound Generator (Part 5) | |
Part 5: Sound Systems RevisitedArticle from Electronics & Music Maker, November 1984 | |
Our series on Clef Products' synth add-on for the BBC Micro comes to a conclusion. Alan Boothman ties up the loose ends.
Our coverage of Clef Products' music system for the BBC Micro comes to a conclusion.
A BASIC program was written which gives level values rising in the manner of a natural progression as the key velocity increases. Sixteen points were chosen covering the 2mS-32mS depression period mentioned earlier, and the term 'natural progression' covers a combination of nonlinearity, shape of slope, and lower and upper limits of level. Four curves are available for use, varying in extent between 1 and 4 and containing suitable level offsets. Thus, for the strings only curve 3 is used, so as to give a relatively gentle touch control to both the rise and fall of the sound. The electric piano specification shows a contrasting situation where oscillator 1 uses a very hard velocity curve and oscillator 3 adopts the same curve used in the strings. Since the curve in oscillator 1 is controlling a relatively bright waveform (17) a sharp increase in high harmonics will occur under heavy playing. In contrast the more mellow waveform (20) will be the dominant sound with light touch.
The variation in tone at this stage only covers the moment of attack and corresponds to dynamic tone and level by touch-sensitivity. Later parameters in the envelope specification will decide the moving tonal pattern throughout the period of the envelope, while a zero in the velocity curve position means that the oscillator concerned will be non-touch sensitive, controlled only by 'MAX LEV'.
The generation of the tables was covered earlier, and requires only a simple BASIC program. Sound System 1 adopts the convention that Tables 1, 2 and 3 are on pitch, sharp and flat, respectively. Thus, in the string specification, all three tables are used, one for each oscillator, to produce a chorus effect. In the case of the electric piano, the longer mellow portion of the sound is on pitch whilst the attacking brighter oscillator is deliberately sharp, thereby giving a dynamic pitch variation throughout the envelope plus a small pitch response to keyboard touch.
Frequency Table 4 has been reserved to give a non-harmonic relationship to the fundamental frequency, but by using the simple BASIC program suggested, it's possible to load alternative table groups containing the characteristics required by the user.
A separate BASIC program within Sound System 1 allows waveforms to be developed by additive synthesis of chosen harmonics of sine, square, triangle and sawtooth waveforms. In BBC Micro terms, this is a 'chained' activity which preserves the machine code operating routines and tables below PAGE in the computer, and replaces the master BASIC program (which controls the displays and operating routines) with the waveform generation program. Before using this facility, it's necessary to set up an instrument specification which gives roughly the required envelope-shaping. Where a waveform is not already available, Tables 1 to 4 should be inserted into the blank WF Number positions. Within the wave generation program, the waveforms can then be modified in positions 1-4 whilst the user checks the overall result by playing the keyboard or using a stored sequence. The use of high-resolution graphics (MODE 4) to display waveforms makes this program substitution necessary, but the speed of the BBC DFS is such that all this occurs very rapidly. Reverting back to the main system is equally rapid and the newly-developed waveforms move with you, allowing further tailoring of the other parameters. At any stage, individual waves can be saved or grouped into a 16-waveform set and used in conjunction with the other 16 permanently present in the PDSG.
The string specification makes maximum use of the channel facility in that the centre channel (3) contains in-pitch sound, which mixes with 0.5% sharp and 0.5% flat sounds in left and right channels respectively, whilst the larger 1% difference between Tables 2 and 3 gives a faster relative phase movement across the stereo image.
Programming to remain compatible with two envelope edge shapes can become surprisingly complicated, particularly when touch-sensitive levels are also involved. In the linear mode (2), Sound System 1 treats all rates (Attack, Decay, and so on) after suitable scaling as an increment of amplitude, and the program simply accumulates from zero to maximum level (or the level defined by touch), and then drops by subtraction through Decay, Sustain and Release. If any of the rates involved are particularly fast, the increment is suitably scaled down and fed to the PDSG at a faster rate to give a smoother edge.
If a logarithmic or exponential edge shape is required, a table is used to define the falling activity but the rising edge is translated from the touch data to give a series of exponentially-reducing increments which are accumulated to form the edge.
The remaining parameters come within the general area of ADSR with the ability to fix the maximum level for each oscillator and the level at which decay rate is replaced by sustain rate. The electric piano uses logarithmic edges, the attack rate of which is scaled progressively slower from 1 to 11, and the falling rates are scaled to be roughly equivalent to their counterparts in overall time, using numbers between 0 and 100 to indicate increasing speed. The amplitude increments mentioned in the previous section are actually two bytes long in order to give a wide range of time to the envelope edges. This gives a maximum limit of around 17 minutes spread over 65,000 numbers, so in order to use a sensible number of displayed increments (0-100), all ADSR rates have to be non-linearly scaled as part of the BASIC control program.
The electric piano uses oscillator 1 as the percussive component and oscillator 2 for the longer sustain portion. However, the overall sound is dynamic in tone by virtue of the relative numbers chosen for each parameter. The string specification uses linear edges throughout, but an interesting feature is the use of a decay rate which reduces the amplitude of sound before reaching the constant sustain section. This assists further in producing a clean sound when both chordal and melodic activities are occurring on the keyboard at the same time. The strings would normally be used in Pedal Mode 2, which means that the parameters on line 13 only come into force when all keys are released and the pedal is pressed. In contrast, the electric piano would use Pedal Mode 1, replacing the release rate with pedal rate under all conditions of pedal depression.


A summary of the sort of programming required to create a practical instrument along the lines of Sound System 1 is shown in Figure 3. This should give further food for thought on how the PDSG, with or without a keyboard, can be adopted to gour own personal requirements.
PDSG pricing and availability details from: Clef Products, (Contact Details). See this month's Back Issues page for details of how to obtain previous instalments in the 'E&MM Digital Music' series.
This is the last part in this series. The first article in this series is:
The Programmable Digital Sound Generator
(EMM May 84)
All parts in this series:
Browse by Topic:
Computer Musician
Topic:
Series:
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 (Viewing)
Feature by Alan Boothman
Previous article in this issue:
Next article in this issue:
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!
New issues that have been donated or scanned for us this month.
All donations and support are gratefully appreciated - thank you.
Do you have any of these magazine issues?
If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!