Jump to content
Sign in to follow this  
Rybags

RMT - knowing where in a song we are

Recommended Posts

Just adding some RMT music to my game.

 

For stuff like lost life, level end, it will play some short pieces. Is there a way of working out when the end of a track or song is reached? Or the progress of a piece being played, ie some RAM variable/s that correspond to progress through the song like you'd see if playing it back in the Win version.

 

Note during the course of gameplay itself, RMT isn't being used - it's likely I'll only use it in a single-stream fashion during menu or specific parts of the game where no other sounds are occurring.

Share this post


Link to post
Share on other sites

Yes, there are ways...

 

F.e. I did it in the instrumentarium tune long ago. I did an insert-/bypass-hack in the playing routine, checking whether songline 23 (or so) was reached, to turn on the 2-tone-filter. Then turn it off again at line 25.

 

I don't quite remember how I did it exactly, but the insert routine was checking a zero-page reg.

 

The method I used, it's still tricky however, because the values to be checked actually depend on the location of the song itself. At least, that's how I remember it.

 

(maybe I'd need to recheck this all)

Share this post


Link to post
Share on other sites

OK, I did a quick check.

 

Zeropage reg $D1 keeps the value of song progress, however, it's only the songline#.

 

Not sure how to find the exact position, within the songline.

Share this post


Link to post
Share on other sites

That should be sufficient... I think. Thanks.

 

If not, I'll just have to resort to using a timer which in itself isn't too much work but easy/quick beats fiddling about.

Share this post


Link to post
Share on other sites

Of course, if you're only doing some intermezzos and jingles, then you can programm the length of your songlines. When the songline passes, then the value in $D1 increases.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...