View Single Post
Old 25 June 2016, 19:57   #7
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 667
Quote:
Originally Posted by daxb View Post
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
KONEY is offline  
 
Page generated in 0.07399 seconds with 11 queries