A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
This document presents what I believe may be an original way of generating variable frequency audio tones, where the waveform of these tones can be shaped, and the harmonic spectrum remain constant regardless of the frequency. These ideas are particularly well suited to instruments such as the Theremin, where audio frequency is produced by heterodyning (mixing) two high frequency signals to produce the sum and difference, where the difference frequency is in the audio spectrum. This idea effectively replaces the heterodyning mixer with what I believe may be an original method of obtaining the difference frequency and of shaping the waveform of this difference frequency. 1). Legal: This idea is a variation on ideas presented in my “Analogue Function Duplicator” patent application filed earlier this year, but has sufficient difference to make it fall outside the scope of this patent application. I am placing this idea in the public domain, retaining only copyright and related IP rights to it (publishing this automatically makes it impossible for me or any other party to file a patent application for ideas presented here). These ideas may be freely used by anyone (unless someone else holds a patent I do not know of) , but I request the following: 1.1)
This document is not changed in any way.
1.2)
Any derivative works acknowledge me as the originator of this idea… (If you have seen this idea before, PLEASE let me know
[email protected] )
1.3)
That if you use these ideas, and they give you benefit that you would be willing to pay for, you make a reasonable donation to one of the charities listed in (1.5) below.
1.4)
That if you use these ideas in the manufacture of any product, you make a reasonable donation from your profits to a charity listed in (1.5) below. (A reasonable donation would probably be not less than 10% of the profits derived from using these ideas).
1.5)
My first choice charity (run by my brother) is http://www.streetkidsrescue.org/ this is followed by Medecins Sans Frontieres http://www.msf.org/ then by the Children’s Liver Disease Foundation http://www.childliverdisease.org/ . If my efforts result in money going to any of these, I will be pleased.
I would also be really happy to have feedback, critical or otherwise.. – Have you seen this idea before? Do you like this idea, see any flaws, have any suggestions or praise or criticism? Please email me
[email protected] . I am also looking for well paid design work – If you are, or know of anyone who may be interested in my services (I only work from home and on-line) please let me know. Ok – Now the stuff you want to read about!.. The ‘big idea’ is from page 3, but a bit of background technical stuff is on preceding pages, and without this you might get lost! 2) MIXING: 2a) ‘standard’ mixer There is much information, and many schematics, showing the conventional heterodyning (ring / balanced modulator) and I will not go into detail on its operation – but in summary, the simplest method (as used on the EW) is by passing signals through a non-linear component (diode for example) which performs the operation and produces an output which is the sum and difference of the input signals. More elegant implementations use a 4 quadrant multiplier IC.. All ‘suffer’ from the fact that one must get rid of the HF components before the difference frequency can be used. 2b) Logic mixer Logic level signals can be mixed with an exclusive-or gate (or other gate configurations) and the output from these Page 1 of 7 gates filtered to produce difference frequency.
Page 2 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
2c) (new?) D-Latch mixer This is NOT the ‘big idea’ – but it was the route by which I came up with the idea which is the subject of this document. I needed a clean, fast square wave, which was at the difference frequency of two high frequency input square waves (reference oscillator running at 220kHz, pitch oscillator running from 220kHz to 200kHz) – Clean edges and minimum timing errors were required, and no glitches of any kind could be allowed, as the result was taken directly to a MCU interrupt input. I found an incredibly simple way of doing the above, and this led to the ‘big’ idea.. I cannot believe that I am the first to use the circuit below for a Theremin related product, but have never seen it done before..
One of the clocks (say the Reference oscillator – for reasons which become clear..) is fed to the Data input of a standard D latch (4013), the other (pitch osc.) is fed to the CLK input. Every rising edge of the CLK input latches the logic state seen on the D input. The difference frequency is therefore produced as the waves ‘move’ relative to each other.. The resulting output (20kHz in this example) and waveforms showing operation shown above and below.
Page 3 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
The above did exactly what I needed – I was only wanting the rising edge of the result to trigger an interrupt.. But, while playing with the prototype, I noticed something I never expected (never really thought it through..) The waveforms being input were not precisely 50/50 mark / space ratio (which never mattered for this application) – BUT, the output waveform ALWAYS had the same mark/space ratio as the waveform on the Data (D) input. Simulation shows the reason clearly:
Because the Data input is being sampled by the rising edge of the CLK input, changes to the M/S ratio of the CLK signal make no difference to the M/S ratio of the output – BUT, any reduction or increase in the relative High / Low durations of the waveform on the Data input will reduce / increase the corresponding output ratios.. In short, the Data input is ‘reflected’ on the Output (Q) at the difference frequency of the 2 signals, and the sample rate is defined by the CLK Frq. And then I realised that this had great similarities to a previous (much more complex) design I had hoped would make me wealthy (but instead is just costing me patent fees).. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3) “MIXING” With Wave “Imaging” or “Function Duplication”: (Yes – this is the ‘big idea’! ) 3a) Take the above waveforms, replace the “Data” signal with ANY repetitive waveform, generate a short pulse on each rising edge of CLK, use this pulse to drive an analogue Sample and Hold, and sample the “Data” waveform.. What you get out is a copy of the Data waveform AT THE DIFFERENCE FREQUENCY OF THE TWO WAVEFORMS! With a Theremin, there are reference (constant frequency) and pitch (variable frequency) oscillators. It is easier to shape a fixed frequency waveform than a variable frequency waveform, so for the following discussion the REFERENCE oscillator waveform will be an analogue waveform at constant frequency, and the PITCH oscillator will be a pulse (The pitch oscillators actual design can vary – it could be a conventional Theremin oscillator with sine-like waveform, but in all cases the waveform must be converted, probably first to square wave, then to pulse on one edge).
Page 4 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
3b) Fig 1 shows the crudest possible implementation of the idea.. A 200kHz reference sine is fed to the CMOS switch (common 4066) and a 1us sample pulse @ 190kHz closes the switch.. The sine output LOOKS ‘choppy’ but its frequency is 10kHz, the samples occur at 190kHz, with the minimum sample rate being 180kHz – so a simple filter will get rid of the ‘chops’.. Also, a more sophisticated Sample and hold might improve matters (but they don’t really need to be improved – output signal will have better resolution than 96kHz digital audio – FAR better than CD quality!
3c) Fig 2 is the most severe test, with 200kHz ramp input (and 10kHz ramp output !)
3d) Fig 3 is the same as Fig 2, except that simple RC Low-pass filter added. It should be noted that a ramp waveform contains all harmonics, and the amplitude of these harmonics (with respect to the fundamental) are 1/n (where n is the harmonic number).. Therefore, for a 10kHz ramp waveform, the 2nd harmonic, which is at 20kHz, is higher than most humans have any chance of hearing.. If any resemblance to a ramp waveform is seen at 10kHz is encouraging!
Page 5 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
3e) The circuits on the preceding page do have problems.. I reduced the output frequency to 1kHz (made the difference between the 2 input frequencies 1kHz) and was extremely surprised to find that the shape of the ramp was nearly identical to what it had been for 10kHz.. I had expected that the falling edge of the ramp would be at the same speed as it was for the 10kHz signal, and therefore, when 1kHz (10x slower) the fall would be faster (i.e. a smaller percentage of the waveform.. this was not the case.. the fall was 10x longer than it was for the 10kHz output (as was the rest of the waveform. Examining this apparent anomaly, I discovered that the width of the sample pulse was the cause of the problem.. In a similar way* that the M/S ratio of the Data signal ‘reflected’ onto the output in the D Latch mixer (see 2c), the width of the sample pulse ‘reflects’ onto the output of this method. (*This statement is a factoid – the actual reasons are not quite so simple..) Bottom line – The sample pulse must be as short as possible. In the circuit / simulation below, I have reduced the sample pulse width to 200ns, and constructed a more complex S+H circuit:
Page 6 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
Page 7 of 7. A NEW METHOD OF TONE GENERATION ?
[email protected] © Fred Mundell. 2008
This concludes the core description of this idea. Few of the above circuits have been fully prototyped, and, at this time, results on what has been prototyped are not as stunning as the simulation results… But it is early days – I have only worked on this idea over this weekend! There are some points to note: 1.) The most important area is the Sample and Hold circuit – This needs to be as fast and stable as possible so that the sample pulse width can be as short as possible. 2.) The S+H shown here uses cheap CMOS IC’s, and I suspect that glitches I am seeing on the prototypes (almost unworthy at this time of being called bread boards) are due to charge injection / crosstalk in these IC’s or close circuitry. It is likely that the S+H circuit and components used therein will change. 3.) There are practical constraints on how the reference waveform is constructed.. Remember.. the Fundamental of this waveform CANNOT be lower than about 44kHz if reasonable audio is to be produced, and has been 200kHz in examples given (this frequency was chosen because a: it is high enough, b: is well suited to Theremin operation, c: is a good number to produce from division of a 24Mhz clock in the processor I am using to generate a harmonic series. With a Fundamental of 200kHz, the frequencies required to generate any harmonic series > about 6 harmonics, becomes astronomical – Likewise, any ‘playback’ of digitally stored waveforms having more than a few harmonics, requires astronomical speed requirements. The best method of generating reference waveforms is, I believe, by using analogue and mixed signal techniques. 5.) If one starts by generating a 200kHz ramp waveform, and use subtractive synthesis on this fixed frequency (selective filtering of the harmonics) it is possible to construct a musically pleasing and easily adjustable reference waveform generator. Re the Theremin: This idea is ideal for the Theremin – Everything is in place and operates making the Theremin the ideal application. This idea could be used with an existing Theremin design, being inserted in place of the mixer.. The reference oscillator on the Theremin would be removed / disabled and replaced with the reference oscillator described above. I plan to manufacture simple circuit boards to implement the conversion, and also to produce a high-end low-cost Theremin based on the above, as soon as possible. Polyphonic Theremin? I have not fully explored this, but I believe it might be possible to mix ‘tones’ (generate a complex HF polyphonic tone reference oscillator) .. but I will leave further exploration of this idea for now.. Other Instruments? This idea, in the form detailed above, is not ideally suited to instruments which do not use heterodyning usually.. However I have filed patents on a more complex scheme close to the ideas in this document, which allows a single (or multiple) master waveform to be duplicated and frequency shifted – this allows, for example, a single analogue additive reference oscillator to be constructed, and a polyphonic instrument made where each key has a simple circuit (Analogue Function Duplicator) to ‘clone’ the waveform. Fred Mundell,
Fundamental Designs Ltd.