         newInst = 128 - newInst;
       if (newInst > 127) {
         DEBUG_PRINT_NUM("change bank: ", newInst);
-        server.midiDevice->setBank(MIDI_CHANNEL, 0x78); //DRUMS
+        server->midiDevice->setBank(MIDI_CHANNEL, 0x78); //DRUMS
         
         //previous was melodic, load drum preset
-        server.loadNotes( NOTE_PRESETS_DRUMS[0] );
+        server->loadNotes( NOTE_PRESETS_DRUMS[0] );
       }
       else {     
         DEBUG_PRINT_NUM("change bank: ", newInst); 
         
-        server.midiDevice->setBank(MIDI_CHANNEL, 0x79, newInst); //MELODIC
+        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] );
+          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] );
        
      }
    }

          int val = analogRead(analogPin);
          
#if !ENABLE_TEST
          server->readPin(analogPin, val);
#endif          
 
    }
