Nils‘ K1v: Version 1.14 released – Multi support!

I’ve just released version 1.14 of Nils‘ K1v – The Kawai K1 emulation VSTi/AU.

Biggest change is that it now also supports Multi presets. I added the 32 factory Multis and all Multis from the ROM cards, resulting in 384 Multi presets in total.
As a sum, Nils‘ K1v now contains 1352 presets.

Nils‘ K1v – Multi Play Mode

Of course, Multis can be edited, too. To add all of the new features, I modified the UI slightly. The Source Mute buttons have been moved to the Single Edit page, making space for the new Buttons MULTI and SYSTEM.

I’ve been able to fit four Multi sections on one page, arrow buttons allow to switch between sections 1-4 and 5-8.

Multis work as they do on the Kawai K1 hardware. Up to eight Singles can be combined in various ways to create either rich layered sounds or multiple zones on the keyboard.

The only difference between a K1 and K1v is that in Poly Mode VR (meaning variable), the polyphony is unlimited, while it was still limited to 16 or 8 voices in total on a K1 hardware.

Nils‘ K1v – Multi Edit Mode

The SYSTEM page is a new page that allows to change global parameters, basically it’s a copy of the K1 Midi Settings and supports specifying a Midi receive channel (previous versions always ran in Omni mode) and to disable Program Change processing, Sysex & more.

Global settings are saved as part of the DAW project.

Nils‘ K1v – Global Settings page

Besides the improvements as pointed out above, some additional things have been added, such as cursor key preset navigation (Hallo Jürgen!) and of course, bugs have been fixed, too. The full change log can be found below.

Download the new version from the K1v product page.

Changes

  • [Fix] Wrong number of presets (832 instead of 968) were reported to plugin hosts
  • [Fix] Midi notes could get stuck in some cases
  • [Fix] Rounding issue in fixed key note number drop down menu that caused note B0 to be displayed although note C1 was selected
  • [Imp] K1v now supports Multi presets. All factory Multi presets have been added for all factory banks, making up a total of 384 Multis, or 1352 presets in total
  • [Imp] K1v now has a settings page to allow to specify the Midi receive channel, disable/enable receive & send of SysEx and more
  • [Imp] Midi receive channel can now also be modified by sending an Omni-Mode-Off control change from a specific Midi channel.
  • [Imp] Added ability to navigate through presets with cursor keys
  • [Imp] Code optimizations to reduce overall CPU usage

Nils‘ K1v: Version 1.13 released

I just released Nils‘ K1v version 1.13.

The most noticeable change is that I have added all 200 PHm Pop Synth Module presets to the plugin, resulting in a total of 968 Singles.
As the list of Singles became even larger, I reworked the play mode section to make Single selection easier. There is now a dropdown to allow to select a bank directly and there are additional navigation buttons.

Nils‘ K1v – new Play Mode section

Another interesting change for some people might be one accuracy fix: Key Scaling =>Envelope Time didn’t modify Decay but only Attack, causing some Singles to sound incorrect.

More details & all fixes and changes can be found in the change log excerpt below. The new version is available for all platforms and can be obtained from the Download Page

Changes

  • [Fix] Drop down menus were hard to read on Linux because of the font being too tiny
  • [Accuracy] Key Scaling => Envelope Time modulation did not affect Decay but only Attack, causing some Single to sound incorrect when compared to the K1 hardware.
    This change fixes the Single ‚KillDa Mix‘ and others, mostly Pianos.
  • [Imp] All 200 PHm presets are now part of the plugin, causing it to have 968 total built in presets.
  • [Imp] Single selection screen has been reworked, for easier navigation it now includes a dropdown to select the Bank and has more navigation buttons.
  • [Imp] Plugin Logo has been reworked to match the K1 hardware logo. Furthermore, the „KAWAI“ logo has been integrated as Kawai gave official permission for the plugin.

Kawai K1: 100% accurate velocity curves – provided by the firmware ROM

Some users reported that the velocity response of my K1v plugin is quite different compared to the K1 hardware. And yes, that is probably the area with the biggest difference between the K1v and the K1.

As I have pointed out in an earlier article, tracking down the velocity curves is very difficult, as there is no way to get the raw velocity data. What you will capture on the audio out is always the envelope volume – modulated by the velocity curve. Getting the raw velocity data is impossible.

A different approach – using the K1m Firmware ROM

While sitting here and thinking about how to solve the unsolvable problem, I had an idea. The K1 needs to have the curves stored somewhere. I used my PHm ROM that I have dumped earlier and loaded it as raw data into my wave editor.

It didn’t took very long until I found interesting data tables that looked similar to the velocity curve graphs in the manual. Actually, there a plenty of data tables in there. Not only velocity, I also found the key scaling curves and lots of other tables. I still need to figure out what they are for, but the result will be a much better precision in the K1 emulation.

Velocity Curves (length 64) & KS Curves (length 128) in Kawai K1 firmware ROM

The velocity curves have a length of 64 bytes each and have a range of 0 to 127, as you’d expect for velocity values. I extracted them from the ROM and used them in the K1v, but unfortunately they did not really match the K1 output.

Some things that I observed:

  • Velocity Curve 1, that is supposed to be linear, is not linear. Velocity Curve 3 is linear although it should not.
  • In my recordings, for most curves, velocity values above 100 do not make any difference anymore. But the curves have proper values, why aren’t they used?

Data Analysis

Lets first have a look at what the manual says VS what is in the data:

Velocity Curves – as stated in the K1 manual
Velocity Curves – as part of the K1 firmware ROM

What can be seen immediately is that all curves in the ROM are less exponential than required.

Furthermore, not the whole velocity range is used, at least not when modulating envelope volume. Take a look at the picture below, this is a K1 recording of Velocity Curve 1 with all velocity values from 1 to 127.

Velocity Curve 1 – Velocity Levels 1-127

As you can see, envelope volume is peaking way before velocity maximum. To be precise, the maximum envelope level is reached already at velocity 102. I made the gap in the recording on purpose by inserting a quarter after velocity 100 so I had to count less bars to find the values 😊.
The same applies to all other curves. Either the incoming velocity values are fed through some other table before the curve is applied, or afterwards. By testing different values and their result, I was able to verify that there must be another remapping before the velocity curves are applied.

Implementation details

It took me many hours, a lot of guessing, thinking & testing before I found the correct table in the firmware ROM. It turned out that it is a table with a length of 64, it looks like this:

Velocity remapping before being fed into the different velocity curve tables

This curve explains why very high velocity values do not make any difference anymore, they are cut off. Furthermore, the whole curve makes everything a little bit more exponential.

I was pleased with the result: I had steps in envelope volume values at the same velocity values than my K1m. The but came quickly as the values didn’t match the K1m.

K1m Velocity Curve 7
Intermediate result of K1v Velocity Curve 7

To make the result more exponential, I had to search for a table with a specific size: The envelope level has a range of 0 to 100, so a table with 101 values had to be the correct one.

As I had worked on this topic for such a long time, my source code with all kinds of tables grew more and more 😁 And now definitely needs some cleanup.

Firmware ROM tables converted to source code

Luckily, I found the correct table within one hour or so. It is a 16 bit table, it has a length of 101 as expected and makes the curves identical to the K1m.

Once more, Velocity Curve 7 as being output by the K1v, now 100% accurate:

Final result, K1v Velocity Curve 7 – identical to hardware K1m

You might see that there are very small differences due to rounding errors, but these shouldn’t really matter.

Two more pictures, a comparison of all velocity curves in all its glory 👍

K1m hardware Velocity Curves 1-8
K1v emulation Velocity Curves 1-8

Pending work

As I have confidence about what tables make up correct velocity curves, I need to implement proper modulation levels. So far, everything you see is at Vel => Env Mod +50, i.e. 100%. Special care needs to be taken when implementing the modulation strength as I currently have the impression that a value of +25 does not mean a modulation strength of 50%, there might be another remapping table being inserted to do this. Negative strengths are another topic that might be interesting.

Of course, once I’m done there will be another post to announce the release of the update.

Other useful data tables in the firmware ROM?

There are some other tables in the ROM, both 8 bit and 16 bit with data that looks interesting. If I can figure out what they are used for, I can improve the emulation a lot.

A 16 bit curve, length 101. Values from 1536 to 0 (at center) to 1536. Most probably modulation depth remapping
Another 16 bit curve with length 101, value range 0 – 4000. Most probably vibrato depth + others

For the latter curve, it looks very similar to one of my own curves that I had figured out by analyzing wave data.

Conclusion

If I ever go to emulate another synthesizer, putting more effort into ROM analysis instead of recording hours of data is the better way to go 😊 Stay tuned & thanks for reading!

Nils‘ K1v now available as Mac/Linux VST & official approval by KAWAI!

Finally, after waiting several weeks, Kawai reported back to me that they have no issues with me developing a Kawai K1 emulation. This is great news for me personally as I was still concerned that Kawai could respond in a way that would bring me in trouble. But they did not! 👍 They even sent high quality Kawai logos that I’m allowed to integrate into the plugin, I’m impressed, big thanks to Kawai!

Furthermore, there are now Linux & Mac versions of the VST. For Linux, there are .deb and .rpm packages in both 32 bits and 64 bits. The Mac version requires a 64 bit OS, minimum version is OS X 10.9 Mavericks.

For Mac, an AU version will definitely come. LV2 for Linux, too! Stay tuned.

Special thanks to all donators and to all testers at the KvR forum, a lot of people helped making the plugin available for Linux & Mac by testing on their machines.

My Kawai K1m: What is broken? Help needed to repair

You may have read about my Kawai K1m in the development blog. Unfortunately, it is slightly broken and I thought, as there are so many people around still loving these old machines, that some of you could give a hint to repair it.

The issue is that the envelope attacks behave incorrectly. Short attack values are fine, but larger values cause the machine to end in complete silence.

With attack values larger than 36, the attack never finishes, decay is never reached and the sound is audible forever, no matter what the decay/sustain/release values are.

If the attack is even longer, starting with value of 50, the volume starts to decrease. The attack gets stuck so early that the voice keeps being very quiet. With a value of 69, the sound is not audible anymore at all. Below is a picture that shows attack values up to 69, where the voice becomes completely silent.

Attack values up to 69

Anyone knows what is wrong? What I already tried:

  • I added fresh solder to most ICs, including the CPU, the WaveROM (you might know) and the RAM chips
  • I measured the connections between the three tone generators and between tone generators and CPU & Wave ROM, they’re all fine
  • I upgraded the K1m firmware, I ordered a new chip with version 1.5, previously it had 1.3, no change
  • I contacted Kawai and asked for help, unfortunately they have no idea
  • I turned it off and on again 😎

My current assumption is that one of the Tone Generator chips is faulty and needs replacement. If there is anyone with another idea, that would be absolutely fantastic! 👍

Anyone with ideas? Thanks a lot in advance!