Send MIDI from USB-B to 5-pin

Please see the bottom of this page for an update.

Way back in January 2014, I outlined a way to send MIDI from a USB-B only controller to a keyboard or module with classic 5-pin MIDI using Raspberry Pi as a bridge. Finally, one year later, I got to try out this idea.

It seems like MIDI over USB has taken over the MIDI controller world!

New controllers now communicate MIDI data over USB instead of using the old 5-pin DIN interface. 5-pin MIDI is dirt simple and is just a faster form of plain old serial communication — no bus protocol, no host/client, no hassles.

The world was 5-pin MIDI for a long time and many classic synthesizers and workstations only have a 5-pin DIN interface. Most of the new controllers have only a USB-B device port and expect to be connected to a USB-A host port for power and communication. If you want to use your new controller with an old 5-pin MIDI synth, you have a communication gap to bridge. Because USB is a peripheral bus with a sophisticated protocol, USB cannot be directly connected/converted to simple 5-pin MIDI signals.

There are two ways to bridge the gap:

  1. Buy a bridge box like the Kenton MIDI USB Host (about $115USD) or iConnectivity iConnectMIDI4+ ($200USD).
  2. Use a PC-based DAW to bridge 5-pin MIDI ports and USB MIDI ports.

Both solutions involve software, a computer, a 5-pin MIDI IN/OUT interface, and a USB-A Host interface. The old synth (or whatever) is connected to the computer through the 5-pin MIDI IN/OUT interface and the controller is connected to the USB-A Host port. The software streams the MIDI data between the 5-pin and USB worlds.

The Kenton is portable, but is a little bit pricey for my taste. Also, the Kenton is not readily available in all parts of the world (e.g., the USA) and shipping is expensive. The PC-based bridge is not so portable and maybe you don’t want to take a laptop to the gig.

Hmmm, let’s see. Computer? USB Host interface? Software? Raspberry Pi!

The Rapsberry Pi B+ would be the ideal model with its four USB Host (A) ports. From the hardware perspective, here’s what we need to do:

  • Connect the USB MIDI controller to one of the Raspberry Pi USB-A Host ports.
  • Connect a bog standard 5-pin MIDI to USB-A interface to one of the other USB Host ports.
  • Connect the 5-pin MIDI IN/OUT ports on the interface to the appropriate 5-pin MIDI ports on the old synth.

This is exactly how we would connect the controller and synth if we used the PC and the DAW except we have replaced the PC with the Raspberry Pi (much smaller and only $40USD).

For software, the Raspbian Linux operating system comes with ALSA audio and MIDI support. We need to use the ALSA aconnect utility to identify the incoming and outgoing MIDI ports and to connect the appropriate ports.

I wanted to try this approach without buying any new hardware. Unfortunately, my Raspberry Pi is the earlier model B with only two USB-A Host ports. I need at least one more port to connect a keyboard and mouse, so a hub has to enter the picture somewhere. I found that the ALSA software did not recognize the controller or MIDI interface through my cheapo non-powered USB hub. Please keep this possible limitation in mind during your own experiments.

Here’s my test set-up. The keyboard controller is an M-Audio Keystation Mini 32. I used an Apple keyboard and mouse for regular user I/O. The Apple keyboard has a built-in hub and adds two USB-A ports. The keyboard is connected to the Raspberry Pi and the mouse is connected to one of the keyboard USB-A ports. The Keystation is connected to the second USB-A port on the Apple keyboard through a USB-A to USB-B cable.

USB-B to 5-pin MIDI connection diagram

The 5-pin MIDI IN/OUT ports are provided by a Roland (Edirol) UM-2ex USB MIDI interface. This interface is connected to one of the Raspberry Pi USB-A Host ports. The UM-2ex has a switch to select either the standard driver or an advanced proprietary driver. Select the standard driver setting. You want to be “class compliant” all the way for best results. Connect the 5-pin MIDI IN/OUT ports to the synth using standard MIDI cables. For this test, the synth is a Yamaha PSR-S950 arranger workstation.

Boot Raspbian and log in. You can either run aconnect from the initial shell or you can start the X Windows systems. For this example, I chose to start X Windows so I could capture output from aconnect.

Type “aconnect -i” to display a list of the readable input ports. These are the ports which provide incoming MIDI data.

$ sudo aconnect -i
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'UM-2' [type=kernel]
    0 'UM-2 MIDI 1     '
client 24: 'Keystation Mini 32' [type=kernel]
    0 'Keystation Mini 32 MIDI 1'

The “$” charcter in the example output is the shell command prompt. The output shows the UM-2ex MIDI input port (client 20) and the Keystation (client 24). The Keystation input port is the source of the MIDI data that we want to send to the synth.

By the way, sudo is required when entering these commands through X Windows as an ordinary user. Superuser privilege is needed to set up ALSA connections.

Type “aconnect -o” to display a list of the writeable output ports. These are the ports which send outgoing MIDI data.

$ sudo aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'UM-2' [type=kernel]
    0 'UM-2 MIDI 1     '
    1 'UM-2 MIDI 2     '
client 24: 'Keystation Mini 32' [type=kernel]
    0 'Keystation Mini 32 MIDI 1'

The output shows the two UM-2ex MIDI OUT ports (client 20 ports 0 and 1) and the Keystation (client 24).

Finally, type “aconnect 24:0 20:0” to establish a bridge between the Keystation port and the UM-2ex MIDI OUT port.

sudo aconnect 24:0 20:0

The first port (24:0) on the command line is the sender and the second port (20:0) is the receiver.

Play a few notes on the controller. If the controller and synth are communicating on the same MIDI channel (usually channel 1 by default), then you should hear some sound from the synth — assuming that the volume is turned up and the synth is connected to an amp, and so forth!

Type “aconnect -x” to remove all connections when finished. Individual connections can be removed using the -d option. If you ever need usage information about aconnect, just type “aconnect -h” or “man aconnect”.

Just for fun, I tried using the Yamaha PSR-E443 for input instead of the Keystation. I replaced the Apple keyboard hub with a powered USB hub, too. (Apple keyboards and Linux don’t always interoperate as friends!) The PSR-E443 keyboard sends on MIDI channels 1 (main voice), 2 (dual voice) and 3 (split voice). By assigning these MIDI channels to RIGHT1, RIGHT2 and LEFT on the S950, I could play a layer in the right hand with a split bass in the left hand.

So, there you go! A simple, cheap bridge between a USB MIDI controller and an old school 5-pin MIDI synthesizer. The next step is to find a way to discover and connect MIDI ports through a boot time, start-up script. If you solve this problem, please post the solution!

Update:If you enjoyed this blog post, then you might like these articles, too:

Mining the Yamaha DJX II

Update: Follow this link to download a free collection of PSR/Tyros DJX-II styles.

Time to party like it’s 1999!

The Yamaha DJX II was the second generation of Yamaha “DJ” keyboards that were targeted for musicians/producers working in “dance” styles (e.g., tekno, hip-hop, drum’n’bass, etc.) Thus, the DJX II uses loop-like “patterns” as its basic musical element instead of arranger styles. The DJX II is best remembered for its unusual keyboard; Some octaves had white whole note keys while other octaves used grey. That’s because different octaves controlled different functions like selecting a pattern to play or transposing a pattern.

The DJX II had a selection of fairly decent patterns in different dance-oriented genres. Although I’ve never heard a DJX, it’s sound was probably hobbled a little bit by the sound set. The DJX II had only 4MBytes of wave ROM! The internal and external patterns are available for download from the Yamaha support site. Seems like a place to find and mine some useable musical phrases, and naturally, I’m looking for the funk. The target keyboard is the PSR-S950 arranger workstation.

The ZIP files from Yamaha unpack into a bunch of standard MIDI files (SMF). Each SMF contains a group of ten, musically related patterns that form a construction set. The SMF has a small amount of set up information at the beginning: General MIDI reset, reverb type select and chorus type select messages. Each pattern within the SMF begins with a MIDI text marker from “1” to “10”. In order to convert the SMF for the PSR-S950, I changed these markers to arranger style markers (e.g., “Main A,” “Intro A,” etc.) and added “SFF1” and “SInt” markers to the first measure. The new marker name determines the method by which the arranger will play the pattern. More about this in a second.

As I mentioned above, the DJX patterns are assigned to keys such that a single key press plays a particular pattern. The patterns are laid out according to black and white keys as follows:

Pattern  Type  Key color
-------  ----  ---------
1        Main  White
2        Fill  Black
3        Main  White
4        Fill  Black
5        Main  White
6        Main  White
7        Fill  Black
8        Main  White
9        Fill  Black
10       Main  White

Main patterns are on the white keys and fill patterns are on the black keys. Fill patterns are not restricted to one measure; a pattern may be anywhere from 1 to 256 measures in length.

Given these considerations, you may need to be a bit creative when assigning a pattern to an arranger section. Please recall that arranger introduction, ending and main sections may be 1 to 256 measures in length. Fill-in and break sections are limited to one measure. A DJX “fill” pattern may be greater than one measure and cannot always be assigned to an arrange fill-in section. Further, you may not even want to assign the fill pattern this way, preferring to invoke the pattern from one of the section buttons instead. The three introduction buttons (sections) are good destinations for a “fill” pattern because the section acts like a manually controlled fill button. The arranger will play the fill pattern (introduction) and then automatically proceed to the selected main section.

Patterns assigned to arranger ending sections are a little problematic. An arranger ending will stop playback unless another section is selected. You’ll need to fast finger the arranger buttons when jamming.

Even though this seems complicated, it’s not really. The more difficult and time-consuming part is dealing with the drum sets and note mappings.

First, some background is needed. The DJX channel layout is very different than the arranger channel layout. Here is the layout for the 53_Soul pattern file, which is typical of all DJX II SMFs:

Channel  DJX PC#     DJX voice         S950 voice/kit
-------  ----------  ------------      --------------
9        126   0  3  BD Kit        --> Real Drums
10       126   0  4  SD Kit        --> Real Drums
11       126   0  1  B900 Kit      --> Hip Hop Kit
12       127   0  5  Analog Kit1   --> Analog Kit
13       0   112 34  Pick Bass     --> Pick Bass
14       0     0  1  Bright Piano  --> Bright Piano
15       0   112 17  Jazz Organ    --> Organ
16       0   113 27  60's Clean    --> Tremolo Guitar

Channels 9 to 12 are rhythm, channel 13 is bass, and channels 14 to 16 are phrases. By (un)convention, channel 9 is bass drum, channel 10 is snare drum, channel 11 is high hat and channel 12 is percussion. Channels 9 to 12 must be set up as drum parts:

F0 43 10 4C 08 08 07 01 F7
F0 43 10 4C 08 09 07 01 F7
F0 43 10 4C 08 0A 07 01 F7
F0 43 10 4C 08 0B 07 01 F7

These System Exclusive (SysEx) messages must be added to the initialization part of the SMF in order to select different drum kits independently under XG.

You’ll need to choose new drum kits for the rhythm channels since the DJX II has its own unique, non-standard kits. This part is totally creative. Who’s to say what the new style should sound like? If it moves your booty, then it’s a winner! Fortunately, the bass drum, snare drum and hi-hat channels seem to use these drum instruments exclusively. This narrows the re-mapping problem. I remapped the kick first just to get a listenable groove going and then tackled the snare followed by the hi-hat. The following chart lists the DJX II drum kits and the roughly equivalent S950 drum kit.

DJX II drum kit           S950 drum kit
------------------------  ------------------------
127 0  5 Analog Kit1      127 0  25 AnalogKit
                          126 0   8 AnalogSet     [GM]
127 0  8 Analog Kit2      127 0  58 AnalogT8Kit   [Major update]
127 0 10 Analog Kit3      127 0  59 AnalogT9Kit   [Major update]
127 0 13 Analog Kit1D     127 0  58 AnalogT8Kit   [Distorted version]
127 0 14 Analog Kit2D     127 0  59 AnalogT9Kit   [Distorted version]
127 0 12 RhBox Kit
127 0  9 Hard Kit
127 0 11 Break Kit        127 0  57 BreakKit
127 0  6 Dance Kit        127 0  27 DanceKit      [Major update]
127 0  4 Electronic Kit1  127 0  24 ElectroKit
                          126 0   3 ElectronicSet [GM]

126 0  0 Electronic Kit2
126 0  1 B900 Kit
126 0  2 DJX Kit                  HipHopKit?
126 0  3 BD Kit
126 0  4 SD Kit
126 0  5 HH Kit
126 0  6 Human Kit        
126 0  7 Scratch Kit

127 0  0 Standard Kit1    127 0  0 Standard Kit1  [Legacy]
127 0  1 Standard Kit2    127 0  1 Standard Kit2  [Legacy]
127 0  2 Room Kit         127 0  8 RoomKit
                          126 0  1 RoomSet        [GM]
127 0  3 Rock Kit         127 0 16 RockKit        [Legacy]
127 0  3 Rock Kit         127 0 90 RockKit2
127 0  7 Jazz Kit         127 0 32 JazzKit
                          126 0 35 JazzSet        [GM]

The DJX-specific kits (BD kit, SD kit, B900 kit, etc.) do not remotely follow General MIDI-ish conventions. It takes a lot of note mapping to get these drum patterns to play sensibly. I recommend playing back the SMF from a DAW (like Sonar) while tweaking the SMF. Do not attempt note remapping on the arranger — you’ll only drive yourself crazy!

Chord progressions are part of the patterns, so the melody/chord phrases need to be transposed like introductions and endings. Please review Note Transposition Rules (NTR) and Note Transposition Tables (NTT) before forging ahead. Since the channel layout is unconventional, the CASM information must be changed to be consistent with the MIDI channel data. Channels 9 to 12 are configured for rhythm NTT/NTR (root fixed, bypass) and the Channels 13 to 16 are configured for intro/ending NTT/NTR (root transpose, bypass). The chord root must be changed to match the phrases (53_Soul: Fm7, 59_ClubFunk: Dm7). You’ll need to identify the root (the musical key) either by ear or by analyzing the chord harmony.

Tool-wise, I did most of the editing in Sonar X3. I used Jørgen Sørensen’s CASM editor ( http://www.jososoft.dk/yamaha ) to create the CASM section for the style and to change the NTR, NTT and chord root information. Special thanks go to Jørgen for creating such great and helpful tools!

Oh, yeah, the final results. Here is a link to the ZIP file containing the 53_Soul and 59_ClubFunk styles. Enjoy!

Prototino in progress

This week I got rolling on my next MIDI project — a mini MIDI controller with two knobs (potentiometers) and two buttons. I intend to mount the electronics in a Hammond 1991XXBBK enclosure, also known as an (ABS) stompbox. Plastic is OK because the box will reside by the pitch and modulation wheels on the Yamaha PSR-S950 arranger workstation. The plastic is less likely to mar the finish of the keyboard. (I hate scratches.) The ultimate goal is to augment the real-time control provided by the wheels.

The area next to the wheels is fairly small and a stompbox fits into it neatly. A stompbox is a fairly small, shallow box, so I needed an Arduino-based prototyping board that fits into a small enclosure. I first consider an Arduino plus prototyping shield combo, but rejected that solution. The Arduino + shield stack fit into a standard Arduino enclosure about the same size as the 1991, however, the pad-per-hole layout would have made soldering a bear.

Enter the Spikenzielabs Prototino. The Prototino is roughly 2 1/8 inches by 2 7/8 inches in size, compatible with the 1991. Its prototyping area uses the more standard DIP layout with two and three hole pads. This layout is soldering friendly. About one third of the surface area is taken by a minimal Arduino implementation: an ATMega 328P, crystal, power regulation and ICSP/FTDI connections. The voltage regulator is optional and I elected to leave it off in favor of an external 5V center positive power adapter. Here’s a picture of the assembled Prototino before pots and switches.

Prototino

The connector at the end of the long tail is a 2.1mm power connector. This will eventually be mounted through a hole in the side of the 1991 enclosure along with a 3.5mm stereo jack for the MIDI OUT port.

The Spikenzielabs’ directions are decent enough, but here’s a few more tips. The directions identify the optional power components to be omitted during assembly. The directions do not mention where to make the +5VDC and ground connections, however. As you can see in the picture, power and ground are connected to the +5V and GND pads in the prototyping area.

The directions also describe how to connect the FTDI cable. I have a Sparkfun 5V FTDI cable and decided to go that route for programming. The directions are a little sketchy (no pun intended) on how to configure the IDE for the Prototino. This led to the usual scrambling around in the Device Manager, etc. when the IDE wouldn’t communicate with the Prototino. Yes, you do need to select the correct COM port. You also need to select the appropriate board. With the Sparkfun cable, choose “Arduino Pro or Pro Mini” from the list of boards. This always seems to be a hassle and probably puts off a lot of beginning makers.

Finally, now that the power light comes on and the sketch is downloaded, how do we really know that the Prototino is operating normally? A stock Arduino UNO, for example, has an LED tied to one of the pins and comes preloaded with the blink sketch to turn the LED ON and OFF. The Prototino just sits there. Fortunately, one can easily whip up a sketch that uses the serial port and serial port monitor to see if the Prototino is genuinely alive. The setup() function needs to turn on the serial port and display a message:

    Serial.begin(9600) ;
    Serial.println("Hello world.\n") ;

The loop function can do something playful, if you wish. Compile and download the sketch, then look for the output in the IDE’s serial port monitor.

Experience with the Prototino has been positive so far. I plan to mount pots and switches on the back side of the Prototino and to mount the Prototino to the lid of 1991 enclosure. This will let me connect the FTDI cable to the Prototino and program the device in situ. Stay tuned!

DangerShield Drawbars

Just a quick post to mention the new Arduino section of the web site.

The first page in the new section describes the DangerShield Drawbars project that I started last March! This project uses the Sparkfun DangerShield (3 sliders, 3 buttons, 2 LEDs and a seven segment display) and an Arduino UNO to implement a basic MIDI drawbar controller for the Yamaha PSR-S950 arranger workstation. “Why not use one of the many available MIDI controllers?”, you ask. Well, the PSR (and Tyros) drawbars respond to a proprietary Yamaha System Exclusive (SysEx) MIDI message, not the usual MIDI continuous controller (CC) messages. The MIDI controllers on the market use MIDI CC, not SysEx. Thus, it made sense to whip up an Arduino-based controller in order to synthesize and send the appropriate control message.

The DangerShield Drawbars can and do control the PSR’s virtual drawbars. That’s the good news. The bad news is that I designed a rather complicated user interface (UI) in order to control nine virtual drawbars and the simulated Hammond percussion and vibrato with just three slide potentiometers. This was a serious overreach producing a less than intuitive, modal UI. If I attack this problem again, I will build a controller with one physical control per parameter, i.e., nine physical sliders for the drawbars and a handful of switches for percussion and vibrato. This approach should produce a more playable controller.

In the meantime, I’ve started to plan a new MIDI controller project and just discovered the SpikenzieLabs Prototino ATMega328 Kit. This board puts an Arduino-compatible ATMega328 on a protoboard with a very nice usable layout. The well-known Arduino proto shield (A000077), which I considered first, uses a pad-per-hole layout for prototyping. It’s not easy to solder circuits together with pad-per-hole. The Prototino layout is a more conventional breadboard-like design with plenty of 2- and 3-hole pads for making connections. I can’t wait to try it out!

MOX construction kits update: version 2

I hope that you have downloaded and are using the MOX construction kits.

It’s no secret that many of the Motif/MOX arpeggios are taken from Tyros/PSR workstation styles. If you scan through the MOX data list, you’ll notice that many arpeggios share a similar name. These musical phrases belong to the same family. A construction kit is an MOX performance consisting of arpeggios in the same family — a kind of “mini-style.” You can use a construction kit as the basis for a new original performance. Or, just play the arps for fun! This is a great way to get a feel for the musical groove within a family and to dive into the thousands of arpeggios built into the MOX.

I released the first set of construction kits in January 2014. Since then, I have fixed a few divots in my programming. Unfortunately, some sonic glitches remain here and there. Please think of these minor bugs as “exercises left to the reader.” At least the tedious work of arranging arpeggios into performances by family has been done for you.

Since then, I have spent a lot of time translating MOX performances back to PSR/Tyros styles. I have focused on the new combinations programmed by Yamaha since it is kind of pointless to duplicate the pre-existing PSR/Tyros styles which were the original source for the phrases! In my search for additional performances, I stumbled across two MOX ALL files:

    “XSpand Your World” voices and performances translated to MOX format, and
    Motif XS user bank 2 and 3 performances translated to MOX format.

These files are available at this site.

“XSpand You World” was a promotional package put together by Yamaha to drive sales of the Motif XS. Yamaha distributed new voices and performances through “XSpand Your World” in the form of an “ALL” file. The MOX is based on the Motif XS, so Motif XS voices and performances will play on the MOX when imported into the MOX. The Motif XS and MOX “ALL” files have different internal binary formats. (Yamaha strikes, again.) Fortunately for us, Moessieurs translated the XSpand Your World ALL file to MOX format.

The Motif XS has three user performance banks and the MOX has 2 user performance banks. When it’s factory fresh, the MOX USER 1 bank contains the same performances as the Motif XS USER 1 bank. The MOX USER 2 bank, however, is a “best of” collection from the Motif XS USER 2 and USER 3 banks. Thus, there are 128 (give or take) Motif XS performances that do not ship with the MOX. Moessieurs translated the Motif XS USER 2 and USER 3 banks to a single MOX ALL file. You may import both banks all at once (save your data first!) or you may import one performance at a time into a performance location specified by you. Please see the “FILE” section of the reference manual for further information about file formats, saving and loading.

The Motif XS USER 2 and 3 banks, in particular, are a rich resource for new sonic material. I immediately got to work and imported the funky and jazzy performances into my MOX workstation. Then, I saved everything into a MOX ALL file. The new ALL file (CKITS_V2.X4A) contains construction kits and the Motif XS jazz/funk performances. I prepared two tables (mox_perf_table_v2.txt) listing the performances in MOX USER banks 1 and 2. I’m calling this whole package “Construction Kits Version 2.” Download the ZIP file and have at it!

One final word. The Motif XS has only five arpeggio types per performance. The MOX has six. So, the Motif XS performances have only five arpeggios even though they are playing on the MOX.

SA and SA2: Is Motif up to the task?

Every now and again, the subject of Super Articulation and Super Articulation 2 voices come up on the Motifator site. Here are some rather lengthy comments that I posted in response to a recent inquiry.

First, here is some background information from the S950 and Tyros 5 manual. The descriptions of Super Articulation (SA) and Super Articulation 2 (SA2) are quoted from the Tyros 5 manual. The voice descriptions (e.g., JazzArtist guitar voice) are taken from the PSR-S950 itself — when you press [INFO] in the voice selection screen, the S950 displays a description of the selected voice. These descriptions show the kind of SA effects supported by the S950. The S950 does not have front panel articulation buttons; a foot pedal can be assigned to trigger SA effects.

The description of Articulation Element Modeling (AEM) is from the Tyros 5 manual. It is a pretty good concise description of what AEM (SA2) does, but is a gross simplification WRT Yamaha’s patents. AEM does a lot of cross-fading and sample whacking. Plus, the concise description downplays the timing analysis in order to avoid unwanted latency effects and to detect releases.

Super Articulation voices

These Voices provide many benefits with great playability and expressive control in real time. For example, with the Saxophone Voice, if you play a C and then a D in a very legato way, you will hear the note change seamlessly, as though a saxophone player played it in a single breath. Similarly with the Concert Guitar Voice and play the D note strongly, the D note would sound as a “hammer on,” without the string being plucked again. Depending on how you play, other effects such as “shaking” or breath noises (for the Trumpet Voice), or finger noises (for the Guitar Voice) are produced.

JazzArtist: Super Articulation provides realistic guitar phrasing: Legato notes played within an interval of a 4th sound as a hammer on, pull off or slide. The last note has a release noise. fret noise is added randomly and the Foot pedal 2 [controller] adds a cutting noise.

NylonGuitar: Play normally and the voice is expressive and dynamic. The Foot pedal 2 [controller] changes the sounds to harmonics.

SmoothBrass: When brass instruments play legato, there is no attack sound on the legato notes. Super Articulation recreates this. Play legato and the notes join together, changing with velocity.

ConcertStrings: Strings can play legato, where each phrase is one continuous sound. Play legato and Super Articulation strings work in the same way. There are also three dynamic levels.

TrumpetFall: Jazz Trumpeters often use a fall or doit. Super Articulation recreates this with a velocity switch: Play harder to create the effect, change between fall and doit with the Modulation wheel. (Pushing forward changes to a doit.) Use the Foot pedal 2 [controller] to add breath noise.

Super Articulation 2 voices

For wind instrument Voices and Violin Voices, a special technology called AEM (see below) has been used, which features detailed samples of special expressive techniques used on those specific instruments — to bend or slide into notes, to “join” different notes together, or to add expressive nuances at the end of a note, etc. You can add these articulations by playing legato or non-legato, or by jumping in pitch by around an octave. For example, using the Clarinet Voice, if you hold a C note and play the Bb above, you’ll hear a glissando up to the Bb. Some “note off” effects are also produced automatically when you hold a note for over a certain time. Each S.Art2! Voice has its own default vibrato setting, so that when you select a S.Art2! Voice, the appropriate vibrato is applied regardless of the Modulation wheel position. You can adjust the vibrato by moving the Modulation wheel.

AEM Technology

When you play the piano, pressing a “C” key produces a definite and relatively fixed C note. When you play a wind instrument, however, a single fingering may produce several different sounds depending on the breath strength, the note length, the adding of trills or bend effects, and other performance techniques. Also, when playing two notes continuously — for example “C” and “D” these two notes will be smoothly joined, and not sound independent as they would on a piano.

AEM (Articulation Element Modeling) is the technology for simulating this characteristic of instruments. During performance, the most appropriate sound samples are selected in sequence in real time, from huge quantities of sampled data. They are smoothly joined and sounded — as would naturally occur on an actual acoustic instrument.

This technology to smoothly join different samples enables the application of realistic vibrato. Conventionally on electronic musical instruments, vibrato is applied by moving the pitch periodically. AEM technology goes much further by analyzing and disaggregating the sampled vibrato waves, and smoothly joins the disaggregated data in real time during your performance. If you move the Modulation wheel when you play the S.Art2! Voice (using AEM technology), you can also control the depth of the vibrato, and still maintain remarkable realism.

Motif and MOX

Starting with the Motif XS, Yamaha added Expanded Articulation (XA). Without diving into too much detail, XA allows control over articulations using the assignable function buttons. XA also detects and triggers samples to handle legato technique. The Motif/MOX player has precise control over when an articulation is sounded and the Motif/MOX programmer can construct new voices using XA (or tweak existing voices).

The S950 (and Tyros) monitor and analyze the notes played by the musician. The Tyros, in addition, has two panel buttons to control articulation. The workstation software determines which articulation to sound and when based upon what the musician has played on the keyboard or (optional) controllers.

Both the S950 and Tyros implement Super Articulation (SA) voices. SA voices and XA voices use roughly comparable sample playback technology (AWM). New samples can only be installed onto an S950 through an expansion pack (proprietary format). Yamaha has not released an expansion pack editor. S950 voice editing is limited to “quick edit” envelope tweaks; you cannot get to the element level on the S950. Motif/MOX voice editing is vastly deeper.

Super Articulation 2 (SA2) voices on the Tyros are a whole other beast. SA2 uses Articulation Element Modeling (AEM) to “stitch” samples together in real-time in response to what the musician plays. The Motif XS (and later) do not have the software to analyze the musicians playing/gestures and it does not have the AEM sound engine. SA2 is not implemented on the S950. SA2 is a very complicated critter because it takes note timing into consideration. (See Yamaha’s patents on AEM.)

So, voices/samples cannot simply be ported from S950 (or Tyros) to Motif. You can, however, use XA to make your own SA-style voices without any of the front-end analysis of musical gestures/control.

Thoughts and speculation

Sometimes, I think SA is a different front-end for Mega Voices. A guitar Mega Voice, for example, uses velocity switching to trigger (one of) an open soft, open medium, open hard, dead soft, dead hard, hammer on or slide waveform for a given MIDI note played on the keyboard. Effects such as strum noise and fret noise are triggered by MIDI note numbers above C6 and c8, respectively.

An SA voice based upon the same waveforms might use velocity switching for open soft, open medium, open hard, dead soft and dead hard, while using legato notes within an interval of a fourth to trigger hammer on and slide. An articulation control button or pedal trigger strum noise. Fret noise is added randomly. Thus, the SA voice uses the same basic waveforms as the Mega Voice, but the SA voice uses different means and analysis to select, enable and render the waveforms.

Motif XS (and later) have Mega Voices. The MOX Mega Nylon voice, for example, uses seven elements:

       Elem#  Waveform                Low  High Velocity
       -----  ----------------------  ---  ---- --------
       Elem1  Nylon Open Sw St        C-2  B5   1-60
       Elem2  Nylon Dead Notes St     C-2  B5   61-75
       Elem3  Nylon Mute St           C-2  B5   76-90
       Elem4  Nylon Hammer St         C-2  B5   91-105
       Elem5  Nylon Slide St          C-2  B5   106-120
       Elem6  Nylon Harmonics St      C-2  B5   121-127
       Elem7  Nylon FX St             C6   G8   1-127

that select and play an internal waveform based upon MIDI note number and velocity. One could build a different voice that triggers the same waveforms under different conditions such as AF1 ON, AF2 ON, etc. Indeed, some of the other Mega Voices respond to AF1/2 and AS1/2. Thus, I believe that a stock Motif/MOX with XA could emulate an SA voice within certain limitations. Specific conditions like “legato within an interval of a fourth” are not supported in Motif/MOX. XA detects legato without regard for interval.

SA2 voices are based on AEM and I believe that the AWM tone generation model in the stock Motif/MOX is not enough. In AWM, each note is independent and follows the familiar attack, decay, sustain and release life-cycle. Legato based on XA merely changes the waveform that is used to render the attack of an independent note. An AEM note, on the other hand, evolves and morphs into the next note. The AEM tone generator behaves more like physical modeling than AWM’s ADSR note life-cycle. As mentioned in Yamaha’s description of AEM, the AEM tone generator does some fancy computation to correctly render vibrato through note transitions. Further, a stock Motif/MOX does not perform the timing analysis and control functions that drive AEM tone generation.

I would love to see Yamaha add AEM-based voices to future members of the Motif family!

More new phrases for MMS

If you enjoyed the last batch of phrases for Yamaha Mobile Music Sequencer, here’s some more! All of the phrases are taken from funky, jazzy styles on the PSR-S950 arranger keyboard.

FunkPoppin ZIP
FunkPopRock ZIP
JazzFunk ZIP
JazzPop ZIP
KoolFunk ZIP

These loops are free and ready for download — 250+ phrases for drum, bass, electric piano, guitar and brass. The phrases are in YMS2 format files. Just copy these files to your iCloud Mobile Music Sequencer directory and you’re ready to go. Under OS X, the iCloud MMS mobile documents directory is:

~/Library/Mobile Documents/XXXX~yamahamusic~mobilemusicseq/Documents

The easiest way to get there in the Finder is to hold down the Option key and select “Library” in the “Go” menu. This will take you directly to your application support library directory. The “XXXX” in the path name above is some crufty identifier generated by OS X and will vary from user to user. Navigate down through the “Mobile Documents” directory until you reach the MMS documents. This is where you should put the YMS2 phrase files.

Also, don’t forget about the Music Gallery where you can find additional MIDI, PSR/Tyros style and MP3 content.

If you want to create your own original MMS phrases from MIDI, check out this tutorial. Once you’ve gone through the process a few times, you’ll be able to translate your own MIDI phrases on autopilot!

Yamaha voice of the customer

The Yamaha synthesizer site has come to life, again. The site has resources for current Yamaha synthesizer products, blogs and a forum. One the forums is seeking input for future Yamaha synthesizer products. Here is my post to that forum. It’s kind of terse, but the Yamaha marketing people already have so many long messages to read through and analyze! On to the re-post…

Hi —

Thanks for listening to our feedback! To keep things short and specific, I’ve listed the likes and areas for improvement in my two current Yamaha keyboards. I understand that Tyros/PSR is made by a different product division.

My first Yamaha keyboard was a pre-MIDI CE-20, so I’ve been into electronic instruments for quite a while…

MOX6: 95% performance, 5% production
Likes:

  • + Great voices and performances in contemporary genres
  • + Deep editing everywhere
  • + 16 voices/performances/etc. available with one button push
  • + Ability to add new waveforms (MOXF)

Opportunities for improvement:

  • – Workflow
  • – Needs drawbar mode and improved rotary speaker effect
  • – SMF must be scrubbed clean in order to import without issue or error

PSR-S950: 70% production, 30% performance
Likes:

  • + Super Articulation sounds great and is intuitive to play live
  • + INFO button displays performance tips for voices including articulations
  • + Drawbar mode
  • + Reliably imports and plays SMF regardless of meta-events, etc.
  • + Immediate one-man-band playability; high fun factor

Opportunities for improvement:

  • – Voice editing is superficial
  • – Needs more contemporary content (my genres: funk, jazz, rock/pop)
  • – Effects lag synthesizer products (need VCM)
  • – Needs B-3 chorus/vibrato sim and improved rotary speaker effect
  • – Convert WAV to MP3
  • – New waveforms only through expansion pack; No expansion pack editor

Production vs. performance: MOX6 is my go-to ax for playing out. S950 is now mostly used to produce backing tracks/styles. S950 production/performance mix will shift toward performance.

Workflow: DAWs have many established, immediately visible UI metaphors (e.g., piano roll, staff view, waveform view). MOX6 has rows and rows of buttons with few cues about how to use them.

Superarticulation: Real-time note analysis triggers articulations. Don’t have to think about which button to push (MOX XA). SA 2 voices are terrific. I’ve been reading the Yamaha patents on AEM and realize that SA 2 is non-trivial.

Immediacy: People want immediate results. Turn a knob, get a response. That’s one reason why people are knocked out by SA/SA2. Nothing kills a buzz like waiting for your computer to boot or fixing a driver problem.

Content: MOX players want more arpeggios; S950 players want more styles. This is a fundamental human need. Need to be able to create or import own phrases/content. Be able to play and sync both audio and MIDI clips. Import and convert PSR styles to arpeggios?

Updates: Need to provide updates for mid-range products, too. Competitor is making “updatable OS” a sales point. Example: Update MOX to control element level through knobs (now a standard MOXF feature).

Community: Community is very important. Share riffs, voices, whatever. Community builds excitement and loyalty. Yamaha must participate. (Yamaha is already perceived as too aloof.) Publish specs for file formats and let open source development loose. Provide an open garden and let thousands of flowers bloom.

MOX internal architecture

Curiosity finally overcame inertia and I ordered the service manual for the Yamaha MOX6 and MOX8 workstations. (The Yamaha 24×7 part number is “S M MOX6/MOX8”.)

If you remember from my previous discussion about workstation internal architecture, the Motif XS synthesizer is Linux-based and has a 400MHz Toshiba TX4939 RISC CPU as its main processor. The TX4939 uses the MIPS instruction set and controls two SWP51L tone generator integrated circuits. Since the MOX is advertised as descendent of the Motif XS, I fully expected a MIPS architecture processor with only one SWP51L.

Check out the Yamaha MOX block diagram.

Surprise! The main processor in the MOX is the Yamaha SWX02 with an internal clock speed of 135.4725MHz. The SWX02 has an SH-2A CPU core and probably does not run Linux. The SWX02 is also used in the Yamaha PSR-S650 arranger workstation where it is clocked at the same rate. This processor seems to be Yamaha’s choice for cost-sensitive, mid-range products.

The MOX has one SWP51L tone generator IC clocked at 90.3168MHz. The SWP51L is fed by two 64MByte wave ROM ICs. The wave ROM components are Lapis Semiconductor MR26V51252R 512Mbit P2ROM devices in 32Mx16-bit configuration. One device provides a 16-bit high (H) channel and the other device provides a 16-bit low (L) channel into the SWP51L. The high and low wave ROMs communicate with the SWP51L over a 32-bit wave memory bus. The SWP51L has a separate 16MByte SDRAM on a dedicated interface to support digital signal processing (DSP). The DAC and ADC are also connected directly to the SWP51L.

The SWX02 functions primarily as a control processor. This is quite different from the PSR-S650 where the SWX02 performs tone generation as well as performing control duties. The SWX02 has its own wave memory interface and this interface is not used in the MOX. The S650 has a separate LCD controller IC. The MOX does not have a separate LCD controller and the LCD is connected to the SWX02 through its parallel general purpose I/O (GPIO) pins.

The MOX specifications describe the wave capacity as “355MB (when converted to 16-bit linear format)”. The physical wave ROM is 128MBytes total. Thus, Yamaha achieve overall wave compression of 2.78 to 1, or better.

The most interesting thing about the MOX is what it does not have. The MOX main logic board (DM) has unpopulated positions for:

  • A second SWP51L tone generator IC
  • Two additional wave ROM ICs (size unspecified) on the wave memory bus
  • An interface for a flash expansion module
  • A second WM8740 digital-to-analog converter (DAC)

Yep, Yamaha laid the ground for the MOXF. These positions are labeled “For future model” in the detailed circuit diagrams. One way to feel about that is cheated. A more rational way to view this situation is that Yamaha tries to lower cost through volume production (eventually) giving us more product for less money.

The MOX polyphony is 64 notes. The MOXF polyphony is 128 notes due, presumably, to a second SWP51L. A Motif/MOX note may use up to eight voice elements. Therefore, I infer that an SWP51L has a total tone generation capacity of 512 voice elements. Switching context to workstation arrangers for a momemnt, both the PSR-S950 and Tyros3 have 128 note polyphony. The S950 has one SWP51L and the Tyros3 has two SWP51B integrated circuits. I now believe that the S950 is a four element per voice synthesizer while the Tyros3 is known to be an eight element per voice synthesizer. (The S950 is voice compatible with the A2000, which is known to be four elements per voice.) Thus, I don’t think Super Articulation 2 (SA2) voices based on Articulation Element Modeling (AEM) technology are coming to the S950 or a new mid-range arranger workstation. Not without a second SWP51L, anyway. I’m guessing that AEM requires an eight element per voice engine.

It’s interesting to see how and where Yamaha shaved cost in order to produce a value-oriented mid-range product. It also provides geater justification for the higher cost in the upper end Motif and Tyros products.

See this article for an architectural overview of the Yamaha arranger product families.

Finally, Yamaha releases the source code for GPL’ed parts of the Motif XS, Motif XF, and S90 XS/S70 XS. See the Yamaha source code page. The MOX and MOXF are not mentioned on this page, giving further evidence that these products are not Linux-based.

Ancient weapons and tools

Back in the mid- to late-1990s, Yamaha developed and manufactured a wide range of plug-in cards and modules. In many cases, the technology is unique and is still useful today. I have two old Yamaha modules:

  • The VL70m analog modeling synthesizer module and
  • The AN200 desktop beatbox and analog modeling synthesizer.

Both are based on Yamaha’s analog/physical modeling techniques. The VL70m, which has a native WX11 breath controller interface, models string- and pipe-based instruments both acoustic and “virtual.” The AN200 models a 5 voice Sequential Circuits Prophet 5 analog synthesizer. The AN200 also has patterns, a sequencer and a three channel AWM (sample-based) rhythm section.

Although you can program either one of these boxes through the front panel, you really need software tools for deep editing. Yamaha provided editors for both the AN200 and the VL70m. There are also editors for the PLG100 and PLG150 line of hardware plug-in boards that are the module’s cousins. The PLG series use the same analog modeling, FM, AWM, and XG technology as Yamaha modules and synthesizers of that era. The PLG boards can be plugged into a PLG-compatible synthesizer thereby expanding the synth’s sonic capability. The first models in the Motif product family, for example, accepted PLG boards. Unfortunately, the PLG boards and the analog modeling technology was phased out in the early 2000s.

The software tools of that era never advanced beyond Windows 2000 or Windows XP. So, if a guy or gal wants to use these tools today on Windows 7, they better strap in.

Yamaha provided three kinds of tools and plug-ins over the years:

  • Plug-ins hosted by XGWorks or XGWorks Lite (up to version 3.x).
  • OPT tool plug-ins hosted by SQ01, Studio Manager or XGWorks version 4 and later.
  • Standalone tools.

A few of these tool names may not be familiar to you. XGWorks (version 3.x and earlier) is a standalone sequencer that initially ran on Windows 95/98. A patch makes XGWorks (version 3.0.7) run under Windows XP. XGWorks was replaced by Yamaha’s Open Plug-in Technology or “OPT.” OPT is a Microsoft OLE-based standard for plug-in tools. Yamaha dropped the early version of XGWorks and substituted the OPT-compatible SQ01 sequencer in its place. Yamaha also released XGWorks 4 and XGWorks ST in Japan; both are OPT-based. SQ01 and XGWorks 4/ST are OPT plug-in hosts. Old-time users today lament these changes because SQ01 and XGWorks 4/ST do not have some of the features of the early XGWorks. The arranger-like style features, for example, were lost.

It’s worth noting that a few other manufacturers adopted the OPT standard. Cakewalk SONAR can host OPT-based plug-ins. So, if you have a VL or AN editor in OPT plug-in form, then SONAR can find and launch the plug-in editor! Functionality may be limited depending upon the OPT level supported by the host and plug-in.

Well, as if that history isn’t complicated enough, Yamaha eventually bought Steinberg and its Cubase DAW. Support for SQ01 and XGWorks 4/ST was dropped. Studio management is handled by the Yamaha Studio Manager which can host OPT plug-ins among other things. Studio Manager v2.3.1 runs on Windows 7 and Windows 8 (with a minor caveat). This is a modern era host!

Unfortunately, OPT-based plug-ins for the VL70m and AN200 are not readily available for download. The Yamaha web site only has standalone editors or editors which work with the very old XGWorks 3.x. It is possible to get XGworks 3.0.7 running on 32- and 64-bit Windows 7 with persistence and patience. The following produced worked on 64-bit Win 7:

  • Install XGWorks or XGWorks Lite v3.0. You must run the installer in Windows XP compatibility mode.
  • Immediately install the v3.0.7 update also known as the “XP patch.” Again, run the installer in Windows XP compatibility mode.
  • Immediately, restart your machine.

With any luck, XGWorks will now run on Win 7. Of course, this assumes that you even found a copy of the original XGWorks installer or the update! I suggest looking on a Yamaha tools CD-ROM from the late 1990s such as the AN200 tools disk where I found my copy. Then download the appropriate AN or VL editor for XGWorks and install them into the XGWorks directory. Again, you should run these installers in XP compatibility mode.

After a lot of searching and browsing, I did manage to locate the latest version (v1.2.2 released in 2003) of the AN Expert Editor for the PLG-150AN board. This version is OPT-compatible. OPT plug-ins, by the way, are stored in “C:\Program Files (x86)\YAMAHA\OPT Tools” just in case you want to double check the installation. I installed the AN Expert Editor and thought I was home free. Indeed, you can launch the editor via Studio Manager and tweak voices. The editor in standalone mode does not detect the MIDI interface and does not communicate with the AN200. Thank you, Studio Manager.

Version 1.2.2 of the AN Expert Editor, however, really wants to communicate with an AN1x synthesizer and does not handle MIDI bulk dumps from the AN200! The editor refers specifically to “AN1x” bulk dump, not “AN200” like the earlier XGWorks AN200 plug-in. One can still perform a bulk dump/receive through the AN200 front panel and the MIDI-OX utility. Although this is an adequate work around for back-ups, lack of AN200 bulk support may hinder voice management through the editor.

I still need to experiment with the VL editors. At least I have backed up the AN200 voices that I created years ago.

So, there you have it. Some successes, some failures. The old tech is great as long as you don’t let expectations about software support get too high. A deep breath or two along the way definitely helps!