Messing with createPeriodicWave messily