Forums » General Discussion Search

Number of Tatums in a song? New Reply

Author Post
Posts: 5
Registered: Mar 31, 2010

Hi there,

is there a way to have Pyechonest return the number of Tatums in a song?

The syntax I'm using only returns the time values:

file.write('tatums, ' + comma_separated(track.tatums, 'start'))

What I'd need is something more absolute, like "this song has 653 tatums".

Thanks!

Posts: 13
Registered: Mar 17, 2009

Hi Clementferrand,

if you want the number of tatums, you can just use len:

 print "this song has %d tatums" % len(track.tatums)

Hope that helps,

Jason

Posts: 5
Registered: Mar 31, 2010

Thank you jason, this worked perfectly!

Reply to this Thread

You must log in to post a reply.