try using it within clds and see if its better...
try reducing the gain on the signal before input, see if that stops it clipping.. (you can then gain it after the shifting)
also see if the parameters make any difference to the distortion levels.
it could be that within clds by the time the signal hits it , it has been reduced... so isn't clipping.
sorry, I dont have time to do debugging on it now, I'll take a look at it for the next release, when Im updating the code anyway.
ps. id ultimate like to compare it to my Organelle port... then I can see if it might be a axo limitation... Ive found a couple of things where they are fine on Organelle but problematic on Axo... I think (but a bit speculative at the mo), its a cpu issue.
EDIT: ok, I had a quick play with it...
I think the 'major issue' is caused by what the parameters mean, and their ranges... in particular ratio.
seems to me, its not so much distortion, as creating inharmonic overtones, as if you play with it, you'll find some 'sweet spots' that are just beating frequencies... and these dont sound distorted.
similarly looking on the scope they dont really look distorted, more 'noisy'
also cld seems to work ok, with exactly the same code, again reinforcing its probably how the ratio/size are setup.
in clds these are calculated from the supplied pitch ... I suspect what I'll do in the future is change it such that I dont give the user the raw ratio/size, but rather calculate them from more familiar things like pitch.
(this is more in line with the new approach I'm taking anyway)
also bare in mind, although its called pitch shifter, there is nothing to say its not some kind of 'pitch shifting like effect for clouds'... i.e. not clean pitch shifter, it might deliberately have 'character'
also... its currently using 16bit delay lines, so for sure there is going to be some quality reduction and Im not sure of the magnitude of this. in the future, I could create a variant with higher quality delays lines.