It’s never too late to scour Reverb.com for a digitone with cosmetic damage you can rebuy at a steal.

1 Like

The Flash Synth is about the raddest thing I’ve seen in a while:

An FM Synth built into a DIN plug. The video alone is just gold for the plethora of technical details on the design process.

9 Likes

It’s interesting from a technical point of view, but what is the benefit of being confined to a DIN plug from an instrument point of view?

1 Like

Well, what’s the benefit of any instrument’s form-factor? I mean, think about it: You plug this into a MIDI controller, and it’s as if the MIDI controller, itself, becomes an FM synth. How much better is this than a Volca? Probably hardly at all, apart from just a little extra portability and convenience of a certain kind… except when one considers that it has superior polyphonic capabilities when compared to the Volca FM.

In any case, it’s an all-around marvel. It seems to be a decent enough instrument, and if that can be accomplished in such a form, all the better.

1 Like

oooo best explanation of FM I’ve ran into !!

this is a great watch even if u don’t know supercollider

wavetable synthesis tutorial right after :fire:

16 Likes

This post was originally meant as a response to Cold Mac Ideas but I realized I didn’t use Cold Mac at all in my patch and then I forgot about the post for like a month so I will simply post it here instead:

How to do throught-zero FM on an oscillator that lacks through-zero FM

The way most TZFM oscillators work, you have to start with the linear frequency at zero, otherwise its core frequency will cause an offset in the modulation and produce drift.
What you need are three things:

  • a way to full-wave rectify the modulation
  • a way to switch the polarity of the carrier
  • a way to set the carrier’s linear frequency to 0

I don’t know any way to rectify without just using an actual rectifier.

The second you could solve without having to use some sort of comparator if your modulation oscillator has multiple outputs and the output you’re using to modulate the carrier is in phase with its square output. If that is the case you could run the carrier and the square out of the modulation oscillator through a ring modulator.

The third will work pretty well with most oscillators that have a linear FM input. The idea is to put a negative offset into the linear FM until it’s unmoving. Some oscillators might clip at the input before this happens.

Then you simply mix the positive rectified modulation signal with the negative offset. To change the modulation amount, change the amount of the positive signal, don’t attenuate the whole FM as that will undo the 0 frequency.

I tried making this patch to confirm that it works and I thought the linear 0 frequency part would be way harder and more finicky than it actually turned out to be.
I realized it doesn’t matter as much as I thought because the frequency clips at 0, so even if you add too much offset, it still sounds like TZFM. The frequency of the carrier will change if you change the modulation amount but I’ve realized what I like about TZFM is frequency sweeps of the carrier because it sounds mostly consonant at any frequency.
I also found that this sounds excellent with soft sync, which is a feature my regular TZFM oscillator lacks.

It’s definitely not perfect but it’s a very fun patch, try it out!

5 Likes

Makes sense, since it’s been unbalanced by rectification. But to me that kind of defeats the purpose of linear FM, and you might as well go exponential…?

The rectified signal is positive, yes but since you’re inverting the carrier after the fact (reversing it in effect), it should be (at least in theory) balanced as when the amplitude is negative, it’s “negative” in frequency. It doesn’t sound the same as exponential FM, sweeping the frequency of the carrier does not create the same dissonant sounds. It sounds more like some kind of waveshaping of the modulator signal.

I always liked FM synthesis but never quite internalized how defining of the sound of the '80s it really is. As that aesthetic rose in popularity in the past years, I started looking into this closer and ultimately with the release of KORG opsix I decided to do something about it and implement it myself.

I chose Python since this is what I usually work with. It’s not a popular choice for realtime audio and for good reason, its performance is really lacking for this use case. However, I did manage to squeeze six realtime (3ms latency) polyphonic voices of 3-operator FM synthesis out of it. Hear the result for yourself:

The fun part is that this is barely 750 lines, and that’s “from scratch”, e.g. it contains both MIDI input handling and complete sound generation from sines. It’s open-source (MIT), code for this can be found on GitHub.

Of course, it would’ve been amazing to do 6-operators and 32 notes of polyphony, and this, and that… but yeah, it’s still Python so I had to be realistic about what I can achieve. I decided to focus on the iconic glass e-piano sound. I found a good video comparison of the Yamaha reface DX sound with the DX7. To me the e-piano on the Reface (4-operators) sounds pretty convincing. But I still had to cut one operator out. Replacing one carrier with a 1+2 sine (first and second harmonic) brought me pretty close to where I need to be I think. My patch is still a bit simplified, there’s no keyboard- or velocity-tracking of any parameter, there’s no feedback, there’s no global LFO for tremolo, and so on. I’ll be poking at this further.

18 Likes

This is very cool. As an FYI, I once wrote a subtractive synth in python and one instance could manage 3 note polyphony on an old laptop. I didn’t want to multi thread the code, so I made a poly chain front end they could send the notes to multiple instances; this let me get seven voices between three instances. I decided to rewrite in C++, and was able to get 200 note polyphony with a single instance (using the same APIs, meaning surprisingly similar implementation code).

4 Likes

This is great. In general, you can get decent performance out of Python if you:

  1. Use Numpy as much as possible, rather than the built in Python arrays.
  2. Use Cython and cdef type as many variables as you can.

Also, I’m not sure if people are generally aware that the classic Yamaha DX synths are essentially wave-table synths, containing a look up table of Sine values. The modulators alter the position in the wave-table that is read, which is why they are more correctly called Phase Modulation synths - by changing the position in the wave-table, you are changing the phase of the sine wave, not the frequency.

I’m not sure what the modern Reface DX synth does. Is this a lookup-table, or DSP?

1 Like

Good tips! The main point of my attempt at this in Python was to write it in a way that reads the most naturally. I’m especially satisfied with how readable the five actual FM algorithms turned out:

For example, In the first algorithm (algo == 0) you can clearly read that operator 3 modulates operator 2 which in turn modulates operator 1 and the output from that operator is streamed (yielded) from the function.

For algo == 2 on the other hand we see that operator 3 modulates both operator 2 and operator 1, and we stream out a sum of op1 and op2 outs. And so on, and so on.

I tried to replace the built-in array.array with numpy.array but a naive type replacement turned out to be much slower and I couldn’t reliably get it to generate realtime audio. For Numpy to shine, I would have to rewrite all loops with array arithmetic to move calculations effectively to C. I don’t know Numpy well enough to attempt that. If you have any concrete suggestions there, I’m more than happy to include them.

I do have a sprinkle of Cython (20 lines but very effective). I think I’ll move the envelope generation to Cython as well. The point isn’t so much to “cdef type as much as you can” but to observe the generated C code for unnecessary CPython API roundtrips.

You’re exactly right. My implementation is also based on wavetables and the modulator is even called PhaseModulator, with the money shot line being:

(we’re choosing the next position in the w table based on the current scaled result of mod modulation)

Good question. From what I gathered the tone generator in the Reface DX is a Yamaha SSP-2 CPU. It’s RISC but not ARM. Rather, it’s a Hitachi SuperH mixed 16- and 32-bit core, specifically SH-2A. It’s clocked at 135.4752MHz, which is an oddly specific clock frequency until you realize that it means it can calculate exactly 3x1024 operations per sample at 44100 Hz.

The CPU has 8 MB of dedicated DSP memory which I’m sure is at least partially utilized for wavetable lookups.

3 Likes

On a totally unrelated, but hopefully intersting, side note: the Peak implements true FM but it works in the spectral domain. Its FPGA based oscillators run at 24mhz (1 bit) and the output (at least for all the wavetables) is made by a power spectrum (with phase offset per band). It does the FM in the spectral domain yielding a power spectrum which can then be used to FM again (3 oscillators which can work in a loop, so 3 op with 3 algorithms effectively). It ends up being cheap to generate the audio as they can work in the most naive manner (that produces aliasing) since this aliasing ends up in the MHz range.

What it actually showed me is that FM with arbitrary waveforms is cool, but you get so much spectral content so readily that you often fall back to simpler wave shapes, or filter out a lot of those harmonics. By that I mean, you can get extremely rich sounds and textures but for the music I make they are often too rich and textured (meaning they dominate without significant filtering).

4 Likes

Thanks, @chalkwalk, fascinating insight! I was thinking about this when recording my video but couldn’t quite put my finger on it. I noticed that the spectral view of the patch in FM8 is very primitive after all:

FM8 little spectrum

or:

Producing those narrow peaks should be quite doable then. And indeed, when I researched lossy compression schemes a few years back I learned that psycho-acoustically the brain rejects up to 90% of the information present in PCM. That’s how MP3 and other modern algorithms can be so effective. In fact, Yamaha is now using the same technique you’re describing in their newest CP models, including the tiny Reface CP. They call it SCM: Spectral Component Modeling. And a non-resonant low-pass filter is used to get rid of aliasing.

What about non-trivial harmonic responses?

Sounds that aren’t so decidedly concentrated around a few frequency peaks are more expensive to model this way. The easiest way to see this is again with the Reface series as they are equipped with the same CPU. The CP version allows for 128 voices of polyphony whereas the DX version only 8.

In traditional Yamaha-style operator-based FM synthesis you escape the easy frequency spectrums by introducing feedback into the mix. For example, in my 3-operator glass E-PIANO patch, introducing 33% of feedback to each of the three operators changes the spectrum to look like this:

That still sounds like a perfectly serviceable e-piano, a little more metallic and the base timbre changing into a sawtooth wave. If you push the feedback to 75%, you get what looks pretty much like white noise:

Amazingly, the patch in this form is still very musical. In low registers it sounds like a distorted analog sawtooth bass whereas in high registers the early hit noise moves above 10kHz, making it less prominent, and leaving a warm brassy polylead, like a brighter, less civilized version of the Juno 60 from Clannad’s “Robin (The Hooden Man)”.

I quickly browsed through the built-in presets in FM8 and while most of them look like good candidates for spectral synthesis, there’s a very musical minority that it super-rich in terms of harmonics. I recommend checking out presets like “Likeness Within” or “Devine Evolver” which sound like entire pieces on their own.

2 Likes

i will have to work my way through this entire thread at some point. but i wanted to put this idea out there. i think a lot about experimental sound design uses for fm that do not include making 80s synth pop sounds or bells. i like the idea of physical modelling, attempting to recreate physical sounds but not necessarily instruments. since i’ve been diving more into fm with the digitone, i’m finding that fm can be a very interesting way to achieve this.

i like the digitone for what it is, and it can be very deep and flexible but it also feels like there could be a lot more control. so the question is, what is the best way to get more organic physical sounds, unwordly completely new sounds, or sounds that are musically useful but don’t sound like typical fm. is there a certain synth that is good for more exploratory deep-diving experimentation with fm? is analog linear fm more interesting when it comes to sound fx-type synthesis?

and the other question would be, are there any tricks or rules that people who have been working with fm for a while are aware of, and would care to share? i understand that the digitone has a new sort of streamlined approach, so it may not really translate well to people with experience, but it seems like the best way to create new sounds is to get creative with the modulation source and the envelope or shape that it takes when it strikes or interacts with the carrier. and aside from other more well known subtractive and additive synthesis techniques, the only other way to sculpt sound seems to be by experimenting with ratios. which, when you have 4 operators seems kind of limiting. although it does sometimes seem like there is a lot of detail in slight adjustments, so im not ruling out that function. when i get into “ratio offsets” and weird ratio intervals, it definitely becomes hard to make anything musical because the pitch doesn’t track like it should. so that is cool for straight up fx-like sounds. but i also like to imagine that there is a whole range of new textures and timbres within that structure that are able to function like musical waveforms as well.

i think that in general, i’m more interested in textures that are formed when two objects interact and then also extracting or combining fragments from sounds to make new ones. fm seems like a good way to get that initial natural object textural sound profile to further work from. something like an alternative to field recording. synthesizing textures to then layer or break down

that’s probably a weird couple of paragraphs, but if anyone can make any sense of that, and has any examples to share, i’d appreciate some fm inspiration

3 Likes

Is this available anywhere for me to look at?

I don’t really see how FM can be “an alternative to field recording”. What we refer to when talking about “FM synthesis” is actually a combination of phase modulation and additive synthesis. The “operators” were traditionally a pitched sine with an envelope, these days this concept is a little more flexible (any wavetable with any arbitrarily complex envelope). And the “algorithms” that combine them usually end up carrying the sound of one of the operators or an additively summed output of a few.

Theoretically you can map any sound to a finite combination of sines. In practice this isn’t feasible to achieve because it requires non-linear envelope modulation and in-flight modulation of FM algorithms. That’s not only prohibitive computationally but also super unnatural in terms of human manipulation of such sounds. Plus, as you observed yourself, such sounds would not track the keyboard in expected ways. Instead, traditional FM synthesis opts for tracking pitches of all operators in a relative way, allowing you to specify ratios between them.

Maybe a different synthesis approach would work better?

The reverse FFT approach that @chalkwalk is describing above is one interesting approach here that can be used for a subset of sounds that have linear harmonic responses. For other purposes, you have other synthesis methods like physical string modelling (used very successfully for example by Pianoteq to synthesize acoustic piano sounds; or by Sculpture in Logic Pro X), formant synthesis (used for speech synthesis), or hidden Markov chains synthesis (also speech, and granular).

In fact, there’s too many modern techniques to enumerate in a single comment on the Internet. It seems to me that the most interesting synthesis method for what could plausibly be treated as “an alternative to field recording” would be digital waveguide synthesis. That was commercially used in many general-purpose synthesizers and PC sound cards in the 1990s and early 2000s. AFAICT it’s the most versatile synthesis method.

Coming back to Yamaha-style “FM synthesis”, it’s become its own thing where the goal isn’t to fool the listener that they’re listening to an acoustic instrument.

It’s a certain flavor, a certain color in a musician’s palette. For this purpose, even 2 operators already give interesting results. Minilogue XD’s multi-engine (also available on the NTS-1) supports this architecture for example. 4 operators are very popular, as used by Yamaha Reface DX, Elektron Digitone, and a large number of FM synthesizers from the 1980s and 1990s.

Beyond 4 operators the number of possible connections between them is raising exponentially, especially if you allow for arbitrary feedback loops. But unless you also enable very complex non-linear envelope modulation and variable frequency ratios, increasing the number of operators is sort of a diminishing return, considering the computational power needed.

This is why commercial FM synthesizers pretty much all stop at 6 operators, with just a few exceptions going over that. Now, assuming six operators, the theoretical number of single-connection combinations is 64. But allowing multiplexing and arbitrary feedback it quickly gets unwieldy (1,530,843). Only a subset of those is musically interesting so the DX7 shipped with 32, and the KORG opsix defaults to 40. Even the 8-operator Yamaha FVX-1 only gave you 63.

This means the number of possible timbres you can achieve is limited. To be fair, that limit is just the “color” or “flavor” I talked about above. You can still design plenty of unique sounds with that. And with a touch of chorus, flanging, phasing, delays, or reverbs (especially convolution reverbs) you can actually get enough variety to spend years exploring. It’s what Brian Eno did with his DX7 back in the day. Just keep in mind it’s not a silver bullet that can shape any sound.

My recommendations

A few recommended implementations that are interesting for sound design:

  • Native Instruments FM8 - not only is it compatible with classic DX7, it’s also very usable in terms of UI and goes way beyond the “glass e-piano” brand of FM synthesis;
  • KORG opsix - I haven’t used one myself but looking at the existing review videos and the manual this looks like a sound designer’s dream;
  • Waves Flow Motion - simpler than the first two (“only” 4 oscillators) but unique because the envelopes are decoupled from the oscillators, and modulation is brought to the front and center of the UI. Along with its p-lock style sequencing, you can achieve very interesting sound designs with it.

Alternatively, if you’re looking for more flexibility (in turn losing a lot of immediacy), you can model FM synthesis in Reaktor, with a good introductory example shown in this Benn Jordan video. Finally, you could further complicate your life with Max/MSP, SuperCollider, or straight up C++ (or Python as I did :sunglasses:).

7 Likes

ooh nice – been curious about Waves FM for that exact reason! how are you liking it?

The Richard Devine intro to it shows pretty much everything there is to show. There are hundreds of presets too for inspiration. But it’s a very approachablr beast on its own, building an “algorithm” by literally connecting the oscillators and dragging modulation to the mod spots is very easy. There are some unique sounds that come out of this thing.

Look what else I found today:

Pros of PreenFM3 compared to opsix:

  • less than half the price, or actually around a third of the price if you’re open to building the DIY kit (the most tricky surface-mounted pieces are pre-soldered);
  • open hackable GPL software;
  • multi-timbral with both keyboard splits and MIDI channel separation;
  • 6 independent outputs at 48kHz/24bit;
  • keyboardless module: smaller footprint, more flexible placement in the studio.

Pros of opsix compared to PreenFM3:

  • dedicated operator level faders and ratio knobs;
  • balanced TRS outputs (although just 2 of them);
  • 32 voices (vs 16);
  • 30 built-in DSP effects;
  • more powerful CPU (I would be very surprised if it wasn’t the same Raspberry Pi Compute Module as in the Wavestate);
  • gorgeous deep green panel.
3 Likes

Another Pro for the PreenFM3- the PreenFM2 can load Scala files directly from up to 128 stored on the internal drive, and the 3 most likely will do the same. The opsix OTHO has no microtonal support.

Even with the interface not looking much better than the PreenFM2, if I hadn’t already preordered a Kodamo EssenceFM Mk 2 I’d be all over this.

2 Likes