Alternate X and Y frequency in wave.py