   pinMode(ledPin, OUTPUT);
   pinMode(outPin, OUTPUT);
 
-  wave.init(20);
-  wave.compute();
+  wave1.init(40);
+  wave2.init(40);
+
+  wave1.setSkew(8.0);
+  wave2.setSkew(2.0);
+  
+  wave1.compute();
+  wave2.compute();
+
+  // start with wave1
+  pwave = &wave1;
   
   Serial.begin(115200);
   Serial.println("serial on");

// play value on analog out pin
void play_level(void) { 

  // toggle wave skew value
  if (step >= INT_FREQ * 2) {
    if (wave.getSkew() == 2.0) {
      wave.setSkew(8.0);
      wave.compute();
      debug = 8.0;
    } else {
      wave.setSkew(2.0);
      wave.compute();
      debug = 2.0;
    }
    step = 0;
  }
  
  if (time >= wave.getPeriod()) {
    time = time - wave.getPeriod();
  }

  double val = wave.approx(time) * 2000 + 2000; // help with dc offset
  analogWrite(outPin, val);

  debug = val;
  
  time = time + interrupt_callback_time;
  step++;

double interrupt_callback_time = (double) (1.0 / INT_FREQ);

// use volatile for shared variables
volatile unsigned int step = 0;
volatile double time = 0;
volatile double debug;

IntervalTimer myTimer; // init Teensy timer
asymmetry::ATrianglewave wave1;
asymmetry::ATrianglewave wave2;
asymmetry::ATrianglewave *pwave;

void setup() {
  analogWriteResolution(12); // 12bit = 4096 levels (max is 13 bit)
