Page 1 of 1

Synchronizing events on a music / XGM question

Posted: Wed Jan 06, 2016 10:36 pm
by astrofra
Hi!

working on a demoscene project with the amazing SGDK, I would like to know if there's a way to synchronize my visual events with the music.
I'm currently using the XGM Driver, and I was looking for a function that would either give me the current clock/position of the VGM file being replayed, or even better, a way to access the current instruction executed by the player.

I'm aware that XGM driver is 100% Z80-driven, so it might not be straigtforward to fetch data and have them available in my C code, however I'm all hears if anyone have any idea, suggestion, technique, code snippet or pointers on that topic :D

I was thinking of a specific FX or Instrument that I could catch or detect but considering the structure of a VGM file, this might not even be possible, right ?

Thanks in advance.

Re: Synchronizing events on a music / XGM question

Posted: Thu Jan 07, 2016 1:30 am
by KanedaFr
if you find a trick, it won't be long until a Guitar Hero MD appears ;)

Re: Synchronizing events on a music / XGM question

Posted: Thu Jan 07, 2016 7:31 am
by astrofra
With a clock, be it in ms, ticks or wathever unit is available, it could be quite easy to get precomputed levels from such a table :
https://code.google.com/p/within-the-me ... _beeps.nut
and then, in the code, decide what event to trigger or not.

Re: Synchronizing events on a music / XGM question

Posted: Fri Jan 08, 2016 5:32 pm
by Nainain