northern-information / arcologies

an interactive environment for designing 2d sound arcologies with norns and grid
https://tyleretters.github.io/arcologies-docs
GNU General Public License v3.0
47 stars 7 forks source link

fix for Euclidean Rhythms #6

Closed ghost closed 3 years ago

ghost commented 3 years ago

Fixed euclidean rhythms.

There was an issue in Cell:is_spawning() where fn.cycle() was returning zero, in turn causing an out-of-bounds issue of the self.er table. This finally caused a return value of nil, causing no Signal to be spawned when it should have. The code was changed to not use fn.cycle() at all. The major change is that I'm adding the offset instead of substracting it but I believe that doesn't really matter. The perceived offset is still correct and by adding I avoid a less-than-zero condition that wouldn't be caught by the modulo operation.

The effective behaviour of Euclidean Rhythms is now correct and more Signals are spawned than before, so the perceived behaviour for the user would have changed anyway.

tyleretters commented 3 years ago

Woah, absolutely brilliant find. Thank you.

Is @dst78 another account of yours?

ghost commented 3 years ago

@tyleretters erm yes dst78 is also me. Odd that my IDE used that account to commit one change. it shouldn't have. I'll have a look into this.