 #define UP 2
 
 int bumpy_input = 0;
+int constrain_input = 0;
 
 int rollpitch = 0;
 
 #include <Oscil.h> // oscillator template
 #include <tables/sin2048_int8.h> // sine table for oscillator
 #include <tables/triangle2048_int8.h> // triangle table for oscillator
-#include <tables/saw2048_int8.h> // saw table for oscillator
-#include <RollingAverage.h>
+#include <tables/triangle_analogue512_int8.h> // saw table for oscillator
 
 // use: Oscil <table_size, update_rate> oscilName (wavetable), look in .h file of table #included above
 Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin(SIN2048_DATA);
 Oscil <TRIANGLE2048_NUM_CELLS, AUDIO_RATE> aTri(TRIANGLE2048_DATA);
-Oscil <SAW2048_NUM_CELLS, AUDIO_RATE> aSaw(SAW2048_DATA);
+Oscil <TRIANGLE_ANALOGUE512_NUM_CELLS, AUDIO_RATE> aSaw(TRIANGLE_ANALOGUE512_DATA);
 
+// Average the input signals
+#include <RollingAverage.h>
 // use: RollingAverage <number_type, how_many_to_average> myThing
 // how_many_to_average has to be power of 2
-RollingAverage <float, 8> rollLAverage;
-RollingAverage <float, 8> rollRAverage;
-RollingAverage <float, 8> pitchAverage;
+RollingAverage <float, 16> rollLAverage;
+RollingAverage <float, 16> rollRAverage;
+RollingAverage <float, 16> pitchAverage;
 RollingAverage <float, 4> xAverage;
 RollingAverage <float, 4> yAverage;
 int rollLeft;

  startMozzi(CONTROL_RATE); // set a control rate of 64 (powers of 2 please)
  
  // set the frequency
  aSin.setFreq(440);
  aTri.setFreq(440);
  aSaw.setFreq(440);
}

void updateControl(){

int xStick;
int yStick;

unsigned char volumeLeft;
unsigned char volumeRight;
unsigned char volumePitch;

int play = 0;

void setup(){
  uint8_t error;
  
  error = Nunchuck.begin ();
  
  //Serial.begin(19200);
  
  /*if ( error )
  {
