Web
Analytics
Log In  

0

How do you make music play, and wait until done?

music wait
P#46586 2017-11-22 13:45 ( Edited 2017-11-22 15:56)

::

Oh wow, in the process of copying/pasting from the manual, I noticed there were some more stat() numbers added recently apparently (to my knowledge)! 24, 25, and 26 were not there before :D

Anyway, I was going to say it's kind of tricky and there's not a super easy way, but it looks like it just got slightly easier at least! You have to use stat(24) to read the index of the currently playing pattern, and then keep track of that and/or the current note number to know when the pattern has finished playing. (It used to be that you had to reverse-engineer the pattern index by looking at the combination of sfx indexes being played on all the channels)

Relevant portion of manual:

stat x

    16..19  Index of currently playing SFX on channels 0..3
    20..23  Note number (0..31) on channel 0..3
    24      Currently playing pattern index
    25      Total patterns played
    26      Ticks played on current pattern
P#46592 2017-11-22 15:56 ( Edited 2017-11-22 15:58)

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-07-20 16:44 | 0.201s | 1572k | Q:11