 
 
 void setupServer() {
-    server.init();
+    server = new SensorizerServer();
+    server->init();
 
     // load good drums preset to start
-    server.loadNotes( NOTE_PRESETS_DRUMS[0] );
+    server->loadNotes( NOTE_PRESETS_DRUMS[0] );
 
     // must wait a second for the MIDI device to boot up before it accepts our messages
     //delay(1000);
 
-    server.midiDevice->setBank(MIDI_CHANNEL, 0x78); //DRUMS
+    server->midiDevice->setBank(MIDI_CHANNEL, 0x78); //DRUMS
 }
 
 

        newInst = 128 - newInst;
      if (newInst > 127) {
        DEBUG_PRINT_NUM("change bank: ", newInst);
        server.midiDevice->setBank(MIDI_CHANNEL, 0x78); //DRUMS
        
        //previous was melodic, load drum preset
        server.loadNotes( NOTE_PRESETS_DRUMS[0] );
      }
      else {     
        DEBUG_PRINT_NUM("change bank: ", newInst); 
        
        server.midiDevice->setBank(MIDI_CHANNEL, 0x79, newInst); //MELODIC
        
        if (position > 127) {
           //we switched from drums, reload the note scales        
          server.loadNotes( NOTE_PRESETS_MELODIC[0] );
        }
      }
      

      positionKey = newPos;
      DEBUG_PRINT_NUM("encoder key: ", positionKey);
      
      if (server->midiDevice->getBank() == 0x78) { //DRUMS
        int newInst = abs(positionKey % NOTE_PRESETS_DRUMS_LENGTH);
        server->loadNotes( NOTE_PRESETS_DRUMS[newInst] );
      }
      else { //MELODIC
        int newInst = abs(positionKey % NOTE_PRESETS_MELODIC_LENGTH);
        server->loadNotes( NOTE_PRESETS_MELODIC[newInst] );
        
      }
    }
