Jump to content

Photo

RMT song-nr and intrack positon where?


7 replies to this topic

#1 Heaven/TQA ONLINE  

Heaven/TQA

    Quadrunner

  • 8,799 posts
  • Location:Baden-Württemberg, Germany

Posted Tue Dec 27, 2011 2:46 PM

I am just finalising my contribution to the NYD12 and want to sync the music to the video. when I am going through the RMT player source code where can I track down the song position and the intrack position? went through but can not find a simple variable. p_song is a pointer... could work as workaround but is there any other?

#2 NRV OFFLINE  

NRV

    Moonsweeper

  • 294 posts

Posted Tue Dec 27, 2011 4:48 PM

This post could help you:

http://www.atariage....ost__p__2147312

#3 Creature XL OFFLINE  

Creature XL

    Dragonstomper

  • 751 posts
  • Location:Hannover.De

Posted Mon Jan 2, 2012 9:40 AM

This post could help you:

http://www.atariage....ost__p__2147312


I do not want to respond to the old thread linked here, however, what analmux has forgotten to mention is, that you can specify the Zeropage locations RMT-player should use. So the mentioned "$d1" is relative to the ZP-Start he supplied while assembling.

#4 NRV OFFLINE  

NRV

    Moonsweeper

  • 294 posts

Posted Mon Jan 2, 2012 12:33 PM


This post could help you:

http://www.atariage....ost__p__2147312


I do not want to respond to the old thread linked here, however, what analmux has forgotten to mention is, that you can specify the Zeropage locations RMT-player should use. So the mentioned "$d1" is relative to the ZP-Start he supplied while assembling.


Very true, but the page zero vars are:

p_instrstable org *+2
p_trackslbstable org *+2
p_trackshbstable org *+2
p_song org *+2
ns org *+2
nr org *+2
nt org *+2
reg1 org *+1
reg2 org *+1
reg3 org *+1
tmp org *+1

and most of them are pointers, so it shouldn't be that difficult to log them and see.
Also, I suppose that there is a default address for those vars.. that could help (for future reference, because probably Heaven doesn't need the info anymore :)).

#5 Heaven/TQA ONLINE  

Heaven/TQA

    Quadrunner

  • Topic Starter
  • 8,799 posts
  • Location:Baden-Württemberg, Germany

Posted Tue Jan 3, 2012 7:03 AM

yup. Intro 2012 is synced... ;) Pointers are not good when you shuffle around the RMT file in memory... ;) so I did the easy way what Rybags suggested... (and you can see that in the source code) I use a simple 16 bit counter to track the VBLs and to sync it to the music... might not be as accurate as it could be but worked in the given development time frame... ;)

btw. the actual RMT replay ASM source code...does it support NTSC? I can remember the discussion about it some time ago... but due to Raster's passing away I am not sure if it was a suggestion or if it was implemented in the end.

#6 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,489 posts
  • Location:Australia

Posted Tue Jan 3, 2012 7:17 AM

I'm not sure if any native support was included.
There's generally 2 methods of having the same playback rate (remembering you can author a song using either timing)

- Keep a counter and don't call the play routine every 6th VBlank on NTSC - so you still end up with 50 calls/second.
- Have a combination of VBlank and a "roving" DLI that changes location to match match up with the timing required.

Of course it's not always desirable to burn lots of time in a DLI. In such cases you could just maintain shadows of the 9 AUD registers instead of allowing the RMT to store them to Pokey. Then just call RMT in VBlank and have the stores done later.

#7 GroovyBee OFFLINE  

GroovyBee

    7800 Developer

  • 7,739 posts
  • Busy bee!
  • Location:North, England

Posted Sat Mar 17, 2012 12:06 PM

Is there an easy way to detect when an RMT SFX has finished playing?

#8 Rybags OFFLINE  

Rybags

    Quadrunner

  • 12,489 posts
  • Location:Australia

Posted Sat Mar 17, 2012 6:12 PM

Not sure. One way might be to monitor the AUDCx shadow for the voice in use and see when it hits 00, of course that won't work if the sfx envelope uses that value.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users