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! :)

P#76244 2022-12-19 23:41 ( Edited 2022-12-19 23:43)

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.

P#122758 2022-12-20 18:04

@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

P#122759 2022-12-20 19:34

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.

P#122768 2022-12-20 21:11 ( Edited 2022-12-20 21:12)

@dw817 Thanks! :)

P#122774 2022-12-20 23:03
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.

P#123417 2023-01-01 07:15
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.

P#124876 2023-01-26 08:33

@zep Perfect! Thx, Zep! 😃

P#124891 2023-01-26 16:45

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 08:56:29 | 0.104s | Q:30