Quote:
Originally Posted by daxb
Do you want to show us how do you calculate the total playing time of a OctaMED SoundStudio song? It would be nice to know if scanning of all pattern data is needed.
|
Sure. Well actually I realized that an average value must be accepted, or you need to play the song fully. I assumed no premature end commands are used as they're not needed in OctaMED, since it allows custom block length. Also full stops "FFE" in the middle of the songs are not detected. I also assumed that TPL changing commands would be at the top of the block, otherwise a full scan of each line of each track would be necessary.
So the script in pseudo code will:
play the song
cycle blocks in sequence
allow a few ms to tpl commands to eventually get applied
calculate lines ms accordingly to bpm and tpl
add to a total
finish cycle
stop playing
format the output
show output
I am quite satisfied with the resulting values, they quite match the real song playing time.
I made a video also:
[ Show youtube player ]
if you want I can upload the script