SynprezFM: a full-fledged Yamaha DX7 emulator for Android by Jean-Marc Desprez
Expanded look for SynprezFM II, version 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.
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!
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 co-processors, 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.
DX7 sound engine
i18n in english, french and spanish
builtin bank of 32 sounds
capability to read 32 patch sysex files from external memory
cosmetics after first feedback from users
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
1024 builtin patches
LED and LCD à la DX7
100% custom widgets
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 arpeggio
new display mode to use 2 synths on small but powerful devices
micro-tuning and temperaments
new effects: phaser, pan and reverb (actually, between echo and reverb)
Italian, Portuguese 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
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 separately
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
v2.3.0 (2021/04/20): bug fixes and MIDI release
SynprezFM suffers from 2 major problems: sound not loud enough, and incomplete MIDI support. These are not really bugs, the former being due to the fear of digital saturation and the latter the impossibility to test all the MIDI controllers on
the market. Nonetheless, a user discovered a real bug, a discrepancy of pitch between performance and recording, so I decided this was the time 1/ to add a limiter on the global output 2/ use the MIDI Android libraries for a better MIDI support (including
wireless keyboards) 3/ fix a couple of other bugs
limiter to enable louder sound
MIDI support based on Android libraries to address more MIDI controllers
storage access rewritten to solve first time access problems (and support Android 11+)
pitch discrepancy on recording (48K vs 44.1K) fixed
wireless Bluetooth MIDI support
"MIDI slave" support
support for multiple MIDI keyboards
finer volume and balance scale, wired on MIDI
"Scoped Media" storage mode, mandatory for Android 11
peak indicator on VU-meters
drop down menus with pseudo LCD
output volume operating after the FX processor
description of the device capabilities in the configuration page
better MIDI traces to diagnose problems
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:
You can upload the 32 builtins I use in SynprezFM as a tar gzip (that 7zip can cope with under Windows).
There are some recurring questions that I had answered several times directly to users. So I prefer regrouping all these answers in a FAQ
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
This application creates different types of information:
rendering files: contain performance events before rendering
loop files: contain sequences of keys to feed the arpeggio in loop mode
sysex files: contain all the parameters defining a sound (patch)
music files: contain user's music in WAV format, resulting of rendering
debug files: contain MIDI traces, optionally activated by the user if required
preferences: contain all the parameters required to restore the app state between 2 invoquations
None of these information are transmitted anywhere by any mean, only the MIDI traces can be asked by the developper for debugging purpose, and sent by email or messaging, but neither automatically nor without the user's consent and volontary action. They are plain text data, so they can be checked first hand by the user before their transmission
No personal or behaviour data are either collected, stored or transmitted.