Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
It doesn't read instruments or support tempo other than 150, but it's capable of playing back the FTM and you can check each frame if new notes were played.
For instance, if running the video at 30hz, I do this each frame:
ftm.tick(2);
FamiText::Cell square1 = ftm.read_tick(0);
FamiText::Cell square2 = ftm.read_tick(1);
FamiText::Cell triangle = ftm.read_tick(2);
FamiText::Cell noise = ftm.read_tick(3);
FamiText::Cell dpcm = ftm.read_tick(4);
if (square1.note >= FamiText::NOTE_C0)
{
// animate a new note
}
// etc.
The tick() function executes 1 or more 60hz frames, and the notes are consolidated if there is more than 1 frame, so for 30hz video I want tick(2) so that it will read a note if one happened on either of the last two 60hz frames. This makes it pretty easy to create animation reactions based on notes in an FTM.
Anyhow I just though I'd share in case it's useful to anybody else. It'd be easy to extend to read instrument macros and other things.