SynprezFM: a full-fledged Yamaha DX7 emulator for Android
by Jean-Marc Desprez



v2.1.1 ideal

Expanded look for SynprezFM II, version 2.1.1

What is SynprezFM?

SynprezFM II is a Yamaha DX7 emulator (or should I say "tribute"?) that was developed under Linux first, then optimized for Android. It is freely available on Google Play in English, French and Spanish, with no advertisements
It offers 1024 patches of various style sounds, and has a patch editor since version 2.0.1. The most interesting part lies within the sound engine, that reproduces with decent accuracy the rendering of the original instrument, given the same patches. It is able to generate 16 channels on machines of average power, and supports 6 operators and 32 algorithms. On large screens, it displays 2 independant keyboards.

It is also possible to import 32 patch sysex files to compare the emulation with the original

Unlike sampler readers, the software is very compact because it generates the sound with very few data as input: a sound patch is just 128 bytes! Indeed, the .apk is 850K, but the core (JNI library) is just 150K.

Some sound:

Here, you can find the patch table

Reverse engineering principles

The idea was actually an exercise in style: was it possible to fit a 16 voice synthesizer into a smart phone? The answer is almost yes: on most machines, the 16 voices are played without problem, but on some small devices, especially on those lacking cache memory, only few voices can be rendered concurrently. Actually, the Android family is very diverse, so it is difficult to test on every platforms. Still, small screen often comes with a small processor, and in this case the polyphony is limited.

Even if the equation of FM developed by John Chowning in his paper "The Synthesis of Complex Audio Spectra by Means of Frequency Modulation" is quite simple to understand, the relations between the mathematical equation coefficients and the actual parameters used by the DX7 patches are not documented. So it was very challenging and exciting to follow the footsteps of the designers of Yamaha Corporation. It required:

Some maths...

Regarding optimization for small processors, a quick calculation about the number of operations to generate a second of sound is the following:
- 50000 samples per second on the original machine
- 16 channels
- 6 operators
=> 50000 * 16 * 6 = 4800000 operations/sec
I do not mention here the feedback loop that could also be accounted as a 7th operator in itself, so we have give or take 5 millions operations to produce in the worst case (all voices playing together). To be fair, modern sampling rate is 44100 Hz, so only 4233600 operations are necessary.

Still, since every operation involves in theory 1) a sine computation 2) an addition with the phase of the previous operator 3) a multiplication by the output level, we have 15 million operations/sec to perform. Knowing that in 1983, multiplications were not wired and sines were not sped up by arithmetic coprocessors, we have to simplify dramatically the formula: So eventually each operation is 1 addition and 2 table accesses. We leave aside the CPU used by low frequency events like envelops, LFO and performance modulations. Piece of cake even for 80's hardware. Not to mention our 21st century high tech devices.

Revisions and roadmap:

SynprezFM is completely free, and does not contain any advertisement (I try to keep all pixels and CPU cycles for the fun!). It just needs access to external storage to access sysex files.