Midi Integrator‎ > ‎

Mapping a PC keyboard to play Bass

Suppose one wants to be able to play bass accompaniment on a PC keyboard for a piece.

For many, if not most rock songs, you really need only play three notes in the bass, technically these are the key’s root, dominant and subdominant, (e.g. in the key of C the C, G and F, respectively). See three chord trick. Just to make life (or the music anyway) a little more complicated, suppose, as often happens, the piecehas a couple of semi-tone key modulations in it.

And at the end, for a bet of flourish, you'd like to add some punch, Perhaps by dropping an octave and doubling the root note and adding the fifth.

First, select a mapping

I've chosen the jammer layout for this example because it puts these three notes together, so you can find them dead seriously easy - a huge advantage when you are busy with other things.

So in the diagram, see that the "h" key => C-the note, and above the H key are the Y and U Keys mapped to notes F2 and G2. Below the H is B and N, mapped to F and G as well, but an octave down, to F1 & G1. This gives a fair bit of flexibility with little added complexity.


Now see the arrow keys? How about if we make them into commands to shift the key of the instruments you are playing up/down a semi-tone. This command must affect all of your keyboards at once, as it would sound pretty bad to have one keyboard shift to C# while the other stays in C.

Let’s make the arrow-up key be the Key-Change "+1"  command, and the Arrow-down map to Key-Change -1.

Second, Learn the key's magic number

Now how to we do this mapping? it's not too hard: First if you fire up my Keyboard Integrator, and double-click on the PC-keyboard object, it will expand and will show you what the magic number is for each keyboard key, the "Last KeyBoard Key Hit". All you have to do is press the keys, and write down the number. Thus Y,U,H, B & N are 121, 117 ,104, 98, & 110 and Arrow-up/Arrow-down are -30 * -31 respectively. 

Third, create a table

 For which midi note number is what musical note, see here.

The mapping table is:

 104,  L N 48 H/C3

==> maps "y" key to the Left instrument, as a note, to midi note 48 (C3), and

30, O C KEY UP1 

==> maps "up arrow" key to the Overall sound, KEY(shift) change, shift +1 semitones

Just one more thing is needed" an octave shift up/down command set. Why don't we use the arrow-left/right keys? This kind of command is directed to just the keyboard being played, the Left keyboard, and the command is an OCT(ave). the new table entry is therefore:

Fourth, Refine your table

 29,  L C OCT DN1    leftarr=octaveDown
 L C SUS 0      spacebar=>Sustain

==> maps "left arrow" key to the Left instrument, OCT(ave) change, shift -1 units)

==> maps "Space bar" to the Left instrument, Sustain command, units n/a )

(to be added: link to video demo: with demo notes, demo key-change, demo octave change. (with background))

Fifth, Load the table

Load the new table by double-clicking on the read button, then clicking on the new table.

Adding a channel change command

The intent is to have this work to make hitting the f1 and f2 keys into instructions to change to different instruments in this case we do it by changing the output channel. You already have this option in KeyInt by clicking on the channel change bar.

-17, L C CHA UP1

Note: -17 = key "F1", we map this to the Left instrument, CHA(nnel) change, shift +1 units)


* later on your friend Steve wants the same thing, but doesn't understand your weird jammer layout. So give him a different table with a standard layout, and the same control keys set. You smile as he fumbles around, makes mistakes and can't play without looking at the keyboard.