monome / teletype

monome eurorack module
GNU General Public License v2.0
204 stars 84 forks source link

Fix off-by-one error in P.ROT #294

Closed beels closed 2 years ago

beels commented 2 years ago

What does this PR do?

Fixes an error where P.ROT n does nothing when n == P.END - P.START.

I.e., if we have four values in a pattern:

0: 1
1: 2
2: 3
3: 4

and P.START is 0 and P.END is 3, P.ROT 3 should result in:

0: 2
1: 3
2: 4
3: 1

Instead, it is a no-op.

Provide links to any related discussion on lines.

https://llllllll.co/t/teletype-workflow-basics-and-questions/12392/1821

How should this be manually tested?

Create the pattern shown above and run P.ROT 3.

Any background context you want to provide?

If the related Github issues aren't referenced in your commits, please link to them here.

I have,