According to music theory, every musical composition must contain harmony, rythm and melody. Yet, i've seen that many guitarists break that law in many ways. For example, some may choose to write a melody where some or most of the notes are out of key. Others might choose to mix various modes (from the same key) in the same solo, such as Joe Satriani. The one that confuses the most is when a musical composition completely shuts down all harmony and proceeds to solo. My question is: When this sort of phenomena happens, does a guitarist need to play adhering to the harmony that was played prior to the solo or is it theoretically correct to run around the guitar regardless of key or mode (as long as it sounds pleasing to the human ear)?