I need to get the end of a PROJECT. It doesn’t appear there is a simple answer. Instead, I calculate if from the end of the project tracks, which is not too complicated:
The issue is that this returns an approximate, rather than exact, value.
My current project is 1h15m32s0228samples long. The valuer returned by the code above is 4532.050000. That’s not right.
The value returned by selecting everything and getting the selection end [get ‘selection’ end] is 4532.051882, which is correct.
So, is there a way to get the correct project length?
Perhaps we should be requesting an enhancement - more accuracy.
Audacity is certainly capable of providing greater accuracy, but I guess that the value is being rounded for display purposes.
True. The problem doesn’t come from the lack of space in the representation by the format function. It comes from the fact that get-info returns a truncated value. It’s quite clear with the slightly amended code: