Could it be that beatsin8 has been changed since the last update?

Could it be that beatsin8 has been changed since the last update? I have a 14 x 13 matrix. In an animation with a 1 line border around, I display a ‘blocky’ sinewave. It used to be
leds(beatsin8(3, 1, MATRIX_WIDTH - 1), beatsin8(30, 1, MATRIX_HEIGHT - 1)) = CHSV(96, 255, 128);
to stay within the border but now I have to use
leds(beatsin8(3, 1, MATRIX_WIDTH - 2), beatsin8(30, 1, MATRIX_HEIGHT - 2)) = CHSV(96, 255, 128);
instead to avoid crossing the right and top border. Is this a known issue?
Thanks!

To answer my own question (sorry):
Indeed it seems the behavior has changed:
I tried
beatsin8(30, 0, 5);
on version 3.1.0 of FastLED and the value goes from 0 up to and including 4 and back, while on 3.1.6 it goes from 0 up to and including 5 and back.
Is this by design? In other words: is it going to stay like this or will a next update revert to not including the upper limit? I ask because I have quite a few animations to change and don’t want to do it again when the next update comes :wink:
Thanks in advance.

Great observation. I’d noticed that the current version went up to the ‘5’ in your case, but I didn’t realize the older versions didn’t.

Thanks! I’ll check my demos more thoroughly.

Sure, if you use beatsin8 to vary e.g. brightness between 128 and 255 you won’t notice it but when you vary the column between 0 and MATRIX-WIDTH you do. :slight_smile:

The strange thing is: the only reference I could find to beatsin8 is in lib8tion.h but nothing related in that file has changed between versions. The change must come from somewhere else, but where?

Any news on this from the developers? Thanks a lot!