Changeset 6699
- Timestamp:
- 06/29/09 20:07:48 (9 months ago)
- Files:
-
- 1 modified
-
trunk/liquidsoap/src/synth/keyboard_sdl.ml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/liquidsoap/src/synth/keyboard_sdl.ml
r6696 r6699 21 21 *****************************************************************************) 22 22 23 let knotes = [|'a'; '\233'; 'z'; '"'; 'e'; 'r'; '('; 't'; '-'; 'y'; '\232'; 'u'; 'i'; '\231'; 'o'; '\224'; 'p'|] 23 let knotes2 = [|'&'; 'a'; '\233'; 'z'; '"'; 'e'; 'r'; '('; 't'; '-'; 'y'; '\232'; 'u'; 'i'; '\231'; 'o'; '\224'; 'p'|] 24 let knotes1 = [|'q'; 'w'; 's'; 'x'; 'd'; 'c'; 'v'; 'g'; 'b'; 'h'; 'n'; 'j'; ','; ';'; 'l'; ':'; 'm'; '!'|] 24 25 25 26 let array_index a x = 26 27 let ans = ref None in 27 for i = 0 to Array.length knotes- 1 do28 if knotes.(i) = x then ans := Some i28 for i = 0 to Array.length a - 1 do 29 if a.(i) = x then ans := Some i 29 30 done; 30 31 match !ans with … … 33 34 34 35 let 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 36 41 37 42 class keyboard velocity =
