[chuck-users] Scale & diatonic

Hans Aberg haberg at math.su.se
Fri Dec 11 11:53:29 EST 2009

On 11 Dec 2009, at 17:34, David Rush wrote:

>> The files are available here:
>>  http://www.math.su.se/~haberg/tuning_systems/
> It's not clear to me what keyboard you use to play these tunings - or
> rather, how a laptop/computer keyboard maps through your key bindings.
> I ask because I have been playing with some f these kinds of things
> myself, most especially ET22 (due to its connection with ancient Hindu
> modalities). Am I missing something obvious?

I use an Apple Keyboard A1242, as displayed here:

The lines
   0 => int deviceNum;
   // Open keyboard.
   if(!kb.openKeyboard(deviceNum))  me.exit();
opens the keyboard numbered 0 as USB HID (Human Interface Device). The  
OS numbers attached keyboards typically at 0 and up consecutively  
(unless some have been removed or something). Only one keyboard has  
number 0.

It sends the number of the keys and up/down events, which is device  
dependent, but later keyboards may adhere to some standard. I  
translate these into x-y positions using the arrays
   int x[256];
   int y[256];

So if you do not get the same layout, you must change these. this can  
be done enabling the debugging code
     // Print key number and down/up event.
       <<< " key", key, "down (", x1, ",", y1, ")" >>>;
       <<< " key", key, "up (", x1, ",", y1, ")" >>>;
which will printout the integers. Alter it, you need to see the key  
numbers as well.

E22 is in the diatonic.ck file.


More information about the chuck-users mailing list