Example #1
0
void keyboardchar(int key) { 
   switch (key) {
      case 'p':
         cout << "current list in eventBuffer: " << endl;
         eventBuffer.print();
         cout << endl;
         cout << "Event[0] status: " << eventBuffer[0].getStatus() << endl;
         break;
      default:
         sillyKeyboard(key);
   }
}
Example #2
0
void keyboardchar(int key) { 
   switch (key) {
      case 'p':                    // print eventbuffer info
         eventBuffer.print();
         cout << endl;
         break;
      case '[':                    // speed up echo rate
         decayrate *= 0.99;
         cout << "Decay rate = " << decayrate << endl;
         break;
      case ']':                    // slow down echo rate
         decayrate /= 0.99;
         cout << "Decay rate = " << decayrate << endl;
         break;
      default:
         sillyKeyboard(key);
   }
}
Example #3
0
void keyboardchar(int key) { 
   switch (key) {
      case 'p':
         cout << "current list in eventBuffer: " << endl;
         eventBuffer.print();
         cout << endl;
         cout << "Event[0] status: " << eventBuffer[0].getStatus() << endl;
         break;
      case '\\':
         direction *= -1;
         if (direction == 1) {
            cout << "Up" << endl;
         } else {
            cout << "Down" << endl;
         }
         break;
      case 'r':                       // random direction to current algorithms
         randomizeDirections(tparam);
         cout << "Random directions" << endl;
         break;
      case 'f':                       // normal direction of algorithms
         forwardDirections(tparam);
         cout << "Normal directions" << endl;
         break;
      case 'i':                       // invert direction of algorithms
         invertDirections(tparam);
         cout << "Inverted directions" << endl;
         break;
      case 'c':                       // reverse direction of algorithms
         reverseDirections(tparam);
         cout << "Changed directions" << endl;
         break;
      case 's':	                      // increase rhythmic sensitivity
         tolerance = limit(tolerance * 1.02, 0.01, 0.99);
         cout << "Sensitivity = " << tolerance << endl;
         break;
      case 'x':	                      // decrease rhythmic sensitivity
         tolerance = limit(tolerance / 1.02, 0.01, 0.99);
         cout << "Sensitivity = " << tolerance << endl;
         break;
      default:
         sillyKeyboard(key);
   }
}
Example #4
0
void keyboardchar(int key) { 
   switch (key) {
      default:
         sillyKeyboard(key);
   }
}