Commits

Jacob Smullyan  committed 86970b3

cleanup

  • Participants
  • Parent commits 29a0aa7

Comments (0)

Files changed (2)

File src/SConstruct

 Program("lefty.c", LIBS=['jack'])
-#LIBPATH = "/usr/lib/i386-linux-gnu"
+
 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);
 }
 
 /*