Page 1 of 1

Source:seek/tell - Pattern/Row TimeUnit for tracked music?

Posted: Sat Apr 12, 2014 9:53 pm
by Ratchet
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 :cool:

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")

Re: Source:seek/tell - Pattern/Row TimeUnit for tracked musi

Posted: Sun Apr 13, 2014 10:00 am
by MGinshe
i'm not 100% sure on this, but i'm fairly sure that love.audio is just an OpenAL wrapper. the love2d devs would need to modify code on the C++/C# side to add something like that.

Re: Source:seek/tell - Pattern/Row TimeUnit for tracked musi

Posted: Mon Apr 14, 2014 5:32 am
by Ratchet
LÖVE uses ModPlug which supports features like that...

Re: Source:seek/tell - Pattern/Row TimeUnit for tracked musi

Posted: Mon Apr 14, 2014 2:15 pm
by bartbes
Yes, but it also completely decodes it ahead of time then plays that back (in static mode anyway), so that information is lost at that step.