Oriental keyboard, how to turn a normal keyboard into one?


As a newcomer to Midihub and midi more broadly, I find some things very easy to implement with the Midihub and others very difficult. I’ll explain what I’m trying to do below and add an appendix with background information.

1 Introduction

An oriental keyboard can divide the octave into 24 equally divided quarter tones. At initialisation the oriental keyboard is tuned as a normal keyboard. However, there is a number of switches laid out similarly to the keys on one side of the keyboard. If one such switch is turned on, the corresponding key is detuned by 50 cents across all octaves.

I’m trying to implement this on a normal keyboard, namely a Yamaha Reface CP. I’m trying to use the top octave (C#7 to C8) as switches. I struggle both with the pitchbend and the switching function.

2 Pitchbend

First, I made an attempt with using the top octave keys as momentary buttons rather than as switches. I filtered the E notes (E1, E2, …, E7) to a virtual pipe and let all the other notes pass to the midi out. In the virtual pipe I mapped the notes from channel 1 to channel 2. Then I transformed “note on E7 velocity >0” into “pitchbend lsb 0 msb 48” working with channel 2. Furthermore, I transformed “note on E7 velocity =0” into “pitchbend lsb 0 msb 64”. I send the result to the midi out.

What works? E7 is quiet. When pressed the other E keys are tuned down a quarter tone. When released they are tuned back.

What doesn’t work? All other keys are tuned down as well. I thought putting them in different channels would be enough. (Using the microscale function would not be possible as I would need 2^12 different scales, although I guess I don’t need all combinations …) Is there something I have misunderstood about pitch bend and channels?

3 Switches

I don’t want to hold down the keys in the top octave the entire time (ideally). Pressing the key once should tune the key down. Pressing it again should tune the key back up. I’ve tried to implement this with mappings for the bypass, but I have not been successful. I have only been able to get momentary buttons that way. Os there some easy way to implement toggles/switches/flag variables?


Setup. I connect the midi out from the Reface into the Midihub midi in A. I connect the midi out A from the Midihub into the Reface midi in. I turn transmit midi on on the Reface.

My attempt at a patch is attached as oriental_keyboard.mhp. (In preset 5 if it matters.)

oriental_keyboard.mhp (429 Bytes)

The Yamaha Reface manuals are available here: reface - Downloads - Synthesizers - Synthesizers & Music Production Tools - Products - Yamaha USA Note that I have cp and not yc, dx or cs. The data list may be most relevant?

Something similar has been discussed before it seems. On the topic “OnOff Toggle Switch”. But it didn’t make me wiser and I’m not sure if it applies to what I’m trying to do.

1 Like

Hey @henrik, Thanks for your detailed explanation and uploaded patch; the two together help see what you’re trying to do.

Yes, your Transform is sending a PB message out MIDI A. This will affect all subsequent notes on that channel.

So, I’m afraid you’ve run into a limitation of MIDI 1.0 spec itself. (Hence MPE keyboards)

Your workarounds are somewhat limited as your “2^12” suggests you’re not playing monophonically

For example

Some synths can be set to play quarter-notes…

Pitch Keytrack
Determines how much the pitch of the selected oscillator depends on the MIDI note number.
The reference note for Keytrack is C3, note number 60.
For positive settings, the oscillator pitch rises on notes above the reference note; for negative settings the oscillator pitch falls by the same amount, and vice versa.
A setting of +100% corresponds to a 1:1 scale – e.g. when an octave is played on the keyboard the pitch changes for the same amount.


…but even that –if DX allows it– would be comparatively ugly and only improved a bit by Midihub:
say having half the keyboard remapped to the semis and the other half to the other quarter-notes

PS. Technique for On/Off Toggle Switch using virtual mappings in case it’s useful going forward

1 Like

Here’s a preset I just built which should do what you’re after:

Oriental_Keyboard.mhp (1.9 KB)

The octave C7 - B7 notes (assuming Midi Note 60 is C4) should be used as toggles for quarter tone lower pitch for the matching key.

The preset dispatches the below octaves to 12 channels, based on the note name.

Pitch Bends in MIDI apply to the entire channel at once, your synth must be listening to notes on all channels (‘omni mode’ should be turned on, or at least the synth should be listening to channels 1 - 12)

If you’re using the same synth that’s producing sound to play the notes, you should turn off the ‘local control’ setting.

Different synths may have a different pitch bend depth, in that case, the Transform pipe which is bypassed in the screenshot should be adjusted accordingly to match the desired tone pitch.

The octave range and the octave to control the toggles could be increased.

Let me know how it works. :slight_smile:


Thank you! I’m very grateful for the preset, Giedrius, but I’m afraid it still does not work :no_mouth: Not out of the box at least. I’ve only had time to test it, not check the code.

The switch works, but the pitchbend does not. When I press any key in the top octave the entire keyboard is shifted by a quarter tones. It stays that way until any other key in the top octave is pressed after which it is reverted. It’s an improvement, there is no key to note correspondence.


  • The default mode is poly on/omni off. I have set the mode to poly on again just to confirm. As for omni, the only way to change it was to send a cc 125 message to the synth, which I’ve done. According to the midi chart, cc 125 seems to be overloaded as some kind of turn off notes message? I have been able to confirm that notes are turned off when I send such messages, but how to check the mode of the device I don’t know.
    • According to the website for a product similar to the midihub but no longer in production (Hπ Instruments | GM microtuning compatibility), the midichart for the reface cp synth should be acceptable. (The midi chart is among the manuals linked in the appendix of my first message.)
  • I have turned off the local control setting. I quickly ran into that problem when playing with the microtonal scales :sweat_smile:
  • I haven’t checked the pitchbend range, but the pitch bends sound alright, they are just not in the right places. Or could this produce other problems?

Additional observations:

  • I have also implemented a preset with a 17 equally divided octave scale. A problem with that is that if I play one note and then another while holding the first, the first note is bent. I assume that this is part of the same problem? If the notes are played in sequence it sounds alright. Or well, as alright as it can in 17edo :sweat_smile:
  • Both the problem with your preset and the 17edo one persist even if I connect the A out into my laptop (I tried garageband and surge xt).
  • It seems that cc messages in your preset is interfering with the tremolo on off switch on the reface cp synth?

It sounds like the problem is that your keyboard is currently not responding to Pitch Bends and Notes on different channels appropriately, this may have to do with its internal settings.

You should look into how to enable to receive notes from “All” channels on your keyboard, it looks like it’s possible to use some keyboard combinations to change the settings too, since firmware version 1.30:

If you have other synths available, you may want to try something else, just to make sure the preset is working fine (it passed my own quick tests using PC software synths)

For microtonal scales (and the attached preset) to work correctly, it’s expected that the sound producing device keeps track of the last Pitch Bend value for all MIDI channels (16 at most). The Micro Scale pipe dispatches each new note to a free Channel slot and sends the appropriate PB message. The attached preset splits out every note of the chromatic scale to channel 1 - 12, and produces a PB message on the matching channel when you toggle keys on the particular high octave.

Most synths I’ve encountered so far do keep track of the last Pitch Bend value sent, and work as expected. Some require special setup for it, for example, if you’d use Ableton’s synth sounds, you’d have to actually make many tracks with the synth, each set to listen to a particular MIDI channel, instead of receiving MIDI notes from all channels, as it does not seem to keep track of Pitch Bends on individual channels, so you have to work around that by using many tracks instead.


@henrik, Giedrius’ preset depends on your synth being multitimbral and playing notes on Ch1-12

(My previous –less optimistic!– response was based on the idea the Reface isn’t!)

@resonotter is correct, I’m afraid. Yamaha told me that although the Reface CP can listen to multiple channels, it is not multitimbral, and therefore cannot do independent pitchbends. Thank you anyways!

And yes, @Giedrius, the preset did work when I tried it with other synths.


I feared as much @henrik

Hopefully, as your topic is well named, other users will discover @Giedrius’s preset further down the line; it’s a very elegant construction!

1 Like