Skip to content

Instantly share code, notes, and snippets.

@empathicqubit
Last active November 22, 2021 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save empathicqubit/89c606cddab863f16f446de49e106ab8 to your computer and use it in GitHub Desktop.
Save empathicqubit/89c606cddab863f16f446de49e106ab8 to your computer and use it in GitHub Desktop.
GlovePIE script for typing using piano.
// GlovePIE script for typing using piano.
// A1 = enable/disable
// Left pinky at G4 = A
// Right pinky at A6 = ;
// HOME ROW (White keys):
// Left hand: <SHIFT> ASDF G <BOTTOM ROW SHIFT> <SPACE> <NUMBER ROW SHIFT>
// Right hand: <NUMBER ROW SHIFT> <SPACE> <BOTTOM ROW SHIFT> H JKL; <BACKSPACE> <ENTER>
// Black keys are top row:
// Left hand: G4b (Q), G4# (W), A4# (E), C5# (R), D5# (T)
// Right hand: C6# (Y), D6# (U), F6# (I), G6# (O), A6# (P)
Toggle(Var.Enabled) = Midi.a1
if(Var.Enabled) {
Key.Space = ( Midi.f5 or Midi.b5 )
Var.BottomRow = ( Midi.e5 or Midi.c6 )
Var.NumberRow = (not Var.BottomRow) and ( Midi.g5 or Midi.a5 )
Var.AltTopRow = false
Var.HomeRow = not (Var.AltTopRow or Var.BottomRow or Var.NumberRow)
// Left hand upper
Key.Q = Midi.fsharp4
Key.W = Midi.gsharp4
Key.E = Midi.asharp4
Key.R = Midi.csharp5
Key.T = Midi.dsharp5
// Left hand upper, alternate
if(Var.AltTopRow) {
Key.Q = Midi.g4
Key.W = Midi.a4
Key.E = Midi.b4
Key.R = Midi.c5
Key.T = Midi.d5
}
// Left hand numeric
if(Var.NumberRow) {
Key.One = Midi.g4
Key.Two = Midi.a4
Key.Three = Midi.b4
Key.Four = Midi.c5
Key.Five = Midi.d5
}
// Left hand lower
if(Var.BottomRow) {
Key.Z = Midi.g4
Key.X = Midi.a4
Key.C = Midi.b4
Key.V = Midi.c5
Key.B = Midi.d5
}
// Home rows
Key.Escape = Midi.dsharp4
Key.Ctrl = Midi.e4
Key.Shift = Midi.f4
if(Var.HomeRow) {
Key.A = Midi.g4
Key.S = Midi.a4
Key.D = Midi.b4
Key.F = Midi.c5
Key.G = Midi.d5
Key.H = Midi.d6
Key.J = Midi.e6
Key.K = Midi.f6
Key.L = Midi.g6
Key.Semicolon = Midi.a6
Key.Apostrophe = Midi.b6
}
Key.BackSpace = Midi.c7
Key.Enter = Midi.d7
// End home rows
// Right hand lower
if(Var.BottomRow) {
Key.N = Midi.d6
Key.M = Midi.e6
Key.Comma = Midi.f6
Key.Dot = Midi.g6
Key.Slash = Midi.a6
}
// Right hand upper, alternate
if(Var.AltTopRow) {
Key.Y = Midi.d6
Key.U = Midi.e6
Key.I = Midi.f6
Key.O = Midi.g6
Key.P = Midi.a6
Key.LeftBracket = Midi.b6
}
// Right hand numeric
if(Var.NumberRow) {
Key.Six = Midi.d6
Key.Seven = Midi.e6
Key.Eight = Midi.f6
Key.Nine = Midi.g6
Key.Zero = Midi.a6
Key.Minus = Midi.b6
}
// Right hand upper
Key.Y = Midi.csharp6
Key.U = Midi.dsharp6
Key.I = Midi.fsharp6
Key.O = Midi.gsharp6
Key.P = Midi.asharp6
Key.LeftBracket = Midi.csharp7
Key.RightBracket = Midi.dsharp7
// Arrow keys
Key.Up = Midi.f7
Key.Down = Midi.g7
Key.Left = Midi.a7
Key.Right = Midi.b7
Key.PageUp = Midi.fsharp7
Key.PageDown = Midi.gsharp7
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment