Author |
Message |
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue May 13, 2008 12:42 am Post subject:
FSK synthesis |
|
|
I have been playing around for the last week using FSK (frequency shift keying) as a synthesis method. I don't think I have ever seen anyone write about this method in public, so here goes.
It is a way of getting good control over two separate formants with only two oscillators.
The configuration is simple: a slave (sine) oscillator synced to a master (square) oscillator. The output is from the slave. The base frequency is set from by the master oscillator, and the formant frequency is determined by the frequency of the slave oscillator, as you would image.
How the FSK set up is unusual is that you add to the Fin of the slave a little of the square wave (adjusted so that it the "space" is always 0V). So during the mark part of the square wave, the sync oscillator is a higher frequency than the space period: the effect is that you get an extra formant. The frequency of this 2nd, higher formant is set by the amount of the square modulation from the master (if the mark is 1V signal, the 2nd formant will be 18ve higher, etc). The relative levels of the formants to each other are determined by the pulse width of the master.
(Obviously, if the master frequency is higher than the formant frequencies, you don't get this formant effect.)
What is quite interesting is that if you want to have fairly fixed formants, you don't need to feed in the keyboard CV, and even if you want variable formants you can do it with a very simple oscillator without high-end (expensive) tempco because the base frequency oscillator stability is entirely determined by the master oscillator: fluctuations in the slave will show up as minor tone changes which may indeed be pleasant.
It would be easy to build an FSK waveshaper: just a syncable LFO driven to audio rates at a minimum.
The kinds of tones that are available tend to be woodwind-ish and sparse, and thin and buzzy at the low end, but interesting. Changing the square to another waveshape stops the FSK effect and is useless for the formant effect. Selecting richer waveforms than the sine obviously makes more harmonics which can disguise the formant effect but can be interesting in their own right.
(To do this digitally, you have to clip the square wave rather than use a band-limited version.)
I have found what is quite useful is to use the FSK in conjunction with a BP filter (signal from the master VCO) also controlled by the formant1 CV and output +/_ with the slave osc. That allows a richer band of harmonics, with exact formant either being emphased as if you had some super Q going on, or cancelled out.
Cheers
Rick Jelliffe |
|
Back to top
|
|
|
ian-s
Joined: Apr 01, 2004 Posts: 2669 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Tue May 13, 2008 3:16 am Post subject:
|
|
|
Nice, thanks for sharing. |
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sat Jun 21, 2008 9:22 am Post subject:
|
|
|
Can you post a sound sample of what this technique is capable of? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue Jul 08, 2008 6:14 am Post subject:
Other info |
|
|
Slave is using sine wave output. If you use triangle you get richer sound, and obviously moreso for saw and pulse, but the richer the slave waveshape, the more the formants get obscured.
There is a slight vibrato on the master.
Cheers
Rick |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Jul 08, 2008 9:36 am Post subject:
|
|
|
Thanks for the sound sample, Mr. Ricko.
Some questions:
Is this similar to FM, but the keyer is always square? (keyer, like a carrier?)
Does the keyer signal control the overall pitch?
That is, could this synth play a medody in the traditional sense? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
frijitz
Joined: May 04, 2007 Posts: 1734 Location: NM USA
Audio files: 54
|
Posted: Tue Jul 08, 2008 1:52 pm Post subject:
Re: Sample of FSK synthesis sound |
|
|
Ricko wrote: | Demo of FSK synthesis.
Two-section pitch shift. Slave pitch and modulation is constant, only the sync pulses from the master oscillator are changing. |
Wow, that's nice. I didn't understand the part about the two formants before, but your well-done demos make it very obvious. Thanks for putting all this up.
Ian |
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Wed Jul 09, 2008 8:23 pm Post subject:
|
|
|
Yes, it is hardsynced FM with a square wave. Only stepped wave forms will give the particular effect where the formants are trivially predicable. (So you could see it as related to granular synthesis too, I guess: each step is a different grain.)
In those samples, the master changes pitch but the basic frequency of the slave does not.
If the slave also tracked the keyboard voltage, you would get a fixed waveshape with basically two boosted harmonics rather than formants.
Cheers
Rick |
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Wed Jul 09, 2008 8:28 pm Post subject:
|
|
|
Sorry, missed the question on melody.
Yes, it can be melodic.
(I have another more elaborate demo with a later configuration, but it includes parts from my Neumixturtrautonium so it would not be clear. I'll put up a heads up when I post that to my site. I will probably put out a VST simulator when I have thought through enough issues to make it interesting for breath control.)
The next experiment is to vary the number of steps, so that lowering the melody note brings in more formats. That should overcome the thinness problem to some extent.
Cheers
Rick |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu Jul 10, 2008 6:40 am Post subject:
|
|
|
Ah, synched too.
So on each edge of the keyer's state change, the slave oscillator is hard synched?
Is there a difference between how it sounds with and without synch?
Interesting idea.
I've designed an FPGA polysynth with a structure that I believe could accomodate this idea. Currently, it's 8 voice using 32 oscillators (4 per voice). What I would like to do is for each voice, use oscillator pairs in this FSK configuration. So each voice would have 2 FSK processors. Doing that, I could possibly handle the "thinness" issue by slightly detuning the keyers from each other. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Sun Jul 13, 2008 8:02 pm Post subject:
|
|
|
Only synched on to one point on master oscillator. So if the FSK is two sections, only the first section is synched. It is not a system where the synch clock sequences through a different set of frequency voltages resynching the slave with each setting. It is very simple: keyboard-tracking master VCO with sync extractor and Pulse out through attenuator to fixed frequency VCO.
This means that the phase of the second section varies with the master VCO's frequency. So if combined with a static waveshape from the master VCO, the non-first sections will be different phases and so sometimes cancel out overtones of the master and sometimes emphasize them.
So if the non-first section is a low formant, ajusting the PWM will have that boing pitch shift effect that PWM from triangle waves has.
Cheers
Rick Jelliffe |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Sun Jul 13, 2008 8:54 pm Post subject:
|
|
|
I apologize for being somewhat dense - I don't have a modular and haven't had a whole lot of analog synth experience other then a couple of FatMan synths that I've modified rather heavily.
I'm not understanding the concept of a "section"... ?? You say "two sections", are you referring to the mark and space states of the master?
I also don't understand what I see in the graphic... It appears that when the master's falling edge occurs, the slave is hard synched and at the same time, the slave shifts to it's lower frequency. It looks like the slave then spends only one full cycle at the lower frequency and then shifts back to the higher frequency before the rising edge of the master. I don't understand what makes the frequency shift back up to it's higher frequency. It seems like it's shifting to it's higher frequency before the master changes state. It also looks like there is no hard synch action on the rising edge of the master. I think this is what you are writing about in the first paragraph of your last reply - that the synching occurs only on the falling edge of the master? It looks mysterious what makes the slave return to it's higher frequency.
As I understand FSK from modem technology, the keyer or master can be at one of two voltages alternately (one for mark, the other for space). Those two voltages translate to the slave's two frequencies. - is that what is happening (ignoring synch for the moment) ? The problem I'm having is that it doesn't look like that when I view the graphic.
As I said, I apologize for being a little dense, I think you have more experience with analog synths than I do, so if you could bear with my questions, I'd appreciate it - I like what I heard in the demo sample and I'd like to try to emulate this in a digital world, but I can't unless I can fully understand what you're doing. Could you show a block diagram of the hookup or perhaps a schematic? I do read schematics... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Mon Jul 14, 2008 2:16 am Post subject:
|
|
|
Yes, I am using "section" for mark or space/sweep, because it is possible have more than just two: I have been using a three comparator system to get four sections (and therefore four formants) for example.
For that diagram, yes the square has been shifted a cm to the right so you cannot see the reset relationship nicely. (Bloody SynthEdit scope...) Also the waveshapes there are all band-limited, so that makes the transitions less clear as well.
So yes the synch here occurs on the rising edge.
If you are doing a VC digital oscillator, FSK might be a good architecture, for example by having a digital master outputting the sections (frequency sequence) and the resynch signal into a very simple linear VCO. So analog signal and control path, but digital stability/accuracy and less need to worry about band-limiting signals. Such an oscillator could also be useful for driving some of the waveshaping chips (such as the Moog Polycom card or the CEM 3396.)
Cheers
Rick Jelliffe |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Mon Jul 14, 2008 11:01 am Post subject:
|
|
|
Thanks Rick. I think I understand now - but be prepared for more questions about the method
I will be starting with the simplest case of 2 sections because I've already written code to do PWM, which is a simple width-adjustable pulse. Amplitude control is already there.
Implementing a multi-section randomly programmable in terms of section "voltage" should be fairly easy.
This will be a fully digital synth contained within an FPGA, all "voltages" will be represented digitally, initially at 48 bits.
I noticed the band limiting in the graphic, the pulse looks like it was filtered both forward and reverse. Thanks for explaining the scope program's quirk. I kinda figured something like that was going on, _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Jul 15, 2008 7:11 am Post subject:
|
|
|
Thanks Rick,
That's string-esque, especially in the lower register. Seems like you're getting a lot of timbre variation range with this technique.
I'm starting the basic digital design today, I can use the GateManPoly's basic structure, but I'll have to modify it - I want it to be fast, no less than 250KHz sample rate. Listening to your samples, I'm targetting, at first, a PWM keyer (just 2 sections for now) and 2 selectable slave waveforms for output - saw and tri. It seemed to me that sine isn't that astounding and I will be using an SVF at the output of each voice - I think the sound of a sine slave will be similar enough to a tri slave run through the SVF that sine won't make a big difference.
As always, there will be tweakage... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue Jul 15, 2008 7:31 am Post subject:
Saw versus Tri |
|
|
There is quite a difference between sine and triangle, especially for two section FSK. For four section FSK, there is less difference (more formants, and more of the first harmonic when four equal sections, and more accidental harmonic richness).
I think it is a good idea to have the triangle available, because it can then be used for substractive filtering later, but the sine is still valuable in its own right and when mixed with other oscillators.
I would band-limit the raw triangle waveshape to a couple of octaves below Nyquist in order to reduce aliasing, of course: the FSK will add some components back. (Or just morph from the triangle to a sine during the 8ve three below Nyquist.)
As I said, amplitude modulating the FSK output with the incoming saw (again, band limited) can be quite nice.
(There is of course always a problem with aliasing generated by hard-synching unless you are using BLIP, so you might consider having some little filter at the transition point to soften the hard edge. Whenever I do AM/waveshaping/synching digitally, I always put in a little simple tracking HPF just below the fundamental [i.e. the master oscillator frequency] to remove any artifacts that have aliased to below the fundamental. In your case, with a dedicated device, of course you might be better off just trying to get a sample rate high enough that aliasing won't be an issue rather than slowing it down with filters )
Cheers
Rick Jelliffe |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Jul 15, 2008 8:00 am Post subject:
|
|
|
That's why I'm targetting no less than 250 KHz, I think I might be able to get 500 KHz if I design this right. 500 KHz might make it tight to put a lot of extra features in it, so that's why I'm trying to do this as simple as possible for a first cut - PWM keyer and only two selectable slave waveforms. But if there's extra clocks, I'll use them for something...
Right now I'm working out how to construct the NCO (which is really a keyer/slave pair) so that it's one chunk of parallel logic. The GateManPoly uses 32 identical NCOs, so they can be processed one at a time in a state machine, but that means 4 loops of the NCO code for each voice. BTW, the GateManPoly runs at 250 KHz with no band limiting at all and I hear no alias problems, it has saw and PWM which have fast transients.
If I target 500 KHz it should be fine I think. If you're interested in hearing the GateManPoly, use the link in my sig and there are sound files on the site where the project is posted. The DAC I'm using will operate as high as 1.0 MHz sample rate for one channel, but that's so fast that I would get only 50 system clocks per sample - which is probably too few for a poly - even 500 KHz is going to be tight. 500 KHz will also be good for the SVF. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue Jul 15, 2008 9:14 am Post subject:
|
|
|
I've listened to all your samples recently. The later ones, such as the KS, are really beautiful. It must be exciting to make these!
Aliasing is best detected by playing a sequence of single high notes with vibrato. If you can hear other harmonics moving in counter-motion to the vibrato, you have audible aliasing.
Without vibrato, it can be difficult to detect, except for an added bell-like quality on different notes that can sometimes be nice.
What is the maximum sample rate of your DACs? Presumably you don't run them at 250kHz? (Even at 250 I would be surprised if you didn't have a little aliasing noise, except of course the LP filter will cut it back aliased tones along with intended frequencies in the the same band.)
Cheers
Rick |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Jul 15, 2008 9:32 am Post subject:
|
|
|
Yes, it has been quite fun to do these things. The KS was a big surprise, I never expected it to sound so "natural". And thank you for the comment about the piece
In fact, there is a weird vibrato happening in the steel drum patch, each NCO is pitch modulated with heavily filtered noise so that it works like an LFO, but random. Perhaps there is aliasing there - it does have a bell like sound, but other patches that are simpler (like PWM single NCO) still don't jump out and scream ALIAS! even with "random" vibrato. I've heard aliasing coming from my Roland D110, but I think that has a sample rate of 44.1 KHz and I have no idea what Roland did in the digital design for that.
The DAC on the Spartan-3E board operates at a maximum of 1.0 MHz. My first synth, the GateMan (I, II, and III), is a monosynth and the DAC update rate is in fact 1.0 MHz.
For the GateManPoly, I couldn't go that high because there's too much that has to happen between DAC updates, so I knocked it down to 250 KHz - the real DAC update rate is that fast. I want to see if I can parallel some of the logic to get it up to 500 KHz. I think there's enough logic area available to do that.
All of the synths I've designed have DAC update rates no less than 125 KHz, most are 250 KHz or more. I used 125 KHz for a sinewave additive synth (32 NCO, monosynth).
No decimating and no bandlimiting which makes things simpler. I love simple.
The main drawback of this DAC is that it's only 12 bits, but even at that, it sounds pretty darn good. I think this board is dynamite for $150.00.
I will have to go back and do some specific tests for aliasing in these synths (as you described), but so far, it hasn't been a jumping up and down problem. Several members on the FPGA-synth email list have suggested that it's my high update rates that account for this. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue Jul 15, 2008 10:25 am Post subject:
|
|
|
$149 is amazing. Especially since today 1 of my Australian $ = 1 US $
Only 12-bits, gosh.
At that sample rate, you might have enough bandwidth sacrificable to try some audio dithering, where you round up the current sample and subtract the delta from the subsequent sample. Then analog filter the DAC to smooth it out again, e.g. at sample rate/2 or sample rate/4 etc.
For example, if I had a 1 bit DAC, and I wanted to put out a constant value of .5, it would put out the sequence 1, 0, 1, 0, 1, 0, etc and the output would wobble in the middle nearer .5.
Cheers
Rick Jelliffe |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Tue Jul 15, 2008 11:03 am Post subject:
|
|
|
Yeah, 12 bits. At least it isn't 8 ...
It's got a 100 pin connector that connects to mostly FPGA pins, so I could get a larger DAC - but I've not seen a 16+ bit DAC that goes 1.0 MHz, or even 1/2 that.
I know I would get more amplitude dynamic range with more bits which would be nice. I'd need an adjustable analog filter though, because I've already used 3 different sample rates for existing synths, each an octave above the last.
So I have a choice between dithering with an analog output filter or a new DAC, each requires additional hardware. I'd like to get the fastest 16+ bit DAC that I can find and use it when my sample rate can accomodate it. I think I've seen 16 bits at 192KHz or so. There's a protoboard available that has the connector plug already attached. I need to order some of those... Heh, some static RAM soldered on it wouldn't be bad either.
And I apologize for this running off topic... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
|
Back to top
|
|
|
Ricko
Joined: Dec 25, 2007 Posts: 251 Location: Sydney, Australia
Audio files: 27
|
Posted: Tue Jul 15, 2008 1:27 pm Post subject:
|
|
|
Nice.
What is the PWM threshold? Is that the threshold for testing the phase of the accumulator? |
|
Back to top
|
|
|
|