
The HS Expander V1
Unleash the FM Beast that is your Electone HS organ with this device. This is the "beta" version.
The Expander allows access to all 113 parameters of the FM synths inside the Yamaha Electone HS series of organs.
It is build on the Arduino Uno development board, using cheaply available parts, keeping a minimal user interface whilst expanding the organ's capabilities tremendously.
Check the info below for all the nitty-gritty details that went into the design and build of the Expander.
Demonstration and explanation video: watch it here.
Parameter map, latest version: download.
The YM2414
Since information on this Yamaha sound IC is rather scarce I'm going to quickly go into it here.
The few bits and bobs of info I found I compiled into the image below.
Yep, it's not much. But luckily we're not trying to control the YM2414 IC's directly, so the organ will do the heavy lifting for us.
The YM2414 is a neat IC though, and has been used in some well known Yamaha synths such as the DX11 and the TX81z.
You no doubt have heard the infamous 'Lately Bass' in popular songs from the 80's and 90's.
Here's a bunch of specs:
- 4 operators,
- Ratio and Fixed frequency modes for the operators,
- 8 algorithms for the operators,
- 8 waveforms for the operators,
- 2 LFOs that each can do pitch and amplitude modulation,
- 4 waveforms for the LFOs: saw, square, triangle, S&H,
- 4 Envelope generators (one for each operator),
- 5-stage envelopes: Attack, Decay1, Decay Level, Decay2, Release.
These are the algorithms, waveforms and envelope:
Yamaha SYSEX
I hope you are ready for a deep-dive, because Yamaha only supplied info on the most basic sysex commands.
The actual format and size of the data was never published to the public for some reason, even though Yamaha is
tooting the MIDI programming capabilities of their DX synths and organs in every user manual...
Oh well, plenty o' clever people to figure things out instead!
Thanks to some smart people in a now long-gone Yahoo group (thanks Yahoo) and thanks to Marcel Krol's preservation of the
documents and knowledge created by that group, we now know a little more about how it all works.
I've done further research and experimentation, based on the information given to me by Marcel. Here's what I currently know.
The Electone HS has two main ways to update the voices in memory:
Sending parameter data, either individual or as sets:
All values are in HEX format, 0xF0 and 0xF7 are general Sysex start and end commands.
First up is the command message, to tell the organ what to do:
0x43 is the Yamaha manufacturer tag, 0x70 is Electone tag, the second 0x70 can also be 0x72 for the HS tag.
XX can be either 0x01 to receive data from the organ, or 0x02 to send data to the organ.
ID1 is which voice the parameter needs to be send to and can be the following:
- 0x00 for Lead,
- 0x08 for Upper Orchestra,
- 0x10 for Lower Orchestra,
- 0x18 for Upper Combi,
- 0x20 for Lower Combi,
- 0x28 for Bass (also pedals),
- 0x30 for Arpeggio,
- 0x38 for Percussive (not drums, that's just how the voice is named).
ID2 is always 0x00,
SPL is the lower address byte i.e. the parameter number,
SPH is the higher address byte and is never used,
DCL is the amount of parameter bytes that are send or received,
DCH is the same, but the high byte just like the address byte. Rarely used unless you are sending more than 255 param bytes
The second message in the above image is the actual data message:
First we get the Yamaha and Electone tags,
Model can just be 0x72 for the HS series,
We then get a 0x0 followed by the actual parameter data,
And finally the checksum, which is all the data bytes added together and then AND-ed with 0x7F (or 01111111 in binary)
to remove bit 7 as per required in the Sysex format.
Sending bulk User Voice data, 77 bytes per voice:
Again: all values are in HEX format, 0xF0 and 0xF7 are general Sysex start and end commands.
Model can also by 0x72 for the general HS series, as far as I'm aware all HS models have 4 user voices but I could be wrong.
If you're not sure you can use the tags in the image :)
The Voice Data
As you noticed in the previous section: we are still missing whatever "data" is in above commands.
There are a few oddities about the data format actually send to or from the organ as well, so lets dive into it.
KEEP IN MIND HS EXPANDER V1 USES OLD INFO. The new version (V2) and the software version use the much updated ParameterMap Extended file, code and data.
However: I've updated the information below to reflect this new data as I do not want contradictory information in these pages.
The full parameter map is way too big to post here, so I'll provide a download link to the Excel sheet.
The original, outdated, sheet can be downloaded here.
A much more updated and polished version, with helpful info embedded here.
The original sheet was made by Marcel, when making his web editor, and has been further expanded/adjusted upon by me in the updated version.
There is also a very old document (1989!) that this information is based on. It isn't entirely correct but does list all possible parameters. This document (PDF) can be downloaded here.
I've color coded and corrected the Excel sheet as much as I can, but some parts are still a little questionable and require further testing.
- Grey = hardcoded values
- Dark grey = things I yet have to get working
- Blue = general voice settings
- Yellow = operator frequency/tuning settings
- Light yellow = general operator settings
- Orange = envelope settings
- Green = LFOs
- Purple = DFL filter (YM2406)
I got the LFOs mostly figured out:
- Both can do Amplitude and Pitch Modulation at the same time and each have two depth settings, but the main depth settings are best left hardcoded to its highest value.
- Only on the Lead voices are both LFOs active. Other voices only allow you to choose between one or the other.
- LFO1 can be set to have it's AM and PM transition into LFO2's AM and PM on Lead voices only, making for neat effects.
- Combi voices can be iffy with PM, setting byte 54 to 255 (the main depth setting) before every PM param change helps a lot.
Portamento Time for the Lead does seem to work and is only active on the Lead voice (unfortunately, would've loved polyphonic portamento!)
Aftertouch and "Harmonics" I haven't figured out properly yet.
The DFL filter is... a filter! That's about as much as I know. It seems to be some sort of bandpass filter set with resonance?
There is absolutely no information on the YM2406 or the term "DFL". If you know anything let me know.
Either way: only the Orchestra and Combi sounds are routed through the filter (can be seen on the schematics too). Turning on the filter requires you to set a bit in byte 3 first, before setting the on/off bit in byte 76. Doing it any other way simply doesn't turn it on.
The filter parameters (T0-T8 and K1 to K8) are kinda odd in that going from min to max is:
- 128 to 255 is from min to halfway,
- 0 to 127 is from halfway to max
This may indicate the highest bit is actually meant for something else, but I'm not sure yet.
If you've figured out some new information, I'd be happy to hear it!
But... there's something very important when sending/receiving voice data...:
The voice data is converted from 8-bits to either one- or two bytes with 7-bits of data:
I've been able to reduce this to just two lines of code, and an IF statement. Here's some psuedocode:
byte value = param_byte;
if(value > 0b00111111)
{
byte data[2];
data[0] = (value & 0b00111111) | 0b01000000;
data[1] = ((value & 0b11000000) >> 2) | 0b01000000;
send_data_array(data);
}
else
{
send_data_normally(value);
}
Basically: if the byte value is higher than 63 than bit 6 and 7 are not 0, so we need to convert the data to two bytes.
If the value is lower than 63 we don't need to do anything special and can just send the data unchanged.
For the values higher than 63 I shift the two upper bits of the value to bits 4 and 5 and store then in the second byte.
The first byte gets the value sans the two upper bits by AND-ing the value.
I then OR both bytes to add the required two upper bits for the 01xxxxxx format required.
Code and Arduino
The code is currently still in the experimental/beta stage and thus subject to bugs. As mentioned earlier it is based on the outdated information I had at the time. V2 and the software version will/are using the much updated info.
I also need to clean it up, put some things in separate files to make it more readable and make it easy for other people to re-use the code for their projects. But I will already offer the code up for download.
The Arduino project file can be downloaded here.
Note that you'll need to install the LiquidCrystal I2C (by Frand de Brabander) and MIDI (by Francois Best) libraries. Both can be installed from within Arduino IDE 2.
The 'voice_params' array contains all data bytes for a single voice in RAM and is the data of the voice that is currently being edited.
Voice data is permanently stored in the EEPROM along with the voice name. The Arduino Uno only has 1kb of EEPROM
so there is only 12 voice slots available. This can be easily expanded on Arduino boards with a bigger EEPROM.
Then there are 4 arrays stored on flash memory (using PROGMEM) that make the code a lot simpler for writing and reading
the voice data, since multiple voice parameters are compressed into the same bytes (reducing the size to 77 bytes).
These arrays store the maximum values, voice_param array indexes, bitmasks and bitshift amounts for all parameters.
The function 'sendParam' is used to send a single byte to the HS organ. Note that one byte can contain multiple voice parameters.
The function 'sendVoice' does the same thing, but with all 77 (orchestra, combi) or 57 (other voices) bytes of a voice.
The function 'menu_set' handles all LCD updates, of all the various menus in the Expander.
Here's a quick 'n dirty schematic of the connections on the Arduino: