tape speed changes pitch

Changing the playback speed of a loop also changes its pitch. This is one of the main reasons I like tape-style looping, but it can be difficult to drag a control and land exactly on a useful interval. I added Rate Scale so each step can follow chromatic semitones, a major scale, a minor scale, or a short collection of open intervals.

The speed is still continuous near zero, so tape stops and very slow movement work as before. Away from zero, the scale gives me repeatable octaves, fifths, and scale tones without requiring me to read a tiny decimal rate while I am playing.

finding the next note from an arbitrary speed

A loop may already be at a strange rate when I press the next step, so the code first converts the absolute rate to semitones, finds the nearest valid scale degree across several octaves, and then moves in the direction of the gesture. A negative rate keeps its negative sign, which makes the same scale work while the tape runs backwards.

I made the scale global because I normally want all four loops to agree about the available notes. The choice is saved with the plugin and the session, so a project does not quietly return to chromatic steps later.