Re: [Musicpd-dev-team] Duration of song with millisecond info?

2012-08-08 Thread Stefan Monnier
 Yes, seconds is enough accuracy. Especially for large playlists!

It depends on 2 things:
- whether you care about absolute error or relative error (the relative
  error will not increase with the number of sings, but the absolute
  error might).
- whether each error is biased.
The second point is important: is the number of seconds reported rounded
or truncated?  If it is rounded, then the relative error is likely to
diminish with the number of songs, but if it is truncated it won't.


Stefan


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


Re: [Musicpd-dev-team] Duration of song with millisecond info?

2012-07-29 Thread Max Kellermann
On 2012/07/29 18:58, zw g pekingmas...@gmail.com wrote:
 I think that is not accurate enough for computing the duration of whole
 playlist, especially for large playlist.

I think it is.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


Re: [Musicpd-dev-team] Duration of song with millisecond info?

2012-07-29 Thread zw g
Thanks for your explaination.

That would be still a problem.
Lots of area do not allow such a `big` tolerance,especially for radio and
television related area.

Is it hard to have the milliseconds form functionality in MPD core?
Or, can we have it in the future release?

Gui


On Mon, Jul 30, 2012 at 3:34 AM, Arnold Krille arn...@arnoldarts.de wrote:

 To elaborate on Max' answer and because I like statistics:

 On Mon, 30 Jul 2012 00:58:46 +0800 zw g pekingmas...@gmail.com wrote:
  Now in the current MPD version:
  From asking MPD by using `client.playlistinfo()` request by using
  python-mpd2,
  what i get is int type represents duration of each song in *seconds*
  form.
 
  I think that is not accurate enough for computing the duration of
  whole playlist, especially for large playlist.

 Yes, seconds is enough accuracy. Especially for large playlists!
 If the playlist is two songs of 1 minute each, that makes 120 seconds
 in total. When both lengths are inaccurate by 1 second (maximum!), that
 means 120 +- 2 seconds, that is an error of less then 2%. Quite good
 already.
 If the playlist is large like 300 songs of 3 minutes each, that makes
 900 minutes material or 54000 seconds. The error is 1 second per
 song. So the length of a song is 180+-1 second or less then half a
 percent per song. For this large amounts of songs, doing the
 error-calculation by adding the larges values is giving an overly large
 error, the real error will be much smaller, probably less the 0.1%. And
 who needs a playlist-length of 54000 seconds accurate to less 0.1 percent?

 Arnold


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Musicpd-dev-team mailing list
 Musicpd-dev-team@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team