I understand. I mainly did it to have a little fun and many times when I go to buy a used guitar off a person, we will meet somewhere in a public place(parking lot, etc) and this would allow me to test the guitar to make sure the electronics are functioning.Note that a standard 9V transistor battery will likely not last long (perhaps a few hours for an alkaline type) in powering your amp.
