Everything to the right of a $ is calculated first. so sound "gordon:1" # up "0 6 2 5" will be calculated before the rest. So you are applying the up to the sound before it gets chopped.
You can use parenthesis with () to make sure the chopping happens first:
yes, the struct can be avoided, however I've already tried the parenthesis and apply up, but I can't hear any difference in sound.
Differently, with speed, it changes pitch, but duration too, and it doesn't work well.
Would be great to stretch, chop and transpose the bits like I do with Ableton, but in a quicker way.
Coincidentally I was exploring similar stuff this morning - the part you're doing specifically is covered at the very start - I used chop, which makes me wonder if the function of slice to specifically pitch accurately (as opposed to splice) might be causing some of your issues?
Thank you @cleary . I found the issue. It's not related to slice, but to loopAt.
In fact, I don't need to stretch the sample to fit in the given tempo, since I'm rearraning the bits, I just need to know the correct position of bit in the sample, so I can use up regularly and avoid the speed math.
I found useful creating drum kits in a single merged sample instead of multiple hits, and this way I have the possibility to pitch them up, down as I want. Great!