1. Jacob Smullyan
  2. lefty

Commits

Jacob Smullyan  committed 86970b3

cleanup

  • Participants
  • Parent commits 29a0aa7
  • Branches default

Comments (0)

Files changed (2)

File src/SConstruct

View file
 Program("lefty.c", LIBS=['jack'])
-#LIBPATH = "/usr/lib/i386-linux-gnu"
+

File src/lefty.c

View file
 jack_port_t *input_port;
 jack_port_t *output_port;
 
+/*
+ * This value keeps the keyboard symmetrical around middle D.
+ */
+#define MAX_NOTE 124
+
 static unsigned char reverse_note(unsigned char original) {
-  return (unsigned char) (124 - original);
+  if (original > MAX_NOTE) {
+    return 0;
+  }
+  return (unsigned char) (MAX_NOTE - original);
 }
 
 /*