Changeset 6699

Show
Ignore:
Timestamp:
06/29/09 20:07:48 (9 months ago)
Author:
smimram
Message:

More notes on the keyboard.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/liquidsoap/src/synth/keyboard_sdl.ml

    r6696 r6699  
    2121 *****************************************************************************) 
    2222 
    23 let knotes = [|'a'; '\233'; 'z'; '"'; 'e'; 'r'; '('; 't'; '-'; 'y'; '\232'; 'u'; 'i'; '\231'; 'o'; '\224'; 'p'|] 
     23let knotes2 = [|'&'; 'a'; '\233'; 'z'; '"'; 'e'; 'r'; '('; 't'; '-'; 'y'; '\232'; 'u'; 'i'; '\231'; 'o'; '\224'; 'p'|] 
     24let knotes1 = [|'q'; 'w'; 's'; 'x'; 'd'; 'c'; 'v'; 'g'; 'b'; 'h'; 'n'; 'j'; ','; ';'; 'l'; ':'; 'm'; '!'|] 
    2425 
    2526let array_index a x = 
    2627  let ans = ref None in 
    27     for i = 0 to Array.length knotes - 1 do 
    28       if knotes.(i) = x then ans := Some i 
     28    for i = 0 to Array.length a - 1 do 
     29      if a.(i) = x then ans := Some i 
    2930    done; 
    3031    match !ans with 
     
    3334 
    3435let note_of_char c = 
    35   array_index knotes c + 72 
     36  try 
     37    array_index knotes2 c + 71 
     38  with 
     39    | Not_found -> 
     40        array_index knotes1 c + 59 
    3641 
    3742class keyboard velocity =