Source:seek/tell - Pattern/Row TimeUnit for tracked music?
Posted: Sat Apr 12, 2014 9:53 pm
What about adding two TimeUnits: pattern and row for getting and setting the position of tracked music (MOD, XM, IT, S3M)
Would be great to perform dynamic music changes
Also a getLength method for Sources would be usefull (takes seconds and sample TimeUnit for WAV, MP3, OGG... and pattern, row for tracked music).
Would be great to perform dynamic music changes
Also a getLength method for Sources would be usefull (takes seconds and sample TimeUnit for WAV, MP3, OGG... and pattern, row for tracked music).
Code: Select all
source = love.audio.newSource("mysong.xm", "static")
length = source:getLength("pattern") -- returns 5 patterns ie
-- Jump to pattern 4, row 32
source:seek(4, "pattern")
source:seek(32, "row")