Topic: Reverse (left-handed) keyboard?

A mention of scala files in another thread reminded of a question I've long had -- is it possible to use a scala file to create a left-handed keyboard?  From a quick read about the scala file format, I suspect not, but I'm not sure.

I've created a left-handed mapping in the past by intercepting midi messages (on Linux with JACK, using https://bitbucket.org/smulloni/lefty) but I'm not using Linux for this nowadays so I'm looking for another solution. 

Has anyone else tried playing with a left-handed keyboard?  It is quite interesting to try!

Re: Reverse (left-handed) keyboard?

Try MIDI-OX:
http://www.midiox.com/

It can do that.

Re: Reverse (left-handed) keyboard?

Interesting, thanks.  I'm using OS-X now, though.  If there isn't anything out there that scratches this particular itch, I might write something.  But if there is another solution out there that works nicely enough, I won't bother.

Re: Reverse (left-handed) keyboard?

(I'm left handed)

What advantage would this be if the firmware has graded hammer weights selected for right hand keyboard?

Ian

Re: Reverse (left-handed) keyboard?

Hi,

You can in fact use the Scala KBM (keyboard mapping) directly in PTQ.
I took the liberty to prepare one. Try the file below (save as reverse.kbm, and load in PTQ/Tuning/Keymap/Load mapping from scala kbm file)

Enjoy, Eran.

! Reverse Keyboard mapping
!
! Size of map. The pattern repeats every so many keys:
12
! First MIDI note number to retune:
0
! Last MIDI note number to retune:
127
! Middle note where scale degree 0 is mapped to:
63
! Reference note for which frequency is given:
63
! Frequency to tune the above note to (floating point e.g. 440.0):
440
! Scale degree to consider as formal octave (determines difference in pitch
! between adjacent mapping patterns):
-12
! Mapping.
! The numbers represent scale degrees mapped to keys. The first degree is for
! the given middle note, the next for subsequent higher keys.
11
10
9
8
7
6
5
4
3
2
1
0

Last edited by etalmor (05-11-2014 12:22)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Reverse (left-handed) keyboard?

Thanks, etalmor, I can't wait to try it!

And Ian, yes, graded hammer weights would interfere with the experiment.  But it is still interesting to try -- it is like seeing the world upside down!  Practicing this way can perhaps be fruitful as well as entertaining.  I like to practice anyway with mirror-image patterns;  I find that I make somewhat different motions by habit in my left hand than my right, and often I can solve technical problems by comparison with the other hand.  Switching hands completely around may give some insight into aspects of how we usually play that we would normally ignore.

Re: Reverse (left-handed) keyboard?

Smulloni,

I pleased you said that!   For fun I sometimes stand with my back to the piano with arms straight back and try to play.  However best of all is sitting normally but crossing my hands  and playing!

Amazing what we lefties get up to

Ian

Re: Reverse (left-handed) keyboard?

To try out the kbm file I piped a preexisting midi file through it, and the results are quite amusing:

https://soundcloud.com/smulloni/wrong-s...gal-tracks

Re: Reverse (left-handed) keyboard?

Thank you guys for this thread, I'll definitely give it a try! Playing a piano is a great exercise for brains and coordination, and this make it even more challenging! Sustain with a left leg for the win :D

Last edited by AKM (07-11-2014 22:25)

Re: Reverse (left-handed) keyboard?

etalmor wrote:

! Reverse Keyboard mapping
!
! Size of map. The pattern repeats every so many keys:
12
! First MIDI note number to retune:
0
! Last MIDI note number to retune:
127
! Middle note where scale degree 0 is mapped to:
63
! Reference note for which frequency is given:
63
! Frequency to tune the above note to (floating point e.g. 440.0):
440
! Scale degree to consider as formal octave (determines difference in pitch
! between adjacent mapping patterns):
-12
! Mapping.
! The numbers represent scale degrees mapped to keys. The first degree is for
! the given middle note, the next for subsequent higher keys.
11
10
9
8
7
6
5
4
3
2
1
0


When I save this as .KBM file, and try loading it in Pianoteq, it doesn't want to load it. Says "error while reading - invalid keymap size at line 1"... Devs?

Hard work and guts!

Re: Reverse (left-handed) keyboard?

If you have used notepad, there might be an invisible character at the beginning of your text file ( the utf-8 BOM , https://en.wikipedia.org/wiki/Byte_order_mark ) or maybe you saved it as an utf-16 file. KBM files have to be pure ascii. Then the file will load fine (although I'm not sure if it was a good idea to allow negative values for the formal octave)

Re: Reverse (left-handed) keyboard?

Ah, that was the trick. Converting the file to ANSI worked!

Last edited by EvilDragon (31-05-2016 22:12)
Hard work and guts!

Re: Reverse (left-handed) keyboard?

Returning to reverse keyboard mapping after some years, I find that the reverse.kbm file above now produces very strange results indeed within Pianoteq: the fundamentals do appear to be reversed, but the timbres are very strange, as if the partials have gone their own separate direction.  Here for instance is the Blues Demo rendered with the Erard (1922) Recording with reverse.kbm:

https://soundcloud.com/smulloni/blues-d...xUHsdEzXvd

If I use the "reverse keyboard direction" option under Advanced Tuning/Keyboard Mapping, the results are equally weird.  Every preset I've tried has the same issue.

Is this, as I would suspect, a bug, or is there another setting that needs to be combined with combining the reverse keyboard direction to produce sane results?

Re: Reverse (left-handed) keyboard?

For the record, the way to mirror the keyboard around middle D in Pianoteq now is: in the advanced tuning section, select “reverse keyboard direction”, change "string tension" to "full rebuild", and choose G2 as the diapason note (click on the invisible button immediately to the left of the C3 label in the keymap editor).  Without full rebuild, reversing keyboard direction produces useless results, and the diapason note can't be changed to G2 with the diapason note button, which won't accept values below 220.

Thanks to Niclas for explaining how to do this!

Re: Reverse (left-handed) keyboard?

smulloni wrote:

For the record, the way to mirror the keyboard around middle D in Pianoteq now is: in the advanced tuning section, select “reverse keyboard direction”, change "string tension" to "full rebuild", and choose G2 as the diapason note (click on the invisible button immediately to the left of the C3 label in the keymap editor).  Without full rebuild, reversing keyboard direction produces useless results, and the diapason note can't be changed to G2 with the diapason note button, which won't accept values below 220.

Thanks to Niclas for explaining how to do this!

I must confess when I saw this thread, my immediate reaction was "what a useless feature," but I was *so* wrong.  This is extremely instructive as a composer!  The insights I've gotten just from a few minutes of listening to my own compositions and a few pieces by others have been more useful and inspiring than anything I was ever taught in music.  It's one thing to invert a short theme or motif, but it's an entirely different, eye-opening experience to invert an entire large work--especially a multi-movement symphonic one.  I can't wait to see what else I find as I route more and more material through this easy-to-setup batch of settings smulloni and Niclas.  Thank you both!

Spotify: https://open.spotify.com/artist/2xHiPcCsm29R12HX4eXd4J
Pianoteq Studio & Organteq
Casio GP300 & Custom organ console

Re: Reverse (left-handed) keyboard?

tmyoung wrote:

This is extremely instructive as a composer!  The insights I've gotten just from a few minutes of listening to my own compositions and a few pieces by others have been more useful and inspiring than anything I was ever taught in music.  It's one thing to invert a short theme or motif, but it's an entirely different, eye-opening experience to invert an entire large work--especially a multi-movement symphonic one.

I'm glad you find it stimulating! Inversions can be fascinating, and obviously composers have found them fruitful for centuries -- the mirror fugues of Bach's Art of Fugue being a kind of limit case (maybe the most spectacular instance, while also being the least suggestive of further uses).  Cases when inversions either succeed somehow (some Bach pieces, like the fugue I posted years ago in this thread) but with different meaning than the original, or completely fail (like the Mozart Sonata K333 I've been inverting recently so as to work on my left hand technique) are also interesting in how they differ or fail.  It is really worth paying attention to what happens when an isomorphism is applied to a work of art.  I think it was Edward Cone who pointed out that a conventional analysis of Chopin's 1st Prelude transposed up an octave would be exactly the same as an analysis of the original, yet the two works would hardly be equivalent.  Any attempt to capture the significance of the difference is non-trivial, leading you into areas of human experience outside so-called music theory.   A similar but less drastic and more familiar transformation is change of tempo, which, because it is more familiar, we can become desensitized to, but to what we have been desensitized we may become resensitized — that's what music is for! Cheers, js

Re: Reverse (left-handed) keyboard?

smulloni wrote:

For the record, the way to mirror the keyboard around middle D in Pianoteq now is: in the advanced tuning section, select “reverse keyboard direction”, change "string tension" to "full rebuild", and choose G2 as the diapason note (click on the invisible button immediately to the left of the C3 label in the keymap editor).  Without full rebuild, reversing keyboard direction produces useless results, and the diapason note can't be changed to G2 with the diapason note button, which won't accept values below 220.

Thanks to Niclas for explaining how to do this!

I'm glad I could be of help. But please also thank Julien, he is the one who solved the puzzle..

Re: Reverse (left-handed) keyboard?

An additional way to get a left-handed keyboard is to use SuperCollider, the software used by jazz pianist Dan Tepfer that I wrote about some time ago. Here is a short program that inverts around Middle D:

MIDIClient.init;
MIDIIn.connectAll;

m = MIDIOut.new(0);
m.latency = 0.0;

n = 62; // Middle D

MIDIdef.noteOn(\On,
    {
    arg vel, nn, chan, src;
    if (chan == 0, {
            m.noteOn(1, n - (nn - n), vel);
    }
    );
}
);

MIDIdef.noteOff(\Off,
    {
    arg vel, nn, chan, src;
    if (chan == 0, {
    m.noteOff(1, n - (nn - n), vel);
    }
    );
}
);
)

Here is part of Bach's Prelude no 1 from WTCI played forward on channel 1 and heard backward on channel 2:
Nice chords, but not so baroque anymore...

https://forum.modartt.com/uploads.php?f...relude.mp3

Of course, using the Advanced Tuning as described is much simpler.

Re: Reverse (left-handed) keyboard?

Splendid.  And here's another approach with Python's mido module (see https://mido.readthedocs.io/en/latest/):

import mido

IN_CHANNEL = 0
OUT_CHANNEL = 1

def invert_pitches(port):
    for msg in port:
        if msg.channel == IN_CHANNEL and msg.type in ('note_on', 'note_off'):
            msg.note = 124 - msg.note
            msg.channel = OUT_CHANNEL
            yield msg

with mido.open_input(None) as inport:
    with mido.open_output(None, autoreset=True) as outport:
        for message in invert_pitches(inport):
            outport.send(message)

Re: Reverse (left-handed) keyboard?

In fact, my short demo at twice the speed and an octave higher works better as a harp part.

https://forum.modartt.com/uploads.php?f...20harp.mp3

Re: Reverse (left-handed) keyboard?

Gilles wrote:

In fact, my short demo at twice the speed and an octave higher works better as a harp part.

https://forum.modartt.com/uploads.php?f...20harp.mp3


More, More ... nice!

Lanny

Re: Reverse (left-handed) keyboard?

LTECpiano wrote:
Gilles wrote:

In fact, my short demo at twice the speed and an octave higher works better as a harp part.

https://forum.modartt.com/uploads.php?f...20harp.mp3


More, More ... nice!

Lanny

Well, you asked for it

Here is the complete prelude 1 reversed. I had to go back to the score since memory failed and, amateur that I am, there is a splice at the end due to a stupid mistake, but the chord progression is still interesting even in reverse!

https://forum.modartt.com/uploads.php?f...elude1.mp3

Since it goes too low forward so too high backward I left it untransposed. The interesting part in using the SuperCollider method is that I can listen to the normal version on channel 1 while playing and record the reversed one from channel 2.

Re: Reverse (left-handed) keyboard?

Gilles wrote:
LTECpiano wrote:
Gilles wrote:

In fact, my short demo at twice the speed and an octave higher works better as a harp part.

https://forum.modartt.com/uploads.php?f...20harp.mp3


More, More ... nice!

Lanny

Well, you asked for it

Here is the complete prelude 1 reversed. I had to go back to the score since memory failed and, amateur that I am, there is a splice at the end due to a stupid mistake, but the chord progression is still interesting even in reverse!

https://forum.modartt.com/uploads.php?f...elude1.mp3

Since it goes too low forward so too high backward I left it untransposed. The interesting part in using the SuperCollider method is that I can listen to the normal version on channel 1 while playing and record the reversed one from channel 2.

Excellent & Kudos,

Lanny

Re: Reverse (left-handed) keyboard?

This thread has been an interesting read. I've had a similar question that I've been looking for an answer to for quite a while. Would any of the tools mentioned on this thread be able to reverse half of the keyboard? If you take D4 and set it as the "middle" of the keyboard, the black and white key patterns will be mirror images on both sides. I've been trying to figure out a way to change the notes below D4 (the left hand notes) to mirror the notes above, and vice versa. This would make it possible to use some specific practice techniques, such as hands together practice, by using the same fingers (and thus the same fingerings) in both hands.

Re: Reverse (left-handed) keyboard?

Hey, that's a neat idea!  Yes, the .kbm mapping files should be able to do that.  I once had my keyboard set up as two half keyboards with the same range of pitches, so we could play two-piano works on a single keyboard (provided we only needed a 3 octave range each).  Or have the left and right hand play in unison if you like -- not two octaves apart, but literally in unison.  It was a couple of years ago, I can't remember the details of how I did it, but it's the same techniques described on this page.

Re: Reverse (left-handed) keyboard?

Do you mean that you want middle D to be either the lowest pitch, or the highest one?   Using Python or SuperCollider for that would be easy.  In Python, one would replace a couple of lines in invert_pitches() in the snippet above as follows (I haven't tested this, but think it should work):

def invert_pitches(port):
    for msg in port:
        if msg.channel == IN_CHANNEL and msg.type in ('note_on', 'note_off'):
            # only reverse pitches above middle D
            if  msg.note > 64:
                msg.note = 124 - msg.note
            msg.channel = OUT_CHANNEL
            yield msg

This would have the lower half of the keyboard ascend, and the upper half descend.

Perhaps this can be done with Scala files but I never got the reverse.kbm file to work with recent versions of Pianoteq so I'm not sure.

Re: Reverse (left-handed) keyboard?

My old Ensoniq keyboard had many different tunings including flipping highs to left and lows to the right ..fun!

Pianoteq 8, most pianos, Studiologic 73 Piano, Casio Px-560M, PX-S 3000, PX-S 1100, PX-S 7000, Mac i27 and MacBook Pro M3, SS Logic SSL 2