 #define maxPulse     2300
 #define durationGlissMult 0.935
 #define durationGlissDiff 160
+
+// pitch correction
+#define durationTurnMul 0.945
+#define durationTurnAdd 2.4
+#define glissAdd       -0.5
 
 /*************************
  * communication commands


void gliss(int halfturns, float startpitch, float endpitch, bool dir) {
    int glisssteps = (halfTurnSteps * halfturns) - (accelSteps * 2);
    int startpulse = pitchToPulse(startpitch);
    int endpulse = pitchToPulse(endpitch);
    digitalWrite(dirPin, dir);
    delayMicroseconds(pulseWidth);
    for (int i=0; i<accelSteps; i++) {


long _durationgliss(int duration, float startpitch, float endpitch, bool dir,
        bool recentre, bool accel, bool decel, int sustainstart, int sustainend) {
    int startpulse = pitchToPulse(startpitch + glissAdd);
    int endpulse = pitchToPulse(endpitch + glissAdd);
    // not sure why the end sustain needs to be lower
    int endsustainpulse = pitchToPulse(endpitch + glissAdd - 1);
    int accelsteps = accelSteps * accel;
    int decelsteps = accelSteps * decel;
    unsigned long glissTime = ((duration - sustainstart) * 1000L) -
