WO1997032397A1 - Digital filter - Google Patents

Digital filter Download PDF

Info

Publication number
WO1997032397A1
WO1997032397A1 PCT/GB1997/000537 GB9700537W WO9732397A1 WO 1997032397 A1 WO1997032397 A1 WO 1997032397A1 GB 9700537 W GB9700537 W GB 9700537W WO 9732397 A1 WO9732397 A1 WO 9732397A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
curve
linear
sample
controllable
Prior art date
Application number
PCT/GB1997/000537
Other languages
French (fr)
Inventor
Anthony Hardie-Bick
Original Assignee
Ethymonics Limited
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ethymonics Limited filed Critical Ethymonics Limited
Priority to AU18891/97A priority Critical patent/AU1889197A/en
Publication of WO1997032397A1 publication Critical patent/WO1997032397A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/04Recursive filters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0248Filters characterised by a particular frequency response or filtering method
    • H03H17/0261Non linear filters

Definitions

  • the present invention relates to digitally filtering samples representing an audio signal.
  • digital filters can provide improvements in performance in comparison with analogue filtering techniques.
  • known digital filters lack certain of the characteristics of analog filters which are important for the creation and or modification of musical tones.
  • a digital filter for filtering samples representing an audio signal comprising an input, an output, delay means, gain means, and at least one feed back path, arranged such that a characteristic frequency at said output is controllable by said gain means, wherein when processing each input sample, a non-linear element having a non-linear characteristic is arranged to modify a filter sample, such that a sample in said feed back path is affected by an iteration of said non-linear element.
  • the non-linear characteristic is curved and the shape of said curve may be controllable in real time.
  • the shape is controllable while an audio signal is being filtered.
  • filter is configured as a state variable filter having two stages of integration, wherein said non-linear element is included in the feed back path of at least one of said integrators.
  • a method of filtering samples representing an audio signal comprising steps of supplying digitised samples to an input and receiving filtered samples from an output, wherein said samples are processed by a delay means, gain means and at least one feed back path, arranged such that a characteristic frequency at said output is controllable by said gain means; and processing each input sample such that a non-linear element having a non-linear characteristic is arranged to modify a filter sample such that a sample in said feed back path is affected by an iteration of said non- linear element.
  • the gain means is controllable for defining a resonance characteristic and said resonance characteristic may include self oscillation.
  • the method is arranged to form a state variable method having two stages of integration, wherein the non-linear element is included in the feed back path of at least one of the integration stages.
  • the filtering method may be an all pass filtering method and the plurality of filtering methods may be performed in cascade.
  • the non-linear characteristic may be selectable with associated filter data in response to a user request for a desired analogue filter emulation.
  • Figure 1 shows a musical instrument arranged to generate sounds, including a musical synthesizer
  • Figure 2 details modules in the synthesizer shown in Figure 1 , including tone generation
  • Figure 3 details the tone generation module shown in Figure 2, including a digital state variable filter
  • Figure 4 details processes for implementing a known form of the state variable filter shown in Figure 3;
  • Figure 5 details processes for implementing an improved version of the digital state variable filter shown in Figure 3, including a non-linear function
  • Figure 6A shows a graphical representation of a first component non- linear characteristic of the non-linear function shown in Figure 5;
  • Figure 6B shows a graphical representation of a second component non-linear characteristic of the non-linear function shown in Figure 5;
  • Figure 7A shows a graphical representation of the relationship between a variable used to control the non-linear characteristic shown in Figure 6A and an overdrive parameter
  • Figure 7B shows a graphical representation of the relationship between a pre-gain parameter and the overdrive parameter
  • Figure 8 compares the response of the filter shown in Figure 4 with the filter shown in Figure 5, to a constant amplitude square wave, with both types of filter arranged to self-oscillate;
  • Figure 9 compares the response of the filter shown in Figure 4 with the filter shown in Figure 5, to a variable amplitude square wave, with both types of filter arranged to self-oscillate;
  • FIG 10 details the hardware circuitry of the preferred embodiment of the tone generator shown in Figure 3, including the filter shown in Figure 5;
  • Figure 11 details the hardware circuitry of an alternative embodiment of the tone generator shown in Figure 3, including the filter shown in Figure 5, and including a digital signal processor;
  • Figure 12 details instructions for the digital signal processor shown in Figure 1, for implementing an embodiment of the filter shown in Figure 5;
  • Figure 13 details arrangements for supplying control parameters to a single filter of the type shown in Figure 5;
  • Figure 14 details arrangements for supplying control parameters to a pair of serially connected filters of the type shown in Figure 5;
  • Figure 15A shows processes for implementing a corner peaking filter, as an alternative to the state variable filter shown in Figure 5, including a non ⁇ linear low pass filter section;
  • Figure 15B details the non-linear low pass filter section shown in
  • Figure 16 shows a known digital canonical all pass filter
  • Figure 17 shows a modified version of the all pass filter shown in Figure 16, including non-linear functions; and Figure 18 shows a representation of data structures held within the memory of a synthesizer arranged to emulate specific analogue filter circuits.
  • a musical synthesizer 101 is shown in Figure 1 which supplies an audio signal to a stereo amplifier 102, which supplies audio signal transducers, such as loudspeakers 103 and 104 with an amplified audio signal.
  • the audio output from the musical synthesizer 101 may also be supplied to audio recording apparatus such as a tape recorder, such that sounds resulting from ' playing the synthesizer 101 may be replayed.
  • a keyboard 201 generates electrical signals in response to notes played on it.
  • the electrical signals are supplied to interface and control processing circuitry on a single chip control processor 202.
  • the electrical signals are interpreted by control processing instructions running on the control processor 202 to generate electrical signals suitable for controlling tone generation circuitry 203, which generates tones of an appropriate pitch, volume and timbre, in response to notes played on the keyboard 201.
  • Digital audio samples from the tone generation circuitry 203 are supplied to a digital to analogue converter 221 , which supplies left and right analogue audio outputs 204. Digital audio samples are generated once for left and right at a rate of forty-four point one kilohertz.
  • the stereo digital to analogue converter 221 includes an oversampling integrated circuit, the SM5803APT, manufactured by Nippon Precision Circuits.
  • the SM5803 generates an over-sampled representation of the stereo digital audio signal, which is supplied at eight times forty-four point one kilohertz, to a high speed digital to analogue converter, comprising a pair of AD1860N-J type eighteen bit converter circuits, manufactured by Analog Devices of Norwood, Massachusetts.
  • a musical instrument digital interface (MIDI) 205 is an alternative source of note information, in addition to the note information supplied from the keyboard 201.
  • a MIDI input 206 may be connected to receive signals from another item of MIDI compatible equipment, such as a computer. Using the MIDI connection, sounds may be produced by the synthesizer without notes being played on the keyboard 201. Electrical signals generated in response to notes played on the keyboard 201 may be translated into suitable MIDI codes which may in turn be supplied to a MIDI output 207.
  • note events resulting from playing the keyboard 201 may be recorded and played back by a computer equipped with a MIDI interface and suitable sequencing software.
  • Front panel controls 209 provide a way of controlling the type of sounds produced when the keyboard 201 is played.
  • the front panel controls 209 include means for selecting pre-defined characteristics of sounds from a library of sounds stored in memory in the control processor 202.
  • the interface and control processing circuitry 202 supplies electrical signals to front panel display devices 210, such as an alphanumeric display 211 and light-emitting diode indicators 212.
  • the front panel display devices 210 give an indication of the status of the synthesizer, for example displaying the numerical index and description of a pre-defined tone generation characteristic which is currently in operation.
  • the front panel controls 209 and the front panel display devices 210 in combination provide facilities for the modification of pre-defined characteristics of tone generation, the results of which may be stored in association with a numerical index for later use.
  • a tone generator 301 receives frequency and tone-defining parameters from the interface and control processing circuitry 202. Suitable methods for tone generation are discussed in Musical Applications of Microprocessors, by Hal Chamberlin, ISBN 0-8104-5753-9, chapter 13.
  • the tone generator generates audio samples at the standard audio sampling rate of forty-four point one kilohertz. Furthermore, each audio sample is represented as a binary number having a precision of twenty-four bits. Samples from the tone generator 301 are supplied to a state variable filter 302, which receives frequency and resonance control parameters from the interface and control processing circuitry 202 shown in Figure 2.
  • the state variable filter 302 generates samples at the standard sampling rate, again having a precision of twenty-four bits, which are supplied to an amplitude modulator 303.
  • the amplitude modulator receives each individual sample and multiplies it by a left amplitude factor to define the left channel sample, and by a right amplitude factor to define the right channel sample.
  • the left and right amplitude factors are supplied to the tone generation circuitry 203 from the interface and control processing circuitry 202.
  • the interface and control processing circuitry 202 supplies control parameters to the tone generator 301 , the state variable filter 302 and the amplitude modulator 303.
  • the tone generator 301 defines a pitch and a primary harmonic structure to the tone which will eventually be heard.
  • the state variable filter 302 modifies the harmonic structure of the tone, increasing the amplitudes of some harmonics and reducing the amplitudes of others, according to the frequency and resonance parameters.
  • the amplitude modulator 303 controls the amplitude envelope of the resulting tone, such that, typically, the sound increases rapidly in amplitude when the note is initially played, and then may decay more slowly when it is released.
  • the amplitude envelope may be controlled by a set of user definable parameters via the user interface 209 and 210. Furthermore, the left and right amplitudes may be independently set, thus allowing a particular position in the stereo field to be selected for the sound, or to achieve a dynamic change in stereo position while the note is held.
  • a note may start with an extremely bright tone, and decay quickly to a less bright tone, in accordance with a tone envelope also defined by the user via the user interface 209.
  • FIG. 4 A straightforward implementation of a twelve decibel-per-octave state variable filter is shown in Figure 4.
  • An audio input sample 401 is supplied to an adder 402.
  • the adder also receives a negated version of the low-pass output 413 and a negated version of the band pass output 406 via a multiplier 408.
  • the output of the adder 402 represents the high-pass output 403 of the filter.
  • the high pass output 403 is also supplied as an input to a multiplier 404, which multiplies by a frequency control parameter FC.
  • the output of the multiplier 404 is supplied to a digital integrator, comprising adder 405 and sample delay 407.
  • a band pass output 406 is derived from this stage of integration.
  • the output of the band-pass integrator is supplied to a multiplier 408.
  • This multiplier multiplies by a parameter QC, which defines the resonance, or band pass peak amplitude, of the state variable filter.
  • QC defines the resonance, or band pass peak amplitude
  • the filter rings at its resonant frequency. If QC is equal to zero, the filter oscillates continuously in response to a single pulse supplied at its input. If QC is negative, this creates positive feedback, and any pulse supplied at the input 401 to the filter will result in a gradual increase in amplitude of sine wave oscillations at the frequency of the filter defined by the frequency parameter FC.
  • the output of the sample delay 407 is supplied to a third multiplier 409, which has the same frequency control parameter FC as the multiplier 404.
  • the output of multiplier 409 is supplied to a second stage of integration comprising adder 410 and sample delay 414. This integration stage results in a low pass output 413 being generated, which is generally the most musically S useful output from the state variable filter.
  • a notch output 412 is generated by adding the high pass 403 and low pass 413 outputs in an adder 411. The notch output 412 rejects all frequencies except those in a narrow band, thus it is also known sometimes as a band reject output.
  • LP low pass sample
  • BP band pass sample
  • HP high pass sample
  • NT notch sample
  • FC frequency control parameter
  • QC resonance or Q control parameter
  • the arrangement of mathematical operations represented by Figure 4 may be performed by suitable multiplexing of a small number of digital circuit components.
  • the multipliers 404, 408 and 409 are all implemented on a single multiplier circuit, with appropriate control signals to define its operations and transfer of data to and from temporary storage registers.
  • the adders 402, 405, 410 and 411 may similarly be multiplexed arrangements of a single arithmetical logic circuit.
  • FIG. 5 An improved state variable filter is shown in Figure 5. The same overall structure is used. However, a sample in the feedback loop in the integrator formed by the adder 510 and the delay 514 is modified by a non ⁇ linear function 515. The non-linear function modifies certain of the characteristics of the digital filter to match those of an analogue filter.
  • an analogue filter fattens harmonics which coincide with its resonant frequency. That is to say, if the filter frequency is swept from a low value to a high value, as each harmonic of the filtered tone is encountered, not only is its own amplitude increased, but a harmonic series, with the boosted harmonic as the fundamental, is added to the output of the filter.
  • amplitudes of existing harmonics are modified, but new harmonics are not synthesised in this way.
  • the non-linear function modifies samples in such a way that harmonics are added, and the modification to a particular sample also affects subsequent samples due to the feedback paths in the filter. This results in the same harmonic fattening effect which can be heard in an analogue filter.
  • an analogue filter attempts to synchronise its resonant frequency with that of a boosted harmonic of the filtered tone. This effect is clearly audible at high levels of filter resonance, or filter oscillation. As the filter is swept from low to high frequencies, as each harmonic is encountered, complex synchronising effects occur. If the frequency of the boosted harmonic and the resonant frequency are very close, the harmonic is boosted, with fattened harmonics, and the filter remains stable. As the resonant frequency of the filter is increased away from VO that of the boosted harmonic, at a certain distinct point the filter will desynchronise. This is identifiable as cyclic boosting and non-boosting of the close harmonic, the rate of which may be equal to the difference in frequencies under certain conditions.
  • harmonic synchronisation does not occur, except at conditions of limiting which are usually avoided.
  • the resonant frequency of known digital filters is independant of the tone which is being supplied to it.
  • the non-linear element modifies a sample in the filter such that subsequent filter samples are affected also.
  • the iterative effect of the non-linear function results in harmonic synchronisation which sounds the same as that which is heard in analogue filters.
  • LP low pass sample
  • BP band pass sample
  • HP high pass sample
  • NT notch sample
  • FC frequency control parameter
  • QC resonance or Q control parameter.
  • f(LP) comprises two superimposed component non-linear characteristics. The first of these is:
  • This function provides a variable degree of curvature, under control of a curve varying value n, which takes a fractional value from zero to one.
  • the sample value x is considered as having a fractional range between minus one and plus one.
  • n no modification to the sample x occurs, as (nx) 3 evaluates to zero.
  • (nx) 3 evaluates to zero.
  • n one, the equation simplifies to x - x 3 .
  • a graph of these two extremes, and a point between them when n 0.75, is shown in Figure 6A. In this way, a controllable degree of curvature may be effected by modification of a single variable.
  • Equation x - (nx) 3 is calculated by manipulation of data in registers and a multiplexed multiplier- accumulator circuit. In this respect, this is a highly efficient equation for many modern computational circuits to perform.
  • An alternative approach would be to store a curve in a look up table. This has the advantage that an arbitrary shaped curve may be used, but has the disadvantage that slight modification to the curve shape would require complex calculations, and additional memory is required. It is not necessary to change the value of n in real time to achieve the distortion effects outlined above. Manipulation of n in real time provides a convenient way to fine tune filter characteristics for a particular sound, as well as the ability to change those characteristics in response to a modulating signal, such as that supplied by a foot pedal.
  • This first non-linear characteristic governs the level of filter distortion when the filter is not in self-oscillation. At lower values of n, the shape of this curve does not provide a soft limiting function suitable for avoiding harsh distortion which can occur when the filter is oscillating. A second component non-linear characteristic is superimposed onto the first, such that, whatever value for n is used, the amplitude of filter oscillation cycles is soft limited to avoid harsh distortion.
  • This characteristic is shown in Figure 6B. This is pre- calculated for a set of values of y and stored in a look-up table having 1025 locations. This look-up table is linearly interpolated to ensure a smooth relationship between input and output twenty-four bit signed fractional values. In an alternative embodiment, it may be possible to perform this calculation using an optimised logic circuit arrangement, thereby avoiding the need for extra memory and a time-consuming linear interpolation.
  • x is the input to the function
  • z is the output
  • n is variable between zero and one to control the level of distortion
  • the filter has a balance of distortion which makes it particularly musical.
  • certain types of sound benefit from different levels of input signal and distortion. For example, some sounds require a very quiet input signal, so that the sound of filter self-oscillation can predominate. Alternatively, a very high degree of distortion may be required, in which case a maximum amplitude input signal is used, and a very high value of n.
  • low levels of input signal may be coupled with low values of n, since the second component non-linear characteristic can predominate when the filter has a high level of ringing, and high levels of input signal may be coupled with high values of n to achieve maximum distortion. Furthermore, it is essential to retain the set of values at which the filter is most musical, which is somewhere between these two extremes.
  • the input level and the curve varying parameter n are both controlled by a single overdrive parameter.
  • the overdrive parameter takes a fractional value between zero and unity.
  • the overdrive value is squared to define the value of n.
  • This relationship is shown in Figure 7A.
  • the level of input signal, called pre-gain is determined by a curve whose response has been determined empirically to provide access to extreme minimum and maximum levels of distortion, while ensuring that the region of most musicality is covered by a significant proportion of the overdrive parameter range. This curve is shown in Figure 7B.
  • the pre-gain is finally determined by squaring the value given by this curve in response to the overdrive parameter.
  • the curve value is used directly when two state variable filters are serially connected.
  • a square waveform 801 of constant amplitude is supplied to the input of the filter.
  • Waveform 802 is the low pass output 413 of the known state variable filter shown in Figure 4.
  • the filter has a negative value of QC, which results in sine wave oscillations being added to the filtered square wave. With a negative value of QC, there is overall positive feedback, and the oscillations quickly build, such that the sum of the oscillation waveform and the filtered square waveform go beyond the numerical range of the filter circuitry, resulting in waveform clipping at 812 and 813.
  • the square wave 801 is set to zero amplitude 811 in order to show the property of self-oscillation. Thus, clipped sine wave oscillations 814 continue even when the input samples are all set to zero.
  • Waveform 803 shows the low pass output 516 of the filter shown in Figure 5. Again a negative value of QC results in self-oscillation. However, this is restricted smoothly, resulting in a musically useful waveform 815.
  • the addition of the filtered square wave and the self oscillating sine wave is non ⁇ linear, resulting in harmonic fattening and harmonic synchronisation.
  • Waveform 804 is also the low pass output 516 from the filter shown in Figure 5. However, this waveform results from an increased amplitude of the input signal 501 compared to that which causes waveform 803. The output from the filter continues oscillating at point 818 after the input square wave samples are reduced to zero.
  • FIG. 9 A similar set of graphs is shown in Figure 9, but with the square wave gradually increasing in amplitude to a peak, and then decaying suddenly.
  • the waveform 901 from the known state variable filter shown in Figure 4 rapidly commences self oscillation 911 , the waveform of which is linearly added to the filtered square wave, quickly building to a point 914 where clipping occurs. Thereafter, the filter continues oscillation and clipping 915.
  • the waveform 903 of the output from the filter shown in Figure 5 adds the self-oscillating and filtered square wave components slightly differently at point 912 to the completely linear addition at point 911. By chance, these waveforms are out of phase when the square wave reduces to zero amplitude 913, and self-oscillations 916 build up quickly to a maximum defined by the non-linear function 515.
  • the waveform 904 represents the behaviour of the filter which generated the waveform 903, but where the filter is supplied with a square wave signal having a greater overall amplitude. Because the amplitude of the square wave is high, this predominates in the waveform which results, which can be seen as having a wavelength equal to that of the square waveform 901 while it is present. When the square waveform reduces to zero 913, the self oscillations take over 918, which have a shorter wavelength, as defined by the frequency control parameter FC of the filter.
  • This graph clearly demonstrates the property of harmonic synchronisation. Again, in order to visually distinguish important characteristics, the filter waveforms shown in Figure 9 result from filters with negative values of QC, thus resulting in self-oscillation. Important effects of this type, but which are less easy to discern visibly in a graph, occur without self-oscillation or even any audible level of ringing. These effects are essential to the musical properties of a filter.
  • Digital circuitry for the preferred embodiment is detailed in Figure 10.
  • the circuitry shown performs the mathematical processes required to implement the tone generator 301 , the state variable filter 302 and the amplitude modulator 303, as shown in Figure 3.
  • the circuit is based around a twenty-four by twenty-four bit multiply- accumulator 1001.
  • the multiply-accumulator 1001 receives two twenty-four bit numbers simultaneously supplied from a Y data bus 1003 and an X data bus 1004.
  • Two basic operations may be performed: The X and Y data bus inputs are multiplied and supplied as an output to the X data bus, or the X and Y data bus inputs are multiplied and also added to the previous multiplication result, a process known as multiply-accumulation. Variants on these two processes are possible. For example, numbers may be in a two's complement or unsigned format. Numbers may also be in a fractional or integer format, affecting the shifting of multiplication product bits. Furthermore, instead of adding, new products may be subtracted from the previous product or sum of products.
  • the X data bus 1004 and the Y data bus 1003 are connected to a five hundred and twelve location dual port random access static memory array 1002, where each location contains a twenty-four bit value.
  • Nine bit addresses are supplied independently to each port of the dual port memory 1002.
  • data from any location in the memory array may be supplied to either data bus. Reading from the same location simultaneously on both ports is permitted.
  • the dual port memory array 1002 also permits data from either data bus to be written to any location in memory. However, writing to the same location simultaneously is not permitted, and has unpredictable results. Protocols are known for prioritising such a conflict. However, circuit complexity is minimised by prohibiting the designer from supplying the same address to both ports of the dual port memory array 1002 when both ports are being written.
  • the control store is a read-only memory array whose address is supplied by a counter.
  • the counter increments at twenty megahertz, thus a new data pattern is supplied by the control store once every fifty nanoseconds.
  • the output from the control store is supplied to a pipeline register, which transfers the data supplied at its input, to its output, also at a rate of twenty megahertz.
  • the same clock which increments the address of the control store read-only memory array also clocks the pipeline register. In this way, propagation delays are reduced for control store signals, such that circuitry which is being controlled may be operated at a high speed.
  • Pipelined control store outputs are designated CO to C39.
  • C31 to C39 supply addresses directly to port B of the dual port memory array 1002.
  • C22 to C30 supply addresses to port A of the dual port memory array 1002 via a buffer 1009 and a register 1010.
  • parameters In order to define parameters of tones which are being generated, parameters must be supplied from a control processor to the dual port memory array 1002. Thus an access cycle is permitted, during which the buffer 1009 has its output set to a high impedance. Simultaneously, the output impedance of a nine-bit register 1008 is set to low impedance, thus supplying an alternative address which is defined by the controlling processor.
  • addresses may be supplied to port A of the dual port memory array 1002 from either the control store via the buffer 1009, or from the controlling processor, via the register 1008.
  • An additional pipeline register 1010 is required to avoid timing delays introduced by switching between either address source.
  • Register 1008 receives nine bit addresses for the location in dual port memory which is to be written. Data which is to be written to this location is supplied from a twenty-four bit data register 1007. Thus, control lines are activated in such a way that, periodically, an address defined by the control processor is written to with data also defined by the control processor.
  • the buffer 1009, and registers 1007, 1008 and 1010 are all dedicated to the task of writing parameters to the dual port memory array 1002.
  • Parameters stored in the dual port memory array 1002 may then be supplied to the multiply accumulator 1001 , and intermediate results stored back in spare locations in the dual port memory array 1002.
  • the various types of operation which may be performed by the multiply-accumulator are defined by control lines CO to C7. These may be changed every fifty nanoseconds.
  • the multiply-accumulator 1001 contains data pipeline registers to achieve a high speed, and the multiply-accumulator 1001 therefore also receives the same twenty megahertz clock signal. Arithmetic .1 processes performed by the circuit are clocked at a rate of twenty megahertz. Thus, in each fifty nanosecond clock cycle, a multiply-accumuiation may be performed, simultaneously with a read or write to both ports of the dual port memory array 1002.
  • control lines C8 and C10 are supplied indirectly from the control store, as their timing must be carefully controlled to prevent a partial write to a memory address occurring while address lines are settling.
  • the circuit shown in Figure 10 includes an address register 1005 supplied by the X data bus 1004. Thus, when control line C12 is asserted, data from the X data bus is transferred to the output of register 1005. The output is supplied as an address to a memory 1006, which stores information used for the look up tables represented as graphs in Figures 6B, 7A and 7B, as well as look up tables which may be used in tone generation such as a sine wave look up table.
  • the filter shown in Figure 5 can be defined in a short sequence of mathematical operations, as has already been described. This sequence of operations is translated into a map of control line states, such that memory read and write cycles and multiply accumulator operations are co-ordinated to achieve the desired mathematical result. This result may then be stored in a location in the dual port memory array 1002.
  • each is supplied, at a predetermined point in the four hundred and fifty three step cycle, to an output register 1012.
  • This has a data width of twenty-four bits, although the mathematical precision of the subsequent digital-to-analogue conversion stages is only eighteen of the most significant bits.
  • data is shifted sequentially in a serial format from a shift register 1013, under control of clocks derived from the digital-to-analogue converter.
  • the circuit of Figure 10 is synchronised to a master sample clock running at forty-four point one thousand kilohertz, the audio sampling rate. Synchronisation is performed by resetting the counter which supplied addresses to the control store which generates the control lines CO to C39.
  • serial data is decoded in accordance with known techniques for serial audio data decoding, and which are described in detail in data literature available on request from Analog Devices, One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, USA.
  • the circuitry of Figure 10 is integrated within a single silicon chip. It will be understood that this will only be economically feasible if large quantities of such a chip are to be manufactured.
  • a DSP56004 digital signal processor may be used to perform the required mathematical operations.
  • the DSP56004 is manufactured by Motorola, and literature is available on request from Motorola literature distribution, P.O. Box 20912, Phoenix, Arizona 85036, USA.
  • a circuit employing the DSP56004 as an alternative to a high volume manufactured custom silicon chip is shown in Figure 11.
  • the digital signal processor 1101 receives control parameters from the host processor, in this case a Motorola 68331 , via a serial host interface 1103. Parameters may be stored in memory on the digital signal processor chip, and additionally on a CY7C198 thirty-two kilobyte static random access memory, manufactured by Cypress Semiconductor Corporation, 3901 North First Street, San Jose, California 95134.
  • An address bus 1105 supplies addresses to the memory 110, and an eight bit data bus 1106 reads and writes data from and to the memory 1104.
  • the DSP56004 may treat memory as comprising twenty-four bit words. Thus, each byte location in the memory 1104 is one third of a data word.
  • the address bus 1105 and data bus 1106 are multiplexed within a memory access cycle, such that a full twenty-four bit word is written or read by the digital signal processor 1101.
  • the digital signal processor contains arithmetic circuits having a precision of twenty-four bits, thus making it suitable for a high quality implementation of the invention.
  • Digital audio data is supplied from a serial audio interface on the digital signal processor 1101 over a serial audio bus
  • Address registers R4 and R5 initially have the same value, and point to the first of a sequence of Y: memory locations which are used for the following audio sample data:
  • the input sample for the filter must be correctly sign extended in the A register when the instructions shown in Figure 12 commence execution. Upon completion, the samples stored in the LP, BP and HP memory registers will hold the new low pass, band pass and high pass samples respectively. It should be understood that this is not a complete set of instructions for implementing a synthesizer on the DSP56004. However, the presentation of instructions shown in Figure 12 should enable the experienced digital signal processing engineer to establish a working embodiment of the invention, and supply it with samples from a tone generator or other source of digital audio samples.
  • the resonance control parameter QC QC
  • a pre-gain parameter 1308 is supplied to the gain stage 1302.
  • the pre gain parameter is derived from a square function 1309, which is in turn supplied from a look up table function 1310, which has the transfer characteristic shown in Figure 7B.
  • the look up table function 1310 is supplied by an overdrive parameter 1311.
  • the overdrive parameter 1311 also supplies a second squaring function 1312, which generates the parameter n 1307 which is supplied to the filter 1303.
  • the reason for squaring the output of the look up table 1310 rather than simply pre-calculating this as part of the look-up table's contents, is that the same look up table can then be used when filters are serially connected, where it is no longer appropriate to have the squaring function for the pre- gain. in other words, the effect of squaring the pre-gain in a single filter arrangement provides the same pre-gain response as when two filters, including two pre-gain processes, are connected in series.
  • a serially connected pair of filters is shown in Figure 14.
  • Audio samples are supplied to an input 1401 , which transfers samples to a first gain stage 1402.
  • the first gain stage 1402 supplies amples to a first filter 1403.
  • the output from the first filter 1403 supplies samples to a second gain stage 1404, which supplies modified samples to a second filter 1405.
  • the output 1406 is taken from the second filter.
  • the values for pre-gain, n and FC are the same for the first filter 1403 and the second filter 1405.
  • the pre-gain for each filter is calculated directly from the output of the look up table function 1310.
  • QC2 QC x 0.7 + 0.3 2.2. where -1 ⁇ QC ⁇ 1 , and QC2 is limited to less than 1.
  • a conversion process 1407 is shown in Figure 14, which enables the correct resonance relationship between the two filters to be maintained.
  • the digital state variable filter shown in Figure 4 has limitations on the values for the frequency control value FC, which depend on the resonance value QC. These restrictions are described by Pierre Dutilleux in the Proceedings of the ' 1989 International Computer Music Conference, published by the Computer Music Association, P.O. Box 1634, San Francisco, California 94101 , USA. Two equations may be derived which define the stability criteria for the digital state variable filter:
  • Equation 2 is used to define the safe area for filter values of FC and QC.
  • the stability criteria for the non-linear version of the state- variable filter shown in Figure 5 may be considered as being the same, except when large input signals are supplied to it.
  • satisfactory results are obtained if the valid range of FC values is reduced by five percent on the range of values given by Equation 2.
  • a maximum value for the FC parameter may be obtained as a result of knowing the value of QC.
  • two state-variable filters are connected as shown in Figure 14, it is necessary to select the highest value of QC1 and QC2 to determine the maximum allowable value for FC.
  • the maximum FC value is determined by the value of QC2, derived from process 1407, supplied to Equation 2.
  • Equation 2 A pre-calculated look-up table is used to implement Equation 2, including the five percent reduction for non- linear effects.
  • FC the maximum value given by Equation 2
  • FIG. 15A An alternative to the improved state variable filter shown in Figure 5 is shown in Figure 15A.
  • the filter comprises four serially connected six decibel-per-octave low pass filter sections, 1503, 1504, 1506 and 1507. Each low pass filter section operates according to the improved arrangement shown in Figure 15B. In combination the result is a twenty-four decibel-per- octave low pass frequency response.
  • Negative feedback 1508 is supplied to an adder 1501 which also receives the input sample. The level of feedback is controlled by a multiplier 1509, having a feedback control variable QC.
  • the filter operates in accordance with a reasonably flat frequency response in the pass band, without any particular range of frequencies being boosted beyond their original amplitude.
  • a small band of frequencies below the cutoff frequencies of the low pass filter sections is boosted.
  • the effects are subtly different, and may be advantageous for a particular type of filter response unobtainable with a pair of serially connected state variable filters.
  • the relationship between QC and actual resonance is extremely non-linear, and is also linked to the cutoff frequency of the low pass filter sections 1503, 1504, 1506 and 1507.
  • Each low pass filter section shown in Figure 15A is defined in accordance with Figure 15B.
  • a multiplier 1521 adjusts the amplitude of the signal prior to filtering, as the gain of the filter is frequency dependent.
  • An adder 1522 combines the adjusted input signal with a proportion of its output which has been delayed by one sample in the delay stage 1523.
  • a non-linear function 1525 provides a controllable level of non-linearity, which is controlled according to the equations descrined above. The level of feedback is controlled by a multiplier 1524, having a gain related to that of the first multiplier 1521.
  • Figure 15B shows a non-linear version of the standard infinite impulse response low pass filter stage. Not all low pass sections 1503, 1504, 1506 and 1507 need contain a linear function 1525, in order to achieve the analogue type distortion effects described previously.
  • non ⁇ linear functions in low pass sections 1504 and 1507 can be of the fixed soft limiting type, described earlier.
  • the existing first non ⁇ linear function 515 is in the feedback loop of the integrator formed by the delay 514 and the summer 510.
  • the second non-linear function may be located in the feedback loop of the integrator formed by the delay 507 and the summer 505.
  • the non-linear functions may be the same or different. This is a matter of fine tuning filter distortion characteristics, and is not necessary for achieving the primary characteristics of harmonic fattening and harmonic synchronisation. However, this level of optimisation may be necessary if a particular analogue filter circuit is to be precisely emulated, such as the filter described in US Patent 3,475,623, by Robert A. Moog.
  • An all pass filter modifies the phase of frequency components in an audio signal without modifying their amplitude.
  • a digital all pass filter can be modified to produce harmonic fattening and harmonic synchronisation effects, without changing the frequency balance, as is the case with the filters which have been described above.
  • Many types of analogue circuit distort without changing the frequency characteristics of a signal.
  • a modified digital all pass filter can be used to simulate the distorting effects of a wide variety of analogue circuitry, from tape recording equipment to power valve amplification.
  • a known digital all pass filter is shown in Figure 16. This is a type of digital all pass filter known as a canonical all pass filter.
  • the non-linear functions 1701 and 1702 are able to act on particular frequencies more than others, even within a filter having an overall flat frequency response. This results in the complex distortion effects which are usually associated only with analogue circuits.
  • the resonance Q and turnover frequency F of the filter shown in Figure 17 are given by:
  • FH upper 90 degree frequency
  • FL lower 90 degree frequency
  • FH - FL is the transition width
  • the interface and control processing circuitry 202 includes memory and processes for associating circuit descriptions with instructions and data. This association is represented in the table shown in Figure 18.
  • a first column 1801 contains an index for each type of circuit. The index value represents a factor to be multiplied by a fixed value and added to an address offset in the memory in the interface and control circuitry 202.
  • a second column contains a fixed length field of ASCII codes representing an alphnumeric description of the circuit, which can be supplied to the alphanumeric 202 display of the synthesiser 101 when the circuit is selected for emulation.
  • a third column 1803 contains pointers to instructions for implementing the model of the selected circuit.
  • the fourth column 1804 contains a value for the pre-gain, and the fifth column 1805 contains the curve varying value n.
  • Each row, 1811 to 1817 of the table shown in Figure 18 provides access to instructions and data which describes an individual filter or circuit which is to be emulated.
  • the arrangement shown in Figure 18 may be adapted to suit the needs of a range of circuits which are to be modelled in the synthesizer 101 or other item of audio processing equipment.

Abstract

A digital filter is arranged to filter samples representing an audio signal. Filtering includes an input (501), an output (516), a delay device (514), gain devices (504, 509) and feed back path. A filter is arranged such that a characteristic frequency at said output is controllable by the gain devices. When processing each input sample, a non-linear element (515) has a non-linear characteristic which is arranged to modify a filter sample, such that a sample in the feed back path (514, 515, 510) is affected by an iteration of said non-linear element.

Description

DIGITAL FILTER
The present invention relates to digitally filtering samples representing an audio signal.
INTRODUCTION
It is known that digital filters can provide improvements in performance in comparison with analogue filtering techniques. However, in the field of audio signal processing, known digital filters lack certain of the characteristics of analog filters which are important for the creation and or modification of musical tones.
SUMMARY OF THE INVENTION According to a first aspect of the invention there is provided a digital filter for filtering samples representing an audio signal, comprising an input, an output, delay means, gain means, and at least one feed back path, arranged such that a characteristic frequency at said output is controllable by said gain means, wherein when processing each input sample, a non-linear element having a non-linear characteristic is arranged to modify a filter sample, such that a sample in said feed back path is affected by an iteration of said non-linear element.
Preferably, the non-linear characteristic is curved and the shape of said curve may be controllable in real time. Preferably, the shape is controllable while an audio signal is being filtered.
In a prefered embodiment, filter is configured as a state variable filter having two stages of integration, wherein said non-linear element is included in the feed back path of at least one of said integrators.
According to a second aspect of the present invention, there is provided a method of filtering samples representing an audio signal, comprising steps of supplying digitised samples to an input and receiving filtered samples from an output, wherein said samples are processed by a delay means, gain means and at least one feed back path, arranged such that a characteristic frequency at said output is controllable by said gain means; and processing each input sample such that a non-linear element having a non-linear characteristic is arranged to modify a filter sample such that a sample in said feed back path is affected by an iteration of said non- linear element.
In a preferred embodyment, the gain means is controllable for defining a resonance characteristic and said resonance characteristic may include self oscillation.
Preferably, the method is arranged to form a state variable method having two stages of integration, wherein the non-linear element is included in the feed back path of at least one of the integration stages.
The filtering method may be an all pass filtering method and the plurality of filtering methods may be performed in cascade. The non-linear characteristic may be selectable with associated filter data in response to a user request for a desired analogue filter emulation.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 shows a musical instrument arranged to generate sounds, including a musical synthesizer; Figure 2 details modules in the synthesizer shown in Figure 1 , including tone generation;
Figure 3 details the tone generation module shown in Figure 2, including a digital state variable filter;
Figure 4 details processes for implementing a known form of the state variable filter shown in Figure 3;
Figure 5 details processes for implementing an improved version of the digital state variable filter shown in Figure 3, including a non-linear function;
Figure 6A shows a graphical representation of a first component non- linear characteristic of the non-linear function shown in Figure 5;
Figure 6B shows a graphical representation of a second component non-linear characteristic of the non-linear function shown in Figure 5;
Figure 7A shows a graphical representation of the relationship between a variable used to control the non-linear characteristic shown in Figure 6A and an overdrive parameter;
Figure 7B shows a graphical representation of the relationship between a pre-gain parameter and the overdrive parameter; Figure 8 compares the response of the filter shown in Figure 4 with the filter shown in Figure 5, to a constant amplitude square wave, with both types of filter arranged to self-oscillate;
Figure 9 compares the response of the filter shown in Figure 4 with the filter shown in Figure 5, to a variable amplitude square wave, with both types of filter arranged to self-oscillate;
Figure 10 details the hardware circuitry of the preferred embodiment of the tone generator shown in Figure 3, including the filter shown in Figure 5;
Figure 11 details the hardware circuitry of an alternative embodiment of the tone generator shown in Figure 3, including the filter shown in Figure 5, and including a digital signal processor;
Figure 12 details instructions for the digital signal processor shown in Figure 1, for implementing an embodiment of the filter shown in Figure 5;
Figure 13 details arrangements for supplying control parameters to a single filter of the type shown in Figure 5; Figure 14 details arrangements for supplying control parameters to a pair of serially connected filters of the type shown in Figure 5;
Figure 15A shows processes for implementing a corner peaking filter, as an alternative to the state variable filter shown in Figure 5, including a non¬ linear low pass filter section; Figure 15B details the non-linear low pass filter section shown in
Figure 13A;
Figure 16 shows a known digital canonical all pass filter;
Figure 17 shows a modified version of the all pass filter shown in Figure 16, including non-linear functions; and Figure 18 shows a representation of data structures held within the memory of a synthesizer arranged to emulate specific analogue filter circuits.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The invention will now be described by way of example only with reference to the accompanying drawings, identified above.
A musical synthesizer 101 is shown in Figure 1 which supplies an audio signal to a stereo amplifier 102, which supplies audio signal transducers, such as loudspeakers 103 and 104 with an amplified audio signal. The audio output from the musical synthesizer 101 may also be supplied to audio recording apparatus such as a tape recorder, such that sounds resulting from' playing the synthesizer 101 may be replayed.
Modules operating in the musical synthesizer shown in Figure 1 are detailed in Figure 2. A keyboard 201 generates electrical signals in response to notes played on it. The electrical signals are supplied to interface and control processing circuitry on a single chip control processor 202. The electrical signals are interpreted by control processing instructions running on the control processor 202 to generate electrical signals suitable for controlling tone generation circuitry 203, which generates tones of an appropriate pitch, volume and timbre, in response to notes played on the keyboard 201.
Digital audio samples from the tone generation circuitry 203 are supplied to a digital to analogue converter 221 , which supplies left and right analogue audio outputs 204. Digital audio samples are generated once for left and right at a rate of forty-four point one kilohertz. The stereo digital to analogue converter 221 includes an oversampling integrated circuit, the SM5803APT, manufactured by Nippon Precision Circuits. The SM5803 generates an over-sampled representation of the stereo digital audio signal, which is supplied at eight times forty-four point one kilohertz, to a high speed digital to analogue converter, comprising a pair of AD1860N-J type eighteen bit converter circuits, manufactured by Analog Devices of Norwood, Massachusetts.
A musical instrument digital interface (MIDI) 205 is an alternative source of note information, in addition to the note information supplied from the keyboard 201. A MIDI input 206 may be connected to receive signals from another item of MIDI compatible equipment, such as a computer. Using the MIDI connection, sounds may be produced by the synthesizer without notes being played on the keyboard 201. Electrical signals generated in response to notes played on the keyboard 201 may be translated into suitable MIDI codes which may in turn be supplied to a MIDI output 207. By providing a MIDI input 206 and a MIDI output 207 on the synthesizer 101 , note events resulting from playing the keyboard 201 may be recorded and played back by a computer equipped with a MIDI interface and suitable sequencing software.
Front panel controls 209 provide a way of controlling the type of sounds produced when the keyboard 201 is played. The front panel controls 209 include means for selecting pre-defined characteristics of sounds from a library of sounds stored in memory in the control processor 202. In response to manual operation of the front panel controls 209, the interface and control processing circuitry 202 supplies electrical signals to front panel display devices 210, such as an alphanumeric display 211 and light-emitting diode indicators 212. The front panel display devices 210 give an indication of the status of the synthesizer, for example displaying the numerical index and description of a pre-defined tone generation characteristic which is currently in operation.
The front panel controls 209 and the front panel display devices 210 in combination provide facilities for the modification of pre-defined characteristics of tone generation, the results of which may be stored in association with a numerical index for later use.
Operations required for tone generation are summarised in Figure 3. A tone generator 301 receives frequency and tone-defining parameters from the interface and control processing circuitry 202. Suitable methods for tone generation are discussed in Musical Applications of Microprocessors, by Hal Chamberlin, ISBN 0-8104-5753-9, chapter 13. The tone generator generates audio samples at the standard audio sampling rate of forty-four point one kilohertz. Furthermore, each audio sample is represented as a binary number having a precision of twenty-four bits. Samples from the tone generator 301 are supplied to a state variable filter 302, which receives frequency and resonance control parameters from the interface and control processing circuitry 202 shown in Figure 2. The state variable filter 302 generates samples at the standard sampling rate, again having a precision of twenty-four bits, which are supplied to an amplitude modulator 303. The amplitude modulator receives each individual sample and multiplies it by a left amplitude factor to define the left channel sample, and by a right amplitude factor to define the right channel sample. The left and right amplitude factors are supplied to the tone generation circuitry 203 from the interface and control processing circuitry 202.
Thus, when a note is played on the keyboard 201 , or a midi note event is received by the midi input 206, the interface and control processing circuitry 202 supplies control parameters to the tone generator 301 , the state variable filter 302 and the amplitude modulator 303. The tone generator 301 defines a pitch and a primary harmonic structure to the tone which will eventually be heard. The state variable filter 302 modifies the harmonic structure of the tone, increasing the amplitudes of some harmonics and reducing the amplitudes of others, according to the frequency and resonance parameters. The amplitude modulator 303 controls the amplitude envelope of the resulting tone, such that, typically, the sound increases rapidly in amplitude when the note is initially played, and then may decay more slowly when it is released. The amplitude envelope may be controlled by a set of user definable parameters via the user interface 209 and 210. Furthermore, the left and right amplitudes may be independently set, thus allowing a particular position in the stereo field to be selected for the sound, or to achieve a dynamic change in stereo position while the note is held.
By appropriate manipulation of the parameters supplied to the tone generator 301 and the state variable filter 302, dynamic changes in harmonic structure may be achieved in addition to changes in overall amplitude which have already been described. Thus a note may start with an extremely bright tone, and decay quickly to a less bright tone, in accordance with a tone envelope also defined by the user via the user interface 209.
It is known that parameters supplied to a state variable filter 302 provide a highly intuitive approach to controlling harmonic structure, particularly when compared with other methods of musical synthesis. Thus it is highly desirable that the effects achieved by manipulation of the state variable filter should be as dramatic and musical as possible. A straightforward implementation of a state variable filter, when performed to a high level of precision, results in a clean undistorted waveform. Thus, although harmonics are cut or boosted, sometimes to a great extent, the overall character of the sound is not dramatically changed. It is well established that this transparent quality is inherently less musical than the highly complex harmonic manipulations which occur when a state variable filter, or other synthesizer filter, is implemented in the analogue as opposed to digital domain.
A straightforward implementation of a twelve decibel-per-octave state variable filter is shown in Figure 4. An audio input sample 401 is supplied to an adder 402. The adder also receives a negated version of the low-pass output 413 and a negated version of the band pass output 406 via a multiplier 408. Thus the output of the adder 402 represents the high-pass output 403 of the filter. The high pass output 403 is also supplied as an input to a multiplier 404, which multiplies by a frequency control parameter FC. The output of the multiplier 404 is supplied to a digital integrator, comprising adder 405 and sample delay 407.
A band pass output 406 is derived from this stage of integration. The output of the band-pass integrator is supplied to a multiplier 408. This multiplier multiplies by a parameter QC, which defines the resonance, or band pass peak amplitude, of the state variable filter. Thus, when QC has a value of one, resonance is only slight. When QC is reduced to near zero, the filter rings at its resonant frequency. If QC is equal to zero, the filter oscillates continuously in response to a single pulse supplied at its input. If QC is negative, this creates positive feedback, and any pulse supplied at the input 401 to the filter will result in a gradual increase in amplitude of sine wave oscillations at the frequency of the filter defined by the frequency parameter FC.
The output of the sample delay 407 is supplied to a third multiplier 409, which has the same frequency control parameter FC as the multiplier 404. The output of multiplier 409 is supplied to a second stage of integration comprising adder 410 and sample delay 414. This integration stage results in a low pass output 413 being generated, which is generally the most musically S useful output from the state variable filter. A notch output 412, is generated by adding the high pass 403 and low pass 413 outputs in an adder 411. The notch output 412 rejects all frequencies except those in a narrow band, thus it is also known sometimes as a band reject output. Characteristics for all four outputs of a state variable filter are described in Musical Applications of Microprocessors, by Hal Chamberlin, ISBN 0-8104-5753-9, pages 206 to 207. The digital implementation of a state variable filter is described on pages 441 to 444 of the same book.
The operations required to calculate the four output samples 403, 406, 413 and 412 from each input sample 401 , may be described as the following mathematical sequence:
LP = LP + FC x BP HP = INPUT - LP - QC * BP BP = FC * HP + BP
NT = HP + LP
where LP = low pass sample, BP = band pass sample, HP = high pass sample, NT = notch sample, FC = frequency control parameter and QC = resonance or Q control parameter.
The arrangement of mathematical operations represented by Figure 4 may be performed by suitable multiplexing of a small number of digital circuit components. For example, the multipliers 404, 408 and 409 are all implemented on a single multiplier circuit, with appropriate control signals to define its operations and transfer of data to and from temporary storage registers. The adders 402, 405, 410 and 411 may similarly be multiplexed arrangements of a single arithmetical logic circuit.
An improved state variable filter is shown in Figure 5. The same overall structure is used. However, a sample in the feedback loop in the integrator formed by the adder 510 and the delay 514 is modified by a non¬ linear function 515. The non-linear function modifies certain of the characteristics of the digital filter to match those of an analogue filter.
There are three types of behaviour which characterise analogue filter distortion. These are: self-oscillation, harmonic fattening and harmonic synchronisation.
In self oscillation, negative values of QC result in a gradual increase in the amplitude of filter oscillation cycles, whose frequency is defined by the filter centre frequency, controlled by FC. Thus the filter becomes a sine wave oscillator, and adds these oscillations to the filtered output signal. In known digital filters, these oscillations will eventually reach a point where filter samples become limited to their maximum excursion. This is tolerable provided that the input signal to the filter is relatively small, and that QC only just goes negative. Outside these conditions, unmusical digital distortion will become clearly apparent. In the present invention, the non-linear function 515 softly limits sample values at a critical node in the filter, such that a broader range of musical effects can be achieved during conditions of filter self-oscillation. In harmonic fattening, an analogue filter fattens harmonics which coincide with its resonant frequency. That is to say, if the filter frequency is swept from a low value to a high value, as each harmonic of the filtered tone is encountered, not only is its own amplitude increased, but a harmonic series, with the boosted harmonic as the fundamental, is added to the output of the filter. In known digital filters, amplitudes of existing harmonics are modified, but new harmonics are not synthesised in this way. In the present invention, the non-linear function modifies samples in such a way that harmonics are added, and the modification to a particular sample also affects subsequent samples due to the feedback paths in the filter. This results in the same harmonic fattening effect which can be heard in an analogue filter.
In harmonic synchronisation, an analogue filter attempts to synchronise its resonant frequency with that of a boosted harmonic of the filtered tone. This effect is clearly audible at high levels of filter resonance, or filter oscillation. As the filter is swept from low to high frequencies, as each harmonic is encountered, complex synchronising effects occur. If the frequency of the boosted harmonic and the resonant frequency are very close, the harmonic is boosted, with fattened harmonics, and the filter remains stable. As the resonant frequency of the filter is increased away from VO that of the boosted harmonic, at a certain distinct point the filter will desynchronise. This is identifiable as cyclic boosting and non-boosting of the close harmonic, the rate of which may be equal to the difference in frequencies under certain conditions. As the resonant frequency of the filter is swept from low to high, synchronisation and desynchronisation occur as each harmonic is encountered. These effects are highly complex even under simple conditions. When the high, closely spaced upper harmonics of a tone are encountered, this complexity is increased even further.
In known digital filters harmonic synchronisation does not occur, except at conditions of limiting which are usually avoided. Thus the resonant frequency of known digital filters is independant of the tone which is being supplied to it. In the invention, the non-linear element modifies a sample in the filter such that subsequent filter samples are affected also. The iterative effect of the non-linear function results in harmonic synchronisation which sounds the same as that which is heard in analogue filters.
The mathematical sequence required to calculate low pass, band pass, high pass and notch output samples from an input sample according to the improved filter structure shown in Figure 5 is:
LP = f(LP) + FC x BP
HP = INPUT - LP - QC x BP BP = FC x HP + BP NT = HP + LP
where, as before, LP = low pass sample, BP = band pass sample, HP = high pass sample, NT = notch sample, FC = frequency control parameter and QC = resonance or Q control parameter. f(LP) denotes the non-linear function.
In the preferred embodiment, f(LP) comprises two superimposed component non-linear characteristics. The first of these is:
y = x - (nx)3 XI
This function provides a variable degree of curvature, under control of a curve varying value n, which takes a fractional value from zero to one. The sample value x is considered as having a fractional range between minus one and plus one. When n is zero, no modification to the sample x occurs, as (nx)3 evaluates to zero. When n is one, the equation simplifies to x - x3. A graph of these two extremes, and a point between them when n = 0.75, is shown in Figure 6A. In this way, a controllable degree of curvature may be effected by modification of a single variable. The equation x - (nx)3 is calculated by manipulation of data in registers and a multiplexed multiplier- accumulator circuit. In this respect, this is a highly efficient equation for many modern computational circuits to perform. An alternative approach would be to store a curve in a look up table. This has the advantage that an arbitrary shaped curve may be used, but has the disadvantage that slight modification to the curve shape would require complex calculations, and additional memory is required. It is not necessary to change the value of n in real time to achieve the distortion effects outlined above. Manipulation of n in real time provides a convenient way to fine tune filter characteristics for a particular sound, as well as the ability to change those characteristics in response to a modulating signal, such as that supplied by a foot pedal. This first non-linear characteristic governs the level of filter distortion when the filter is not in self-oscillation. At lower values of n, the shape of this curve does not provide a soft limiting function suitable for avoiding harsh distortion which can occur when the filter is oscillating. A second component non-linear characteristic is superimposed onto the first, such that, whatever value for n is used, the amplitude of filter oscillation cycles is soft limited to avoid harsh distortion. If y is considered as the output from the first non-linear characteristic, and z is the final output from the non-linear function 515, the second non-linear characteristic may be written as the following sequence of logical statements: z = y if y > threshold then z = y - 2 (y - threshold)3 if y < -threshold then z = y - 2 (y + threshold)3 where threshold is 0.65 \Z
The shape of this characteristic is shown in Figure 6B. This is pre- calculated for a set of values of y and stored in a look-up table having 1025 locations. This look-up table is linearly interpolated to ensure a smooth relationship between input and output twenty-four bit signed fractional values. In an alternative embodiment, it may be possible to perform this calculation using an optimised logic circuit arrangement, thereby avoiding the need for extra memory and a time-consuming linear interpolation.
In summary, the combination of superimposed non-linear characteristics f(x) in the non-linear function 515 may be written:
y = x - (nx)3 z = y if y > 0.65 then z = y - 2 (y - 0.65)3 if y < -0.65 then z = y - 2 (y + 0.65)3
where x is the input to the function, z is the output, and n is variable between zero and one to control the level of distortion.
The above equations work best when the peak-to-peak amplitude of tone samples supplied to the input of the filter is just less than a quarter of the maximum sample range of -1 to +1. When this condition is satisfied, and the curve varying parameter n has a value of between 0.04 and 0.36, the filter has a balance of distortion which makes it particularly musical. However, certain types of sound benefit from different levels of input signal and distortion. For example, some sounds require a very quiet input signal, so that the sound of filter self-oscillation can predominate. Alternatively, a very high degree of distortion may be required, in which case a maximum amplitude input signal is used, and a very high value of n. From this a rough correspondence can be observed: low levels of input signal may be coupled with low values of n, since the second component non-linear characteristic can predominate when the filter has a high level of ringing, and high levels of input signal may be coupled with high values of n to achieve maximum distortion. Furthermore, it is essential to retain the set of values at which the filter is most musical, which is somewhere between these two extremes.
The input level and the curve varying parameter n are both controlled by a single overdrive parameter. The overdrive parameter takes a fractional value between zero and unity. The overdrive value is squared to define the value of n. This relationship is shown in Figure 7A. The level of input signal, called pre-gain, is determined by a curve whose response has been determined empirically to provide access to extreme minimum and maximum levels of distortion, while ensuring that the region of most musicality is covered by a significant proportion of the overdrive parameter range. This curve is shown in Figure 7B. For reasons explained later, the pre-gain is finally determined by squaring the value given by this curve in response to the overdrive parameter. The curve value is used directly when two state variable filters are serially connected.
The response of the arrangement shown in Figure 5 is compared with the known filter arrangement of Figure 4, in Figure 8. A square waveform 801 of constant amplitude is supplied to the input of the filter. Waveform 802 is the low pass output 413 of the known state variable filter shown in Figure 4. The filter has a negative value of QC, which results in sine wave oscillations being added to the filtered square wave. With a negative value of QC, there is overall positive feedback, and the oscillations quickly build, such that the sum of the oscillation waveform and the filtered square waveform go beyond the numerical range of the filter circuitry, resulting in waveform clipping at 812 and 813.
The square wave 801 is set to zero amplitude 811 in order to show the property of self-oscillation. Thus, clipped sine wave oscillations 814 continue even when the input samples are all set to zero.
Waveform 803 shows the low pass output 516 of the filter shown in Figure 5. Again a negative value of QC results in self-oscillation. However, this is restricted smoothly, resulting in a musically useful waveform 815. The addition of the filtered square wave and the self oscillating sine wave is non¬ linear, resulting in harmonic fattening and harmonic synchronisation. Waveform 804 is also the low pass output 516 from the filter shown in Figure 5. However, this waveform results from an increased amplitude of the input signal 501 compared to that which causes waveform 803. The output from the filter continues oscillating at point 818 after the input square wave samples are reduced to zero.
A similar set of graphs is shown in Figure 9, but with the square wave gradually increasing in amplitude to a peak, and then decaying suddenly. The waveform 901 from the known state variable filter shown in Figure 4 rapidly commences self oscillation 911 , the waveform of which is linearly added to the filtered square wave, quickly building to a point 914 where clipping occurs. Thereafter, the filter continues oscillation and clipping 915. The waveform 903 of the output from the filter shown in Figure 5 adds the self-oscillating and filtered square wave components slightly differently at point 912 to the completely linear addition at point 911. By chance, these waveforms are out of phase when the square wave reduces to zero amplitude 913, and self-oscillations 916 build up quickly to a maximum defined by the non-linear function 515.
The waveform 904 represents the behaviour of the filter which generated the waveform 903, but where the filter is supplied with a square wave signal having a greater overall amplitude. Because the amplitude of the square wave is high, this predominates in the waveform which results, which can be seen as having a wavelength equal to that of the square waveform 901 while it is present. When the square waveform reduces to zero 913, the self oscillations take over 918, which have a shorter wavelength, as defined by the frequency control parameter FC of the filter. This graph clearly demonstrates the property of harmonic synchronisation. Again, in order to visually distinguish important characteristics, the filter waveforms shown in Figure 9 result from filters with negative values of QC, thus resulting in self-oscillation. Important effects of this type, but which are less easy to discern visibly in a graph, occur without self-oscillation or even any audible level of ringing. These effects are essential to the musical properties of a filter.
Digital circuitry for the preferred embodiment is detailed in Figure 10. The circuitry shown performs the mathematical processes required to implement the tone generator 301 , the state variable filter 302 and the amplitude modulator 303, as shown in Figure 3.
The circuit is based around a twenty-four by twenty-four bit multiply- accumulator 1001. The multiply-accumulator 1001 receives two twenty-four bit numbers simultaneously supplied from a Y data bus 1003 and an X data bus 1004. Two basic operations may be performed: The X and Y data bus inputs are multiplied and supplied as an output to the X data bus, or the X and Y data bus inputs are multiplied and also added to the previous multiplication result, a process known as multiply-accumulation. Variants on these two processes are possible. For example, numbers may be in a two's complement or unsigned format. Numbers may also be in a fractional or integer format, affecting the shifting of multiplication product bits. Furthermore, instead of adding, new products may be subtracted from the previous product or sum of products.
The X data bus 1004 and the Y data bus 1003 are connected to a five hundred and twelve location dual port random access static memory array 1002, where each location contains a twenty-four bit value. Nine bit addresses are supplied independently to each port of the dual port memory 1002. Thus, data from any location in the memory array may be supplied to either data bus. Reading from the same location simultaneously on both ports is permitted. The dual port memory array 1002 also permits data from either data bus to be written to any location in memory. However, writing to the same location simultaneously is not permitted, and has unpredictable results. Protocols are known for prioritising such a conflict. However, circuit complexity is minimised by prohibiting the designer from supplying the same address to both ports of the dual port memory array 1002 when both ports are being written.
Nine bit addresses for the dual port memory array are supplied from a pipelined control store, which is not shown in Figure 10 for reasons of clarity. The control store is a read-only memory array whose address is supplied by a counter. The counter increments at twenty megahertz, thus a new data pattern is supplied by the control store once every fifty nanoseconds. The output from the control store is supplied to a pipeline register, which transfers the data supplied at its input, to its output, also at a rate of twenty megahertz. The same clock which increments the address of the control store read-only memory array also clocks the pipeline register. In this way, propagation delays are reduced for control store signals, such that circuitry which is being controlled may be operated at a high speed. Pipelined control store outputs are designated CO to C39. C31 to C39 supply addresses directly to port B of the dual port memory array 1002. C22 to C30 supply addresses to port A of the dual port memory array 1002 via a buffer 1009 and a register 1010. In order to define parameters of tones which are being generated, parameters must be supplied from a control processor to the dual port memory array 1002. Thus an access cycle is permitted, during which the buffer 1009 has its output set to a high impedance. Simultaneously, the output impedance of a nine-bit register 1008 is set to low impedance, thus supplying an alternative address which is defined by the controlling processor. Thus addresses may be supplied to port A of the dual port memory array 1002 from either the control store via the buffer 1009, or from the controlling processor, via the register 1008. An additional pipeline register 1010 is required to avoid timing delays introduced by switching between either address source.
Register 1008 receives nine bit addresses for the location in dual port memory which is to be written. Data which is to be written to this location is supplied from a twenty-four bit data register 1007. Thus, control lines are activated in such a way that, periodically, an address defined by the control processor is written to with data also defined by the control processor. The buffer 1009, and registers 1007, 1008 and 1010 are all dedicated to the task of writing parameters to the dual port memory array 1002.
Parameters stored in the dual port memory array 1002 may then be supplied to the multiply accumulator 1001 , and intermediate results stored back in spare locations in the dual port memory array 1002. The various types of operation which may be performed by the multiply-accumulator are defined by control lines CO to C7. These may be changed every fifty nanoseconds. Furthermore, the multiply-accumulator 1001 contains data pipeline registers to achieve a high speed, and the multiply-accumulator 1001 therefore also receives the same twenty megahertz clock signal. Arithmetic .1 processes performed by the circuit are clocked at a rate of twenty megahertz. Thus, in each fifty nanosecond clock cycle, a multiply-accumuiation may be performed, simultaneously with a read or write to both ports of the dual port memory array 1002. It should be noted that the write enable controls of the dual port memory array are supplied by control lines C8 and C10. These are supplied indirectly from the control store, as their timing must be carefully controlled to prevent a partial write to a memory address occurring while address lines are settling. The circuit shown in Figure 10 includes an address register 1005 supplied by the X data bus 1004. Thus, when control line C12 is asserted, data from the X data bus is transferred to the output of register 1005. The output is supplied as an address to a memory 1006, which stores information used for the look up tables represented as graphs in Figures 6B, 7A and 7B, as well as look up tables which may be used in tone generation such as a sine wave look up table.
The filter shown in Figure 5 can be defined in a short sequence of mathematical operations, as has already been described. This sequence of operations is translated into a map of control line states, such that memory read and write cycles and multiply accumulator operations are co-ordinated to achieve the desired mathematical result. This result may then be stored in a location in the dual port memory array 1002.
Using the circuit shown in Figure 10, operations are performed at a rate of twenty million per second. With an audio sampling rate of forty-four point one kilohertz, this provides a control sequence of four hundred and fifty- three steps. The calculation of a tone generator 301, a state variable filter 302 and an amplitude modulator 303 does not consume all the steps which are available. In fact, two such calculation sequences may be performed, enabling more than one note to be played at a time. Thus each left and right output 304, from each independent tone generating sequence may be summed to form an overall left and right sample pair. Summing of each of the left and right output totals is performed by repeated multiply accumulations. Once a left and right output sample has been calculated, each is supplied, at a predetermined point in the four hundred and fifty three step cycle, to an output register 1012. This has a data width of twenty-four bits, although the mathematical precision of the subsequent digital-to-analogue conversion stages is only eighteen of the most significant bits. Once supplied to the parallel output register 1012, data is shifted sequentially in a serial format from a shift register 1013, under control of clocks derived from the digital-to-analogue converter. The circuit of Figure 10 is synchronised to a master sample clock running at forty-four point one thousand kilohertz, the audio sampling rate. Synchronisation is performed by resetting the counter which supplied addresses to the control store which generates the control lines CO to C39. This synchronisation is such that the final fifty nanosecond cycle in each four hundred and fifty-three step sequence is allowed to finish before the counter resets. Furthermore, because the relationship between the processing clock of twenty-megahertz and the sample rate of forty-four point one kilohertz is not an integer ratio, some cycles will contain four hundred and fifty-four steps. Thus a dummy cycle, preventing data from being corrupted, must be present at the end of the four hundred and fifty- three steps which are always done. The serial data is decoded in accordance with known techniques for serial audio data decoding, and which are described in detail in data literature available on request from Analog Devices, One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, USA.
In the preferred embodiment, the circuitry of Figure 10 is integrated within a single silicon chip. It will be understood that this will only be economically feasible if large quantities of such a chip are to be manufactured. In an alternative embodiment for low volume manufacture, a DSP56004 digital signal processor may be used to perform the required mathematical operations. The DSP56004 is manufactured by Motorola, and literature is available on request from Motorola literature distribution, P.O. Box 20912, Phoenix, Arizona 85036, USA.
A circuit employing the DSP56004 as an alternative to a high volume manufactured custom silicon chip is shown in Figure 11. The digital signal processor 1101 receives control parameters from the host processor, in this case a Motorola 68331 , via a serial host interface 1103. Parameters may be stored in memory on the digital signal processor chip, and additionally on a CY7C198 thirty-two kilobyte static random access memory, manufactured by Cypress Semiconductor Corporation, 3901 North First Street, San Jose, California 95134. An address bus 1105 supplies addresses to the memory 110, and an eight bit data bus 1106 reads and writes data from and to the memory 1104. The DSP56004 may treat memory as comprising twenty-four bit words. Thus, each byte location in the memory 1104 is one third of a data word. The address bus 1105 and data bus 1106 are multiplexed within a memory access cycle, such that a full twenty-four bit word is written or read by the digital signal processor 1101.
The digital signal processor contains arithmetic circuits having a precision of twenty-four bits, thus making it suitable for a high quality implementation of the invention. Digital audio data is supplied from a serial audio interface on the digital signal processor 1101 over a serial audio bus
1107 to a digital to analogue converter.
Instructions for the DSP56004 digital signal processor shown in Figure 11 for calculating a single iteration of the filter shown in Figure 5 are detailed in Figure 12. Certain initial conditions are required for the instructions to operate correctly on the DSP56004. Initially address register R3 must point to the first of a sequence of X: memory locations containing the following variables: n Curve varying parameter
FC Filter frequency parameter / 2 Pre-gain Input gain control
QC Filter resonance
Address registers R4 and R5 initially have the same value, and point to the first of a sequence of Y: memory locations which are used for the following audio sample data:
LP Low pass output
Input Filter input temporary storage
BP Band pass output HP High pass output
Also used are some memory locations which must contain the following constants: Y:K2 #2
Y:ASR14 #1.0/@POW(2,14)
X:LIMIT_LUT Centre address of 1025 step limit LUT
X:LIMIT_LUT_DIFF Centre address of 1024 step limit differential
LUT
The input sample for the filter must be correctly sign extended in the A register when the instructions shown in Figure 12 commence execution. Upon completion, the samples stored in the LP, BP and HP memory registers will hold the new low pass, band pass and high pass samples respectively. It should be understood that this is not a complete set of instructions for implementing a synthesizer on the DSP56004. However, the presentation of instructions shown in Figure 12 should enable the experienced digital signal processing engineer to establish a working embodiment of the invention, and supply it with samples from a tone generator or other source of digital audio samples.
The derivation of values for n and pre-gain from overdrive are summarised in the filter arrangement shown in Figure 13. Audio samples are supplied to an input 1301. The amplitude of these samples is modifies by a gain stage 1302. Signals from the gain stage 1302 are supplied to the filter 1303, which is detailed in Figure 5. The filter generates output samples, which are supplied to an output 1304. Control parameters are supplied to the filter to determine its characteristics. The frequency control parameter FC
1305 controls the centre frequency. The resonance control parameter QC
1306 controls the Q or resonance of the filter, which may be a negative value to enable sustained filter self-oscillation. The curve varying parameter n 1307 controls the non-linearity of the filter. A pre-gain parameter 1308 is supplied to the gain stage 1302. The pre gain parameter is derived from a square function 1309, which is in turn supplied from a look up table function 1310, which has the transfer characteristic shown in Figure 7B. The look up table function 1310 is supplied by an overdrive parameter 1311. The overdrive parameter 1311 also supplies a second squaring function 1312, which generates the parameter n 1307 which is supplied to the filter 1303. The reason for squaring the output of the look up table 1310 rather than simply pre-calculating this as part of the look-up table's contents, is that the same look up table can then be used when filters are serially connected, where it is no longer appropriate to have the squaring function for the pre- gain. in other words, the effect of squaring the pre-gain in a single filter arrangement provides the same pre-gain response as when two filters, including two pre-gain processes, are connected in series.
A serially connected pair of filters is shown in Figure 14. Here the different methods for deriving control values for pre-gain and QC can be compared with Figure 13. Audio samples are supplied to an input 1401 , which transfers samples to a first gain stage 1402. The first gain stage 1402 supplies amples to a first filter 1403. The output from the first filter 1403 supplies samples to a second gain stage 1404, which supplies modified samples to a second filter 1405. The output 1406 is taken from the second filter. The values for pre-gain, n and FC are the same for the first filter 1403 and the second filter 1405. The pre-gain for each filter is calculated directly from the output of the look up table function 1310.
The resonance settings for each filter in the pair of serially connected filters 1403 and 1405 are different. A problem arises if both filters have the same resonance, as if the resonance is high, with QC close or equal to zero, both filters will have high amplitude ringing or self-oscillation. Having both filters self oscillating is usually unnecessary, and results in excessive and unmusical distortion. A solution, obtained through experimentation, is to reduce the resonance of the second filter with respect to the first one. Thus two Q control values are derived from QC, called QC1 and QC2, which are supplied respectively to each filter. The relationships are:
QC1 = QC
QC2 = QC x 0.7 + 0.3 2.2. where -1 < QC < 1 , and QC2 is limited to less than 1.
A conversion process 1407 is shown in Figure 14, which enables the correct resonance relationship between the two filters to be maintained. The digital state variable filter shown in Figure 4 has limitations on the values for the frequency control value FC, which depend on the resonance value QC. These restrictions are described by Pierre Dutilleux in the Proceedings of the' 1989 International Computer Music Conference, published by the Computer Music Association, P.O. Box 1634, San Francisco, California 94101 , USA. Two equations may be derived which define the stability criteria for the digital state variable filter:
FC < 2 x ( 0.25 x QC2 ) ° 5 - QC Equation 1
FC < 2 - QC Equation 2
In practice Equation 2 is used to define the safe area for filter values of FC and QC. The stability criteria for the non-linear version of the state- variable filter shown in Figure 5 may be considered as being the same, except when large input signals are supplied to it. In practice, satisfactory results are obtained if the valid range of FC values is reduced by five percent on the range of values given by Equation 2. Thus a maximum value for the FC parameter may be obtained as a result of knowing the value of QC. When two state-variable filters are connected as shown in Figure 14, it is necessary to select the highest value of QC1 and QC2 to determine the maximum allowable value for FC. Thus, when the arrangement shown in Figure 14 is used, the maximum FC value is determined by the value of QC2, derived from process 1407, supplied to Equation 2. A pre-calculated look-up table is used to implement Equation 2, including the five percent reduction for non- linear effects. Thus, if a value of FC above the maximum value given by Equation 2 is generated within the synthesiser processing, this will be limited to the maximum value before FC is supplied as a parameter to the filter calculation. An alternative to the improved state variable filter shown in Figure 5 is shown in Figure 15A. Essentially the filter comprises four serially connected six decibel-per-octave low pass filter sections, 1503, 1504, 1506 and 1507. Each low pass filter section operates according to the improved arrangement shown in Figure 15B. In combination the result is a twenty-four decibel-per- octave low pass frequency response. Negative feedback 1508 is supplied to an adder 1501 which also receives the input sample. The level of feedback is controlled by a multiplier 1509, having a feedback control variable QC.
Without any feedback, the filter operates in accordance with a reasonably flat frequency response in the pass band, without any particular range of frequencies being boosted beyond their original amplitude. As feedback is introduced, a small band of frequencies below the cutoff frequencies of the low pass filter sections is boosted. This results in resonant ringing and oscillation effects similar to those produced by the filter arrangement shown in Figure 14. The effects are subtly different, and may be advantageous for a particular type of filter response unobtainable with a pair of serially connected state variable filters. The relationship between QC and actual resonance is extremely non-linear, and is also linked to the cutoff frequency of the low pass filter sections 1503, 1504, 1506 and 1507. Each low pass filter section shown in Figure 15A is defined in accordance with Figure 15B. A multiplier 1521 adjusts the amplitude of the signal prior to filtering, as the gain of the filter is frequency dependent. An adder 1522 combines the adjusted input signal with a proportion of its output which has been delayed by one sample in the delay stage 1523. A non-linear function 1525 provides a controllable level of non-linearity, which is controlled according to the equations descrined above. The level of feedback is controlled by a multiplier 1524, having a gain related to that of the first multiplier 1521. Thus Figure 15B shows a non-linear version of the standard infinite impulse response low pass filter stage. Not all low pass sections 1503, 1504, 1506 and 1507 need contain a linear function 1525, in order to achieve the analogue type distortion effects described previously. In theory, only one non-linear function is required. However, the subtlety or smoothness of distortion may be improved by 2.M- having multiple non-linear functions. Each non-linear function adds processing time to the filter calculations, and so unnecessary complexity of this type is best avoided. A good compromise for the arrangement shown in Figure 15A is to have different types of non-linear function in each low pass section. Thus the non-linear functions in low pass sections 1503 and 1506 can be the variable curve characteristic, given by y = x - (nx)3, and the non¬ linear functions in low pass sections 1504 and 1507 can be of the fixed soft limiting type, described earlier.
This approach may be adopted for the state variable filter shown in Figure 5, if an additional non-linear function is included. The existing first non¬ linear function 515 is in the feedback loop of the integrator formed by the delay 514 and the summer 510. The second non-linear function may be located in the feedback loop of the integrator formed by the delay 507 and the summer 505. The non-linear functions may be the same or different. This is a matter of fine tuning filter distortion characteristics, and is not necessary for achieving the primary characteristics of harmonic fattening and harmonic synchronisation. However, this level of optimisation may be necessary if a particular analogue filter circuit is to be precisely emulated, such as the filter described in US Patent 3,475,623, by Robert A. Moog. Other types of filter may be modified in accordance with the invention, in order to achieve a particular aesthetic quality. An all pass filter modifies the phase of frequency components in an audio signal without modifying their amplitude. A digital all pass filter can be modified to produce harmonic fattening and harmonic synchronisation effects, without changing the frequency balance, as is the case with the filters which have been described above. Many types of analogue circuit distort without changing the frequency characteristics of a signal. Thus, a modified digital all pass filter can be used to simulate the distorting effects of a wide variety of analogue circuitry, from tape recording equipment to power valve amplification. A known digital all pass filter is shown in Figure 16. This is a type of digital all pass filter known as a canonical all pass filter. Its properties are described in detail in pages 447 to 451 in Musical Applications of Microprocessors by Hal Chamberlin, ISBN 0-8104-5753-9. A non-linear version of this filter is shown in Figure 17. This includes two non-linear functions 1701 and 1702. At least one of these must be included to achieve harmonic fattening and harmonic synchronisation effects. Although the frequency response at the output 1703 is flat, and the frequency profile of the audio signal supplied to the input 1704 is unchanged, the frequency response at the internal nodes 1705, 1706 and 1707 is not flat, and frequencies at or near the resonant frequency of the filter are boosted in proportion to the Q of the filter. Because of this, the non-linear functions 1701 and 1702 are able to act on particular frequencies more than others, even within a filter having an overall flat frequency response. This results in the complex distortion effects which are usually associated only with analogue circuits. The resonance Q and turnover frequency F of the filter shown in Figure 17 are given by:
Q = F / (FH -FL)
A = 2 cos (2 x pi x F) x exp (-pi x F / Q) B = exp (-2 x pi x F / Q)
where FH = upper 90 degree frequency, FL = lower 90 degree frequency, and FH - FL is the transition width.
Several all pass filters may be serially connected to achieve a desired phase response, such as that which has been measured in an item of analogue equipment such as a tape recorder, and small amounts of non- linearity added to achieve an appropriate level of distortion. When specific analogue circuits are emulated, the interface and control processing circuitry 202, shown in Figure 2, includes memory and processes for associating circuit descriptions with instructions and data. This association is represented in the table shown in Figure 18. A first column 1801 contains an index for each type of circuit. The index value represents a factor to be multiplied by a fixed value and added to an address offset in the memory in the interface and control circuitry 202. A second column contains a fixed length field of ASCII codes representing an alphnumeric description of the circuit, which can be supplied to the alphanumeric 202 display of the synthesiser 101 when the circuit is selected for emulation. A third column 1803 contains pointers to instructions for implementing the model of the selected circuit. The fourth column 1804 contains a value for the pre-gain, and the fifth column 1805 contains the curve varying value n. Each row, 1811 to 1817 of the table shown in Figure 18 provides access to instructions and data which describes an individual filter or circuit which is to be emulated. The arrangement shown in Figure 18 may be adapted to suit the needs of a range of circuits which are to be modelled in the synthesizer 101 or other item of audio processing equipment.

Claims

0.1CLAIMS
1. A digital filter for filtering samples representing an audio signal, comprising an input (501 ), an output (506), delay means (514), gain means (504,
509) and at least one feedback path, arranged such that a characteristic frequency at said output is controllable by said gain means, wherein when processihg each input sample, a non-linear element (515) having a non-linear characteristic is arranged to modify a filter sample, such that a sample in said feedback path (514, 515, 510) is affected by an iteration of said non-tinear element.
2. A filter according to claim 1 , wherein said non-linear characteristic is curved.
3. A filter according to claim 2, wherein the shape of said curve is controllable in real time.
4 A filter according to claim 3, wherein said shape is controllable while an audio signal is being filtered.
5. A filter according to claim 2, wherein said curve is characterised by raising said sample in the filter to an odd power.
6. A filter according to claim 2, wherein said curve is characterised by modifying a sample x to produce a modified sample y, under control of a curve varying value n, such that y = x - (nx)m.
7. A filter according to claim 5, wherein m takes the value three.
8. A filter according to claim 1 , wherein said non-linear characteristic comprises a plurality of superimposed component non-linear characteristics. ZS
9. A filter according to claim 8, wherein a first of said plurality of component non-linear characteristics is a variable curve, and a second of said plurality of component non-linear characteristics is a fixed curve.
10. A filter according to claim 9, wherein said fixed curve is shaped for soft limiting, and said variable curve is shaped using a variable n, such that y = x - (nx)m.
11. A filter according to claim 10, wherein said fixed curve is effected by look-up means.
12. A filter according to claim 6, wherein said curve varying value n is controllable in a first relationship with an overdrive parameter, wherein the amplitude of signals supplied to said filter is controllable in a second relationship with said overdrive parameter.
13. A filter according to claim 12, wherein said relationship between said amplitude of signals and said overdrive parameter is defined by an overdrive amplitude response curve.
14. A filter according to claim 12, wherein said relationship between said amplitude of signals and said overdrive parameter is modified in response to a selected filter topology.
15. A filter according to any of claims 1 to 14, wherein gain means are controllable for defining a resonance characteristic.
16. A filter according to claim 15, wherein said resonance characteristic includes self-oscillation.
17. A filter according to any of claims 1 to 16, configured as a state variable filter having two stages of integration, wherein said non-linear OR element is included in the feedback path of at least one of said integrators.
18. A filter according to any of claims 1 to 17, wherein said filter is an all pass filter.
19. A plurality of connected filters according to any of claims 1 to 18.
20. A filter according to claim 1 , wherein said non-linear characteristic is selectable with associated filter data in response to a user request for a desired analogue filter emulation.
21. A method of filtering samples representing an audio signal, comprising steps of supplying digitised samples to an input and receiving filtered samples from an output, wherein said samples are processed by delaying means, gain means and at least one feed back path, arranged such that a characteristic frequency at said output is controllable by said gain means; and processing each input sample such that a non-linear element having a non-linear characteristic is arranged to modify a filter sample such that a sample in said feed back path is affected by an iteration of said non-linear element.
22. A method according to claim 21 , wherein said non-linear characteristic is curved.
23. A method according to claim 22, wherein the shape of said curve is controllable in real time.
24. A method according to claim 23, wherein said shape is controllable while an audio signal is being filtered.
25. A method according to claim 22, wherein said curve is characterised by raising said sample in the filter to an odd power.
26. A method according to claim 22, wherein said curve is characterised by modifying a sample x to produce a modified sample y under control of a curve varying value n, such that y = x - (nx)m.
27. A method according to claim 25, wherein said variable m takes the value three.
28. A method according to claim 21 , wherein said non-linear characteristic comprises a plurality of superimposed component non-linear characteristics.
29. A method according to claim 28, wherein a first of said plurality of component non-linear characteristics is a variable curve, and a second of said plurality of component non-linear characteristics is a fixed curve.
30. A method according to claim 29, wherein said fixed curve is shaped for soft limiting, and said variable curve is shaped using a variable n, such that y = x - (nx)m.
31. A method according to claim 30, wherein said fixed curve is effected by look up means.
32. A method according to claim 26, wherein said curve varying value n is controllable in a first relationship with an overdrive parameter, wherein the amplitude of signals supplied to said filter is controllable in a second relationship with said overdrive parameter.
33. A method according to claim 32, wherein said relationship between said amplitude of signals and said overdrive parameter is defined by an overdrive amplitude response curve. 3i
34. A method according to claim 32, wherein said relationship between said amplitude of signals and said overdrive parameter is modified in response to a selected filter topology.
35. A method according to any of claims 21-34, wherein gain means is controllable for defining a resonance characteristic.
36. A method according to claim 35, wherein said resonance characteristic includes self-oscillation.
37. A method according to any of claims 21-36, arrange to up the form a state variable method having two stages of integration, wherein said non-linear element is included in the feed back path of at least one of said integration stages.
38. A method according to any of claims 21-37, wherein said filtering method effects an all pass filtering method.
39. A method according to any of claims 21-38, wherein a plurality of filtering methods are performed in cascade.
40. A method according to claim 21 , wherein said non-linear characteristic is selectable with associated filter data in response to a user request for a desired analogue filter emulation.
PCT/GB1997/000537 1996-02-28 1997-02-26 Digital filter WO1997032397A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU18891/97A AU1889197A (en) 1996-02-28 1997-02-26 Digital filter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GB9604251A GB2313506B (en) 1996-02-28 1996-02-28 Tone filter
GB9604251.0 1996-02-28

Publications (1)

Publication Number Publication Date
WO1997032397A1 true WO1997032397A1 (en) 1997-09-04

Family

ID=10789579

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/GB1997/000537 WO1997032397A1 (en) 1996-02-28 1997-02-26 Digital filter

Country Status (3)

Country Link
AU (1) AU1889197A (en)
GB (1) GB2313506B (en)
WO (1) WO1997032397A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2934726A1 (en) * 2008-07-30 2010-02-05 Renault Sas Non-linear low pass filtering device for friction force estimator in proportional-integral controller of e.g. exhaust gas recirculation valve, has non-linear branches provided with non-linear and gain modules, which are arranged in series

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0209931A2 (en) * 1985-06-26 1987-01-28 Koninklijke Philips Electronics N.V. Equaliser with adjustable band filters and a digital filter suitable for use in the equaliser

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5359146A (en) * 1991-02-19 1994-10-25 Yamaha Corporation Musical tone synthesizing apparatus having smoothly varying tone control parameters
JP3233450B2 (en) * 1992-05-22 2001-11-26 本田技研工業株式会社 Specified time arrival function generator

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0209931A2 (en) * 1985-06-26 1987-01-28 Koninklijke Philips Electronics N.V. Equaliser with adjustable band filters and a digital filter suitable for use in the equaliser

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHANG T. L., PROCEEDINGS OF THE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS. NEW YORK, MAY 17 - 19, 1978., NEW YORK, IEEE., US, vol. CONF. 11, 17 May 1978 (1978-05-17), US, pages 1004 - 1008., XP002032907 *
DATTORRO J: "THE IMPLEMENTATION OF RECURSIVE DIGITAL FILTERS FOR HIGH-FIDELITY AUDIO*", JOURNAL OF THE AUDIO ENGINEERING SOCIETY, vol. 36, no. 11, 1 November 1988 (1988-11-01), pages 851 - 878, XP000205278 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2934726A1 (en) * 2008-07-30 2010-02-05 Renault Sas Non-linear low pass filtering device for friction force estimator in proportional-integral controller of e.g. exhaust gas recirculation valve, has non-linear branches provided with non-linear and gain modules, which are arranged in series

Also Published As

Publication number Publication date
GB2313506A (en) 1997-11-26
AU1889197A (en) 1997-09-16
GB2313506B (en) 2000-10-04
GB9604251D0 (en) 1996-05-01

Similar Documents

Publication Publication Date Title
US5508473A (en) Music synthesizer and method for simulating period synchronous noise associated with air flows in wind instruments
US5742532A (en) System and method for generating fractional length delay lines in a digital signal processing system
CA2253273C (en) System and method for sound synthesis using a length-modulated digital delay line
AU723969B2 (en) Digital signal processing system and method for generating musical legato using multitap delay line with crossfader
JPH0496000A (en) Musical sound synthesizer
KR0130050B1 (en) Electronic musical instrument
US5451707A (en) Feed-back loop type musical tone synthesizing apparatus and method
WO1997032397A1 (en) Digital filter
EP0675481B1 (en) Tone signal generator having a sound effect function
JPH06180588A (en) Electronic musical instrument
JP2613369B2 (en) Electronic musical instrument
JP2503744B2 (en) Music synthesizer
JPS61138994A (en) Electronic musical instrument
JPH04116598A (en) Musical sound signal generation device
JP3799896B2 (en) Waveform generating method, recording medium, and waveform generating apparatus
JP2008107682A (en) Filter device and electronic musical instrument
JP2734223B2 (en) Music synthesizer
Frei Digital sound generation
JP3201553B2 (en) Electronic musical instrument
JPS638955Y2 (en)
JPH02179695A (en) Processor for electronic musical instrument
JP3433764B2 (en) Waveform changing device
JPH07121183A (en) Sound source device for electronic instrument
JPH04136992A (en) Effect device of electronic musical instrument
JPH0683364A (en) Musical sound synthesizing device

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AL AM AT AU AZ BA BB BG BR BY CA CH CN CU CZ DE DK EE ES FI GB GE HU IL IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MD MG MK MN MW MX NO NZ PL PT RO RU SD SE SG SI SK TJ TM TR TT UA UG US UZ VN AM AZ BY KG KZ MD RU TJ TM

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH KE LS MW SD SZ UG AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: JP

Ref document number: 97530702

Format of ref document f/p: F

REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: CA