Reverse-engineering the Yamaha DX7 synthesizer's sound chip from die photos
righto.com
righto.com
Edit: but if you want to explore the landscape of FM tones generated by these chips without spending all of your money on a modular setup, generating sysex messages will of course take you where you want to go: https://fo.am/activities/midimutant/
My experience with FM sound design tells me that 2 operators is quite primitive, 3 operators opens up a larger set of non-insane possibilities, and 6 operators (like the DX 7) is, surprisingly, the minimum I would personally want to use for FM synthesis!
So if you are going to go 100% FM, and you're going the eurorack route, I'd personally want nothing short of two ALM011s. You obviously don't need two if you're mixing it with other modules, it's just that if you want to do FM synthesis, four operators is surprisingly limiting.
One of my favorite custom SuperCollider synths that I wrote was a simple 2-op phase modulation generator run through a wavefolder and filter. I probably could have arrived at a similar sound with more operators, but it wouldn’t have felt as intuitive to write!
Edit: these darn mobile keyboards
I started reading the article without noting the author's name. When I got through 2/3 of it, the thought was who the hell is this?. After seeing the name, it was of course, who else?!
Are there any good tutorials on how to approach this?
First step is finding a capable FM synth you like with a decent user interface. Dexed, NI FM8, Arturia DX7 V, or maybe even Reaktor. (Edit: It’s obvious to me that you shouldn’t buy a Yamaha DX-something to do sound design, but just to make it clear, don’t do that. The user interface is abominable. Just get Dexed if you don’t know what you want.)
Build your sound up by adding "partials" or "tones", or whatever you want to call them. Start with two operators, with one chained to the next. Explore the space of ratios (start with 1:1) and modulation levels. Once you get a handle on some part of the sonic space, consider adding a third operator at the back, i.e. if your operators are A -> B -> C, and C is the output, then A is the one you're adding. Experiment with ratios and modulation levels, and consider this a way to expand the space you've already explored.
You'll find that most of the modulation values are either too subtle to notice or noise that you just can't stand. If you're at a point where the middle ground between subtlety and noise doesn't have the sound you want, that's when you might add the third operator.
With these partials, you can build up the sustain and attack of your sound separately. Experiment with using different timing for all of the envelopes.
You can tell that a lot of sounds are made from a smaller set of partials that have been recombined. For example, the classic DX7 rhodes sound is made up of an attack and sustain partial, and these partials have been reused and recombined with tons of other partials to make sound variations.
This is why I'm not fond of the DX-11, Ad Lib, or other 4-operator systems. They have the "FM sound" but you're really quite limited building your sounds. If you have a partial made with three operators, and you want to add something to it, you have to share operators or use a pure sine wave.
I've seen a fair number of people say that by using it they were finally getting the hang of FM.
[0] https://archive.org/details/thecompletedx7 [1] https://asb2m10.github.io/dexed/
If you really want to explore FM you can write your own code and create algorithms with as many carriers/oscillators as you like. This turns out to be less interesting than it might be, although if you use a lot of carrier/modulator pairs you get a kind of spicy variation on additive.
It gets much more interesting when you add formants and other variations like the later FS1R synth did.
If you want to keep the modular approach the various digital modulars - Reaktor, VCV Rack, Voltage Modular, etc - give you clean FM with patch cords.
You can continually sign up for trial versions of the full suite for 90 days. At the end of the 90 days you sign up with another email and a new free trail. I’ve heard of a few produces that have done this for many many years.
It’s original mission statement of being a great hybrid live performance and studio production software has kind of failed. The instability makes it scary to use live and the performance issues makes it frustrating in the studio.
(I guess each producer has a different use case. If you’re DJing with ableton using audio tracks in sessions view it’s stability is okay! But doing large live sets with hundreds of tracks and I start getting nervous.)
That’s not even talking about the lacklustre update that was live 11 especially for the price.
It’s obviously been on a downward trend for years given that Bitwig came out from some of the original founders.
I’m not condoning stealing. Actually the opposite. I’m encouraging people to try the free trial instead of pirating. Pirating software can be dangerous and have added malware. Ableton give out a free trial, use it and decide if you think it’s worth the money.
You can get some of this with Dexed as well: https://asb2m10.github.io/dexed/.
It's basically an emulation of a DX7 that allows you to create patches without the horrendous menu-diving interface of a real DX7, and you can also use it to export and import patches to and from the real hardware over MIDI.
There is something quite fun about using a modern computer to hook up to a 1983 synth and having it "just work", despite the flaws in the DX7's MIDI implementation. I've had a harder time getting printers set up in the past.
Dexed's a useful tool for experimenting with and learning about FM synthesis (and I'm still very much at the "everything I do sounds terrible" phase, unless I go the route of modifying an existing patch), but I'm not sure you can automate it, which would give you the evolving sounds of something like MidiMutant.
I also tend to be of the opinion that a good analogue filter (or an emulated analogue filter - I'm not that much of a purist), can really open up the usefulness of an FM synth.
So assuming I want to represent a signal value of 127 (i.e. sin(t) = 127) using base 2 logs, I punch this into my calculator and i get log2(127) = 6.9886. But that's not what's going to be stored in the signal LUT since it's a floating point number.
I think I'm probably missing something obvious, but any clarification would be amazing.
> In which case the output would be in the 8bit range of (0-257) or -127 to +127 if we're using signed values.
The output is 12-bit. 8-bit is simply not good enough. Different internal signals have different widths. From what I understand:
- Phase accumulator is 22 bits (linear)
- Frequency is 14 bits
- Amplitude is 12 bits (logarithmic)
> So assuming I want to represent a signal value of 127 (i.e. sin(t) = 127) using base 2 logs, I punch this into my calculator and i get log2(127) = 6.9886. But that's not what's going to be stored in the signal LUT since it's a floating point number.
sin(t) never equals 127. The highest value it will ever reach is 1.0. Instead of punching in log2(127), punch in log2(1.0). From what I understand, the values have 8 fractional bits. So if code value N represents a signal level of 1.00, then code value N-1 represents a signal level of 0.997.
The synthesizer has two main lookup tables: one maps phase to log-sin, the other maps log to linear. Even with an incomplete understanding of how the chips work, it is believed that these widths are correct or very close.
Once ROM got a bit cheaper though, you could get a much better piano sound from new instruments like the Korg M1 which used internal samples of real pianos.
As the new sample-based keyboards hijacked the natural sound market, a resurgence of analog synth sounds in Acid House and other EDM took over the synthetic sound space.
Pretty soon nobody wanted FM synths any more.
Same reason FM was actually used a lot in electronic music as well. You can hear DX series a lot in detroit techno: Derick May, Jeff Mills, Robert Hood, etc.
Also, here is an extra ham-fisted attempt to get you to cover an off topic interest of mine: did you know that the Soundblaster DSP was an 8051? Cool, huh? pleasedoan8051deepdiveimbeggingyouplease. I'm aware of only one gate level analysis, with evidence of its existence on archive.org... tragically the spider never bothered with the actual zip file and the author is long gone.
Thanks for all the great reads, btw.
As for the 8051, I might look at it at some point, but I've got lots of other projects...
Can you use an arbitrary waveform generator to make these sounds accurate or differences nonexistent?
Do you think that good audio can be “solved”? I’ve heard of Harmon tuning and people’s preference for it, and how good speakers are all tuned the same but high end headphones don’t. I remember this person who knew electronic design destroying the credibility of head-fi. https://nwavguy.blogspot.com/ what do you think of forums like audio science and his findings?
-Austin, author of Gateboy (https://github.com/aappleby/MetroBoy)
Also Uli Behringer himself is completely mad and appears to be pretty chill with antisemitism. https://www.gearnews.com/uli-behringer-responds-to-the-corks...
tl;dr don't support Behringer, please.
Some background, for those who don't yet know the controversy surrounding Behringer clones: https://www.factmag.com/2017/04/08/behringer-minimoog-synth-...
https://apps.apple.com/us/app/minimoog-model-d-synthesizer/i...
It sounds amazing.
In terms of build quality and feel there is a huge difference between a Moog or Korg and a Behringer.
Behringer gear is made with the absolute cheapest components available and that becomes obvious as soon as you touch it.
I'm fine with that.
Most smaller player are also ripping off "other people's R&D". The only difference is that they charge 5x, 10x what Behringer charges. An extremely small number of people are doing new stuff.
It's even worse with guitar stuff. There are several Tube Screamer clones that sell for 250, 300, while the original is still under production for 120. The constant complaining about Behringer's one that costs $20 is petty and privileged.
No to mention Behringer has some pretty cool original designs. The Deepmind comes to mind.
Poor people also deserve to make music. You can bet I'll keep supporting them.
Get a free software solution.
Also, free software is nowhere near as good as dedicated hardware or as paid software, IMO.
This was one of the programming tricks on the DX7. If you set the final carrier to a low frequency you got a nice drifty chorus-like effect.
Of course things get lost over the years. I wonder if companies could put their designs in escrow to be released after some number of years so they don't get lost.
It's too bad it doesn't work anymore (or maybe it never worked?). Stuff like this doesn't make it into useful patent documentation, while patents are issued for vague and overly broad "inventions" like "storing numbers in a computer".
It accurately describes the architecture of the DX7 and how it's implemented. There's a whole lot that it doesn't explain, but it was very helpful for understanding the chip. (I used a couple of diagrams from the patent in my article.)
Some of Yamaha's FM synth patents have equally strange names. On the subject of Yamaha's FM patents, it's a shame that there isn't more information available about Norio Tomisawa, the engineer responsible for most of these designs. His name is on all of the FM patents. He played a huge role in the development of modern synthesis.
As their headline puts it: "The Surprising truth about Yamaha's most vilified FM Synthesizer The DX9"
There’s got to be a good reason I simply don’t understand for why a computer cannot replicate everything those massive pieces of furniture do.
The one thing I concluded is that their interface, with hundreds of knobs and potentiometers must be very nice to interact with. But can they not just house a computer inside?
I guess my curiosity and ignorance boils down to: why can’t computers generate all the kinds of signals that these big synths do?
Edit: a bulk thank you for all these helpful responses.
Hardware makers also have proprietary institutional knowledge, since you can have a couple persons who researched synthesis methods for 10 years.
They also work with users to tweak the sound and interface to perfection.
Some people like having vintage synths because they are collectors, and some like the workflow surrounding them (ie, the big front panel of knobs and faders you allude to, or the simplicity of plugging in audio and/or control voltage and/or midi cables).
Having 2-3 quality hardware synths can force you to get things done and not get lost in minutiae.
Of course, there are also modern producers which are very effective with software only.
For analog synths, well they can also be emulated quite accurately, but the way they produce sound is just fundamentally different to digital synthesis. They're directly manipulating the voltage of current to get oscillation, and then manipulate that signal to drive the speaker and produce sound. This process can be emulated but it doesn't produce the same output in a physical sense. It's questionable whether a typical audience would notice the difference I guess, but there's something quite raw and visceral about using an analog synth.
The thing about analog is that you get a lot of random variation in the waveforms. A naive computer implementation will lack that variation. A better one will purposely add particular random variations. The really good ones, like Diva (which runs on a regular computer), will run SPICE-style simulations of the actual analog circuitry, but running that at full fidelity is still pretty processor-intensive.
There are lots digital hardware synths that emulate analog. There are also hybrids, like Novation's Summit and Peak. These start with digital sound generation, but using FPGA to run at a much higher sample rate (24 MHz instead of the typical 48 to 96 kHz). Then they convert to an analog signal that runs through analog filters, then they convert back to digital for effects (reverb and such). The advantage of starting with digital here is that it can start with different waveforms than the ones easily generated by analog circuits.
Further muddying the waters, modern analog synths have components with a lot more precision than in the old days, so they also lack some of the random variation of the old stuff. That's great for staying in tune, but now synths like the OB6, which is pure analog, have added "vintage" features which artificially add the variations again.
a) people like having the original thing, even if it can be replicated. (I think this generalizes fairly far across musical instruments, old ones are always coveted by some, and into many different topics)
b) Limitations of the circuitry etc that affect the sound can be surprisingly hard to precisely simulate. For cult machines that's probably something someone has done, but it's a lot of work.
c) as you said, physical interfaces are important, as are the restrictions of what an instrument can't do the guide where people go with it
d) people will fight tooth and nail about b) and if a specific simulation is good or not - and often you can assume that the range of how the originals sound is actually also quite large (especially now, with the components having aged a few decades), so you'll always find someone who is sure the software doesn't sound exactly like the one specific device they compare it to.
But can they not just house a computer inside?
A lot of modern modules _do_ just have a computer inside - for an open-source example, many of the Mutable Instruments modules use AVR or STM32 controllers:It's trivially easy to make idealised digital models of VCO-VCF-VCA but they sound sterile and boring. The more imperfections you model the richer and more interesting the sound get, but the more processing power you need.
Good models - especially good models of analog filters - are incredibly difficult to design. And even the best aren't as smooth as the real thing, because - for example - with a filter you may have to recalculate a load of coefficients for every sample.
A lot of digital models get in the ballpark now, but very few do better than that. And there's a fair amount of secrecy among DSP coders. There's no mystery about the basics, but the manufacturers like to keep the best models to themselves. So the big computer music tools - like Csound and Supercollider - have third or fourth rate models that are a good few generations behind the latest code.
So it's still hard to get comparable sounds of pure digital synthesis. The new M1 chips are fast enough for better models, but you'd need about 5X to 50X the processing power - and more research - for no-compromise digital replacements of vintage analog hardware.
Maybe it would have been obvious to me if I had taken calculus, but this blew my mind.
https://news.ycombinator.com/newsguidelines.html
Edit: you've unfortunately been posting unsubstantive comments and breaking the site guidelines with this account elsewhere, too. Can you please stop that so we don't have to ban you again?
Suppose you have n probabilities p_1, ..., p_n. Each p_i is a real number in the interval [0, 1] . Often you want to multiply probabilities to compute prod_i p_i . Probabilities p_i can be tiny floating point values (very close to zero) and if n, the number of factors, is large, then the product will evaluate to zero due to underflow.
Software that processes probabilities often instead stores log-probabilities. Then the product prod_i p_i can be evaluated as sum_i log(p_i) , which is more numerically stable.
Where this gets a bit trickier is if you instead want to compute the sum of probabilities, rather than their product -- e.g. to renormalise probabilities so they all sum to 1. If you have encoded the probabilities as log-probabilities, you now need to take the log-exp-sum [1][2], which will cause numeric overflow if done naively, and is also relatively expensive to compute, as it requires n exponentials and 1 log to combine n log-probs. log-exp-sum can be evaluated in a stable way by first doing a pass over the data to compute the max log-prob, then doing a second pass to take the exponential of each log-prob offsetted by the max log-prob, so each of the terms being exponentiated is at most 0.
There's also a streaming version of log-exp-sum that permits a single pass over the data [3] -- a max is calculated on the fly and each time a new max is identified, the running sum is multiplied by a correction factor. I'm a bit suspicious that the branches in the streaming log-exp-sum might cause a performance impact when executing, although each exp calculation is so expensive that perhaps it doesn't make that much of a difference.
[1] https://en.wikipedia.org/wiki/LogSumExp
[2] https://blog.smola.org/post/987977550/log-probabilities-semi...
[3] http://www.nowozin.net/sebastian/blog/streaming-log-sum-exp-...
Since you're just checking whether the current sample is larger than the largest sample seen so far, you're very likely to find a "large" sample early that rarely gets updated. From then on, this branch will virtually always be false, and the branch predictor will make this fast. Unless the distribution is increasing (but not monotonically increasing) over time in an unpredictable way; in that case, the branch predictor will fail often and will be slow.
The branch predictor (and cache, for that matter) is a sort of Schrodinger's cat that makes programs both slow and fast at the same time, but you never know which until you benchmark it.
Good point, provided there's a decent number of elements being reduced.
In the application I've been focusing on, many of the batched log-exp-sum reductions are over tiny arrays containing 1 to 4 log-prob elements. There's already branching to guard against the case where all elements are log-prob -inf (aka probability zero). I found it helpful to also branch to special case the 1 element case, in which case the reduction is the identity operation, saving both an exp and a log. It's probably the case that inside the exp and log there's branching as well, so doesn't make sense to get too myopically focused on that single aspect of performance.
Eg : 2^3 x 2^5 = 2^8
Explicitly writing the powers as multiplications :
2x2x2 x 2x2x2x2x2 = 2x2x2x2x2x2x2x2
So multiplying powers of the same base is just adding the exponents.
Logarithms are the inverse of exponentiation.
Log2(N) counts how many factors of 2 are needed to multiply together to get N.
So Log2(2^x) = x
As per above example :
Log2(2^3 x 2^5) = 3 + 5