I bet it is by calculating the automation. Think about it as a math integral. From certain point to certain point, it has a constant value. From the other point to other, it has certain value. It would be something like this I think.

int milliseconds = 0;
for(int x = 0;x < bars;x++)
{
    for(int y = 0;y < automationpoints;y++)
   {
          milliseconds += point2 - point1 * tempo; // Assuming it is a bar
   }
}
 

You then convert milliseconds to seconds and minutes.This is recalculated each time song changes length.
Rubén Ibarra Pastor



From: unfa00@gmail.com
Date: Wed, 28 Aug 2013 17:28:01 +0200
To: LMMS-devel@lists.sourceforge.net
Subject: [LMMS-devel] Feature request: timecoded timeline

Hey - I often find it really hard to find a specific point in my track- because the timeline displays only bar numbers.

If the timeline displayed also timecode (simple) MM:SS it would be big help in work.

I see this is tricky, for the tempo might be automated, I don't know if this would be a time-consuming process to calculate a time-map. It might require streching some clips to keep the playhead speed constant (Ardour style), or just create a "timestamp calculation" threadm that would be launched to update a timecode  array, when thempo (or it's automation) changes.

Anyone knows how to code this? Or maybe it's already done?

Bless,
unfa

--
Tobiasz unfa

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT/MU/P d->-- s+:-(--)> a? C++(+++)>$ ULC+(++)>$ !P? L+++>++++$ E? W++>$ !N-? !o--? K-? !w-- O? !M-- V? PS++ PE++ !Y+ !PGP+? !t(+) 5? !X !R+ tv b+>+++ DI>+ D+ G e h-->- !r y--() 
------END GEEK CODE BLOCK------

------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________ LMMS-devel mailing list LMMS-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lmms-devel