     return pulse;
 }
 
-long _durationgliss(int duration, float startpitch, float endpitch,
+long _durationgliss(unsigned long duration, float startpitch, float endpitch,
         int sustainstart, int sustainend, bool dir, bool recentre) {
     int startsustainpulse = pitchToPulse(startpitch + glissAdd - 1);
     int startpulse = pitchToPulse(startpitch + glissAdd);

            for (byte d=0; d<rDurlength; d++) {
                newSustainDuration[d] = serialIncoming[++i];
            }
            sustainDuration = atoi(newSustainDuration);
        } else if (data < 21) {
        } else if (data < 40) {
            halfTurns = data - 20;

            for (byte d=0; d<rDurlength; d++) {
                newDuration[d] = serialIncoming[++i];
            }
            midDuration = Duration; // midDuration is previous Duration
            Duration = atol(newDuration);
        } else if (data == rReset) {
            defaults();
        } else if (data == rDoubleGliss) {
