Ejemplo n.º 1
0
void initialization(void) { 
   checkOptions(options);

   triggerTimer.setPeriod(75);

   performance.read(options.getArg(1));
   performance.setPort(outport);
   performance.setMaxAmp(maxamp);
   performance.open();
   performance.setTempoMethod(tempoMethod);

}
Ejemplo n.º 2
0
int main(int argc, char** argv) {
   Options options(argc, argv);
   checkOptions(options);

   keyboardTimer.setPeriod(10);
   int command = 0;

   MidiInput midiin;
   midiin.setPort(inport);
   midiin.open();
   MidiEvent midimessage;

   performance.read(options.getArg(1).data());
   performance.setPort(outport);
   performance.setMaxAmp(maxamp);
   performance.open();
   performance.setTempoMethod(tempoMethod);
   performance.play();
   while (command != 'Q') {
      while (midiin.getCount() > 0) {
         midiin.extract(midimessage);
         processMidiCommand(midimessage);
      }
      performance.xcheck();
      eventIdler.sleep();

      if (keyboardTimer.expired()) {
         keyboardTimer.reset();
         command = checkKeyboard();
         if (command == 'Q') {
            break;
         } else {
            keyboardCommand(command);
         }
      }

   }

   return 0;
}