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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Ratchet
Citizen
Posts: 67
Joined: Mon Apr 08, 2013 10:32 am

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

Post 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")
Last edited by Ratchet on Mon Apr 14, 2014 5:37 am, edited 1 time in total.
macOS 10.14 Mojave | LÖVE 11.2
User avatar
MGinshe
Prole
Posts: 31
Joined: Sun Apr 17, 2011 3:50 am
Location: New Zealand

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

Post 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.
User avatar
Ratchet
Citizen
Posts: 67
Joined: Mon Apr 08, 2013 10:32 am

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

Post by Ratchet »

LÖVE uses ModPlug which supports features like that...
macOS 10.14 Mojave | LÖVE 11.2
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests