SynprezFM: a full-fledged Yamaha DX7 emulator for Android by Jean-Marc Desprez
Expanded look for SynprezFM II, version 2.2.3
What is SynprezFM?
SynprezFM II is a Yamaha DX7 emulator (or should I say "tribute"?) that was initialy developed under Linux, then optimized for Android. It is freely available on Google Play in English,
French and Spanish, with no advertisements
It offers 1024 patches of different types of sounds, and ncludes a patch editor since version 2.0.1.
The most interesting part lies within the sound engine, that reproduces with quite a decent accuracy the sound of the original DX7, given the same patches.
It is able to generate 16 channels on machines of average power, and supports the 6 operators across the 32 algorithms. On large screens, it can even display 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:
Cool music provided courtesy of DJ KoSMiX that demonstrates several patches on version 2.0.1
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 with no 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 devices often come 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 relationship 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:
developement of tools to feed an actual DX7 with test patches
developement of tools to analyse (more or less) automatically the output
intuition and luck to uncover the technical numerical tricks that made a 16 voice digital synthesizer possible in the world of 1983 where common processors had a clock under 10MHz!
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 x 16 x 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, a trick had to be found to simplify dramatically the formula:
first we use a table for sines (half a period is enough, sine is a very symmetric curve). actually we use log(sine), see below
second we replace multiplication of sine and level by addition of log(sine) and log(level)
third we take the exp of the result (thanks to another table), and voila!
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 manage sysex files.
v1.0 (2012/07/10):
DX7 sound engine
i18n in english, french and spanish
builtin bank of 32 sounds
capability to read 32 patch sysex files from external memory
v1.0.1 (2012/07/12):
cosmetics after first feedbacks from users
v1.1.0 (2012/08/09):
performance menu
portamento
after touch
pitch bend and modulation wheel (large screens only)
second keyboard (large screen only)
light stereo delay (I know, this is not a DX7 feature, but it makes the sound less dry)
online help on each menu
automatic volume adjustment (not a good idea actually, removed in the next version. Using the combination of user's brain and ears is much more efficient!)
support for Intel based devices
v2.0.1 (2013/02/05):
patch editor
1024 builtin patches
LED and LCD à la DX7
100% custom widgets
better ergonomics
more controls on the main page (volume, portamento etc.) + vu-meter
experimental: support for MIDI USB for Android 3.1 and above
sound classification (tags)
user defined loops to feed the arpeggiator
new display mode to use 2 synths on small but powerful devices
better ergonomics
microtuning and temperaments
new effects: phaser, pan and reverb (actually, between echo and reverb)
italian, portugese and german languages
This release may be not perfect, but the roll out of Lollipop (Android 5.0) made it mandatory on Nov 3rd, because the old version in the store would not work on the new ART virtual machine (replacement of Dalvik)
v2.2.2 (2014/11/30): minor
ergonomics: better color for active surface, and arrow to show sliding widgets
USB detection
MIDI pedal polarity inversion
MIDI logging support
bug in silence terminated sequences (no loop!)
bug in saving patches
better ergonomic when saving patches
skeleton keyboard when loop mode is on (keys are disabled)
right justified digit
"dot" when patch is edited
propose to save an edited patch before changing patch
lot of new languages
v2.2.3 (2014/12/01): fix the packaging bug of the v2.2.2
v2.2.4 (2019/04/28): Android Pie fix
This release was unplanned, and not in the roadmap. It was due to a bug that appeared in Android Pie, related to a difference of size between screen and top window in full screen mode. Anyway this is fixed now so the other evolutions are:
new stack mode to control two synths with just one keyboard
consequence: it is possible to control the transposition, balance and delay for each synth separatly
popup to control which strips are displayed and which are not, instead of menu and submenu stuff
removal of a couple of languages I was in trouble finding support with
Builtin banks:
The 1024 patches that I selected were available as bundles on the internet. They represented more than 22000 patches that I filtered to keep just 32 sysex of 32 patches. This is not easy to trace the author for each one but I would like to thank people that created or made some of these patches available:
Dave Benson
Frank Carvalho
Tim Conrardy
Jack Deckard
Chris Dodunski
Tim Garrett
Hitaye
Stephan Ibsen
Christian Jezreel
Narfman
Godric Wilkie
You can upload the 32 builtins I use in SynprezFM as a tar gzip (that 7zip can cope with under Windows).
FAQ:
There are some recurring questions that I had answered several times directly to users. So I prefer regrouping all these answers in a FAQ
i18n:
Translation with Google Translate is a risky business, and even if the meaning is more or less understandable, it definitely lacks style. You can help me translate properly my application into
your mother tongue by following this link