monome / teletype

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

Adjust mod_PROB_func to conform to the docs #273

Closed martica closed 3 years ago

martica commented 3 years ago

What does this PR do?

The docs for PROB say "potentially execute command with probability x (0-100)" The current behaviour is that x maps to a probability of x/101. x = 100 executes with the probability of 99.01% This adjusts the behaviour so that x maps to a probability of x%.

I added a test for PROB 100, but anything probability related is messy to test, so feel free to reject that part.

Provide links to any related discussion on lines.

I found a random youtube comment mentioning this, but I did find a mention on lines: https://llllllll.co/t/teletype-workflow-basics-and-questions/12392/640

How should this be manually tested?

1

X 0 L 1 10000: $ 2

2

PROB 100: X + X 1

After running script 1, X should be 10,000. It is ~9900 each time.

Any background context you want to provide?

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

Unless I missed it, there wasn't an existing open (or closed) issue. Shall I file one for tracking?

I have,

scanner-darkly commented 3 years ago

nice work!

a773music commented 3 years ago

Nice, thanks!