Log In  


Cart #ruwezumuwu-0 | 2022-12-19 | Code ▽ | Embed ▽ | No License
3

Hi Zep! :) I think I found a bug in one of the more esoteric stat calls?

Bug:
According to the manual, stat(56) should return the number of ticks played in the current pattern. Currently (0.2.5e), it seems to poll the leftmost sfx in the pattern for the count. That makes sense bc the overall pattern length is determined by the leftmost sfx which is not a loop, but as the title says, stat(56) will reset back to 0 early if the leftmost sfx is a loop.

Expected behavior:
stat(56) should return the number of pattern ticks played regardless of looped sfx

Thanks for your time! :)

3


So one of a few things is happening here, @ridgekuhn.

Either Pico-8 is in error or the documentation for this ability is. From what I'm seeing and hearing, I suspect you are hoping it is Pico-8 that can be fixed of this.


@dw817 Yeah, I’m hoping it’s a bug but also pretty sure it’s a bug. Assuming the intent in the docs is correct, stat(56) doesn’t really serve a lot of utility if there’s a case where it’s not reporting the number of ticks played in the pattern overall. Otherwise, if it worked like I assume it should, one could always obtain the number of ticks played in a specific sfx by combining stat(56) w the speed/loop values of the sfx


This memory location is used to have animations dynamically animate to the beat of music, @ridgekuhn.

And if it is retrieving the wrong value it will not work properly - so I'll support this with a star. Hopefully @zep will look into it.


@dw817 Thanks! :)


1

I missed this earlier. I'm inclined to agree with the suggested behavior, but people more familiar with tracker-style music would be better suited to offering opinions.


2

Thanks @ridgekuhn -- this is fixed for 0.2.5f. It is indeed supposed to return total ticks played since the start of the pattern, regardless of looping channels.


@zep Perfect! Thx, Zep! 😃



[Please log in to post a comment]