If there is a battery in the Ditto X2 and I plug it into a power supply, will the battery be bypassed and therefore not get drained?
As long as you have an adapter plugged into the power input of the Ditto X2, the sensor bypasses the battery power. As long as the power plug is connected to the Ditto X2, you can remove the plug from the outlet and the battery will not be drained. (The PolyTune does not work this way)
The other thing to keep in mind is even though this device can use batteries, it does require a lot of current. The current required is 100 mA so 2 good quality, fully charged 9 volt batteries, like a Duracell or Energizer should give you about 4-5 hours of current before the batteries start to deplete bellow what the unit requires. Depending on your usage this could change slightly. Leaving the batteries in the unit with the cables plugged in would probably kill the batteries within 8-10 hrs. If at all possible, you should consider just using the pedal with a power supply to have the most reliable operation.