moved bulk of table logic to WaveTable.h/cpp