All is swell (SWL)

Yamaha develop a wide range of keyboard products from low-cost entry-level ‘boards to high-end synthesizers and digital workstations (AKA “arrangers”).

Within a market segment, the engineering challenge is to develop, manufacture and test a product with the desired feature set at the target selling price. I won’t discuss profit margin here since no one really knows, but Yamaha. We do know, however, that amortized non-recurring and recurring costs must be low enough to produce a significant return. Cost sensitivity is simply a day-to-day reality.

The entry-level segment is the most cost-sensitive segment because most customers in this segment are looking for an inexpensive keyboard with basic functionality. Think “Parents buying a first keyboard for a kid who may walk away from the whole thing in a week or two.” The entry-level segment outsells the mid- and high-end portable keyboard segment by nearly 2 to 1:

    Category                       Units            Retail value
    -----------------------------  ---------------  -------------
    Acoustic guitars               1,499,000 units  $678,000,000
    Electric guitars               1,132,000 units  $506,000,000
    Digital pianos                   135,000 units  $165,000,000
    Keyboard synthesizers             81,000 units  $104,000,000
    Controller keyboards             160,000 units  $ 32,000,000
    Portable keyboards under $199    656,000 units  $ 64,000,000
    Portable keyboards over $199     350,000 units  $123,000,000
    Total portable keyboards       1,006,000 units  $187,000,000

    Sales Statistics for 2014, USA market

Synth fanatics should note that although the average selling price (ASP) is higher for synths, the portable keyboard segment moves a much higher number of units. Fortunately, for manufacturers playing in the entry-level portable keyboard space, volume is relatively high and non-recurring cost can be laid off across a larger number of units than synths.

The entry-level segment has one other important driver — the desire for portable, battery operation. This design consideration limits the amount of electrical power available for computation and thus, limits the amount of computational capacity itself. Some dynamic power can be bought back through lower CPU clock speeds. Folks accustomed to giga-Hertz CPUs may be shocked to see such low clock speeds! Lower clock speeds simplify cooling and reduce overall weight by eliminating heat sinks and cooling fans.

LSI vs. commodity

Yamaha perceive their proprietary expertise in large scale integration (LSI) as a competitive advantage. Although Yamaha exploit commodity components where possible, tone generation and digital signal processing (DSP) are performed in proprietary hardware.

User interface and control (e.g., USB communications, MIDI, LCD, etc.) are a good fit with commodity CPU technology. Yamaha — and Roland — have a long history with H8 and SH architecture CPUs from Hitachi, now Renesas. Early products employed H8 microcontrollers for host CPU functions. Yamaha eventually migrated to the “Super H” reduced instruction set computer (RISC) family. (In 2011, Renesas announced the end of the H8 line.)

Yamaha have a considerable investment in software built and tuned for the SH family. Thus, migration to a new commodity architecture (ARM) is a pretty big deal with a high internal cost. Yamaha have adopted ARM for panel scanning/control in Reface and are using ARM processors for host computation in Montage and Genos. Time and experience will show if ARM is adopted in the entry- and mid-range segments, too.

Old faithful

Yamaha’s entry-level models rely on “old faithful,” the SWL family of proprietary Yamaha processors. The SWL is used in all entry-level models — a good way to drive volume manufacturing of a custom part. The SWL family has undergone several revisions over the years. I don’t intend to recount that history here.

The SWL01U was used in many products including the PSR-E443. The external clock crystal oscillates at 16.9344MHz yielding an internal clock speed of 33.8688MHz by scaling. The relatively low clock speed reduces heat and power consumption. The following diagram shows the typical “compute complex” in an entry-level keyboard. [Click to enlarge.]

The structure in the diagram is generic across Yamaha entry-level products. If you dive into the service manual for a specific entry-level keyboard, you’re likely to find a “compute complex” like this generic one although memory capacities and such are model specific.

The SWL01U provides a CPU bus to which a USB controller (optional), program/wave ROM, flash ROM and SDRAM are attached. The SWL01 has many on-board interfaces: keyboard scanning, LED/LCD interface, bit-serial audio (ADC, DAC), control knob sensing, etc. The SWL01U has an integrated USB controller which can be deployed in ultra low-cost, minimum component count designs.

The SDRAM is, of course, read/write working memory. The flash ROM retains user data when power is turned off.

The program and waveform data are stored in the same physical memory component. In the case of the PSR-E443, the prog/wave memory is a 16MByte parallel NOR flash memory. The factory sound set, therefore, is smaller than 16MBytes. Panel voices, the XGlite sound set, and drum kits are crammed into this small memory along with the E443’s software.

The SWL01U integrates 32 tone generation channels and relatively “lite” DSP effects (reverb, chorus and flanger). I have not had the chance to browse the service manual for the PSR-E453 (or E463). E453 polyphony increased to 48 voices and the DSP effect types got a modest bump. I expect to find a new, updated member of the SWL family in these newer keyboards.

Anyone modestly familiar with microcomputer systems will look at the diagram above and say, “It’s just a computer system,” and they would be right. The simplicity of the system — and its low cost — severely limit tone generation and effect processing, however. The bottleneck is the shared system bus. All traffic must cross this bus whether it is instructions for scanning the keyboard matrix, waveform samples for tone generation, or working data for DSP effects. There is only so much bus (memory) bandwidth and it must be split several ways.

We often think of tone generation as compute-limited. Tone generation may be memory (or bus) bandwidth limited, too. Each mono channel of tone generation must read 88,200 bytes per second:

    44,100Hz * 2bytes = 88,200 bytes per second

For 32 tone generation channels, total required bandwidth is :

    88,200 bytes per second * 32 channels = 2,822,400 bytes per second

This rate must be guaranteed in order to avoid audible artifacts. (Tone generation reads are probably given highest priority by the hardware.)

The system bus does not operate at the same speed as the CPU clock. Assuming 2 clocks per bus operation (conservative estimate), 2.8MBytes/second is a significant fraction of available system bus bandwidth (17 percent). The number of channels cannot be increased without affecting the latency of host operations such as key scanning and real-time player control (e.g., front panel knobs).

Who’s counting?

Entry-level products have a low component count thanks to all of the functionality integrated into the SWL. Low component count has many benefits including smaller printed circuit boards (PCB), lower power, fewer solder connections to go wrong during manufacturing, smaller chassis, etc.

The SWP01U has 176 pins around a modest-sized, quad flat surface mount package. By putting all memory traffic on the CPU bus, i.e., not using a dedicated memory channel for waveform samples, Yamaha have achieved a relatively low pin count. [I never thought I would ever refer to 176 pins as “relatively low.”] Other Yamaha solutions have a much greater pin count due to separate dedicated memory channels. Those solutions, however, deliver a much higher level of performance and polyphony. More about this in future posts.

What’s up, clock?

What’s up with those clock speeds? Why not something “even,” like 16MHz?

Turns out, 16.9344MHz is a multiple of the sample playback frequency:

    16,934,400Hz = 44,100Hz * 24bits * 16 

The SWL generates the sample clock for the ADC and the DAC.

The PSR-E443’s ADC is a Texas Instruments PCM1803ADBR 24-bit analog to digital converter. A note in the schematic states “MCLK=768fs, fs=44.1kHz, 24-bit left justified, HPF on, Slave Mode.” 768*fs is 33.8688MHz which is exactly the CPU clock frequency.

The PSR-E443’s DAC is a Cirrus Logic (Wolfson) WM8524CGEDT/R 24-bit digital to analog converter. A note in the schematic states “SYSCLK=33.8688MHz (768fs), BCLK=2.8224Mhz (64fs), WCLK=44.1kHz (1fs), 24-bit left justified.”

You can find the datasheets for the ADC and DAC by searching the Web.

The PCM803A and WM8524 support three audio formats: left justified, right justified and I2S. The formats and clock scheme are rather common and standard, and are supported by most commodity audio ADC and DAC components. The SWL processor, ADC and DAC remain in synch because the CPU clock and the sample clock are one and the same.

So long!

I hope this blog post has given some insight into the design of entry-level musical instrument keyboards.

Copyright © 2018 Paul J. Drongowski

MIDI TRS pin-out

The MIDI Association has released Recommended Practice #54 covering the use of TRS connectors for standard current loop MIDI. If you’re not a member of the MIDI Association, I strongly recommend becoming a member. Among other benefits, members have access to the Association’s on-line specifications and recommended practices.

Without putting too fine a point on it, the diagram from RP#54 says nearly all. [Click image to enlarge.]

MIDI device designers are facing the same sort of space issues as phone developers. The physical form factors are getting too darned small! In many cases — no pun intended — connector size is a limiting factor. Old school 5-pin DIN connectors are enormous relative to slender product envelopes. The MIDI Association recommends 2.5mm TRS connectors and a maximum adapter cable length of 2 meters.

So, of course, you’re wondering about the MIDI controllers, etc. that you already own. A quick check with a digital meter or continuity checker will determine if your current device is consistent with the recommended practice or not. I checked the adapters with my Akai MPX8 and, yep, the adapters are consistent.

The Korg HNS-4331 MIDI conversion cable is also consistent with the RP #54 convention. Albeit, both the Akai and Korg adapters have 3.5mm TRS plug, not 2.5mm. 2.5mm is a good idea since it would be all too easy to plug 3.5mm headphones or a live LINE output into a MIDI port. Yikes!

The IK Multimedia cable that came with my iRig MIDI is a bit of an oddball. First, the 5-pin DIN connector is male, not female as shown in the diagram above. Further, the pin 4 and 5 connections are swapped relative to the pin wiring shown above. So, if you’re wiring for IK Multimedia, please take care and check things out for yourself using a continuity checker.

Sure wish this recommended practice was available a few years ago…

In case you missed it, here’s the MIDI reference circuit.

Please join and be sure to read the 2014 update to the MIDI electrical specification.

Copyright © 2018 Paul J. Drongowski

Yamaha VKB-100 redux

OK, sooner or later, you knew I would circle back to the Yamaha VKB-100 VOCALOID keyboard. This little gem is a vocal keytar that lets you play pre-loaded lyrics using an installed Vocaloid library sound. Up to five libraries may be installed including the VY-1 library that ships with the VKB-100.

The VKB-100 can be had for the relatively low price of roughly $400USD, depending on shipping cost from Japan. The VKB-100 is only available in Japan at the current time.

Here’s a quick summary of the specs (translated from Japanese):

Number of keys: 37
Keyboard type: HQ (High Quality) MINI keyboard
Maximum polyphony: Vocaloid (mono), Instruments (48)
Number of voices:
    Vocaloid: Up to 5 libraries, Preset: 1 library (VY-1)
    Instrument: Preset: 13
Effects: Reverb, distortion, chorus, tremolo
Equalizer: Flat, Boost, Bright, Mild
Lyric operation: Loop, phrase return/forward, head search, recover
Skill
    Vocaloid: 2 assignable skills
    Instrument: Skill 1: Sustain, Skill 2: Portamento
Memory slots: Vocaloid: 20, PCM sound source: 20
Main controls Pitch Bend Wheel, Expression Wheel, Effect Knob, 
    Select Knob, Selector Slider, Transpose button, Phrase Button, 
    Memory Button,  Skill Button, Octave Button, Loop Button, 
    Master Volume Knob
USB: USB to HOST, USB to DEVICE
Audio connections
    Headphone out
    AUX in
    Line out
Amplifier output: 0.7W
Internal speaker size: 3.6cm
Power adapter: PA-150B
Battery power: 6 x AA alkaline or rechargeable NiMH batteries
Battery life: About 7 hours when using alkaline batteries
Width x depth x height: 821 mm x 121 mm x 65 mm
Width x depth x height: 32.3 in x 4.8 in x 2.6 in
Weight: 1.5kg
Accessory soft case: SC-KB350 (5,500 Yen)

The keybed is probably the Reface keybed. (Sturdy, slightly clack-y.) What’s that? Instruments? Hmmm…

I don’t want to run through the operational particulars, again. Please see the following pages for background information:

It’s cheap, it straps on, it has a keyboard and wheels. Can it be used as a MIDI controller? As an instrument in it’s own right?

The build quality looks pretty decent and the ergonomics are nice. There are two wheels on the neck: pitch bend and expression. And here we hit the first bump in the road — no modulation. A quick look at the MIDI chart and we find that the VKB-100 sends:

  • Pitch bend
  • Portamento time (CC# 5)
  • Expression (CC# 11)
  • Portamento ON/OFF (CC# 65)
  • Release time (CC# 72)

That’s it. Now, I suppose one could remap CC# 11 to modulation, but it would be better to have modulation generated natively.

The other gotcha. The VKB-100 has two modes: normal and keyboard mode. The VKB-100 only sends MIDI controller/key messages in keyboard mode, not normal mode. The user must select keyboard mode through a menu and this setting is not retained across power off. That means changing to keyboard mode after every shutdown.

The VKB-100 doesn’t receive much of MIDI anything except some undocumented SysEx. Thus, forget about sequencing.

The final gotcha is MIDI over USB only. If you want to drive an old school 5-pin DIN MIDI module or keyboard, you will need to bridge USB to 5-pin.

So, what about those preset instruments? Here’s a list:

  1. Synth 1
  2. Synth 2
  3. Synth 3
  4. Synth 4
  5. E. Guitar
  6. Harmonica
  7. Tenor Sax
  8. Piano
  9. E. Piano
  10. Synth Bass
  11. Slap Bass
  12. Air Choir
  13. Applause

Quality is comparable to an entry-level PSR keyboard. The Tenor Sax voice, for example, sounds like the Sweet! Tenor Sax in a PSR-E443. At least you have four effect types (reverb, distortion, chorus, tremolo) with four effect depth levels each. Kinda basic.

After a few insipid J-Pop YouTube demos, you want to blow your brains out. I watched them, so you don’t have to. Here are a few demos to check out.

Hey, Blake! You got to go to Superbooth? I’m jealous!

Bottom line, I was intrigued until I dove into the (Japanese) manuals and found the VKB-100’s limitations as a controller and stand-alone instrument. Ordering from Japan is no big deal, but the VKB-100 would have to offer some real cool features and sounds to compensate for the labor of translating Japanese to English and dealing with display messages in Japanese.

If you want to get your feet wet with Vocaloid, I recommend the Gakken NSX-36 Pocket Miku module. No keytar action, but you get a multi-timbral MIDI module that does Miku Vocaloid at a very modest price (less than $50 USD).

Copyright © 2018 Paul J. Drongowski