P Squared Forum




Using Last.FM to populate Song notes

Author Message
 Posted 15 January 2010 12:42:26
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Yesterday @ 11:53:41
Posts: 63, Visits: 179
Hi there

I've successfully used the Last.FM webservice to automatically add Song Notes to most of the songs on our AudioWall. Its not an exact science as your song title and artist name have to match with whats on Last.FM's database but its generally quite accurate. Its also useful for getting release years and a good idea of Genre.

There is an acceptable usage policy, and you need to sign up for an account and there are probably some commercial aspects to it as well, but worth looking into.

regards
Chris Spring
Epsom Hospital Radio


Chris Spring
Epsom Hospital Radio
Engineering
Post #3716
Add to Twitter Add to Facebook
 Posted 19 January 2010 15:23:54
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 24 February 2012 16:57:35
Posts: 40, Visits: 345
Hi Chris, can you share how you did this please?

Thanks,

Andy.
Post #3730
Add to Twitter Add to Facebook
 Posted 19 February 2010 09:23:50
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 07 January 2012 13:19:22
Posts: 33, Visits: 164
Hi there, as mentioned by another user, can you let us know how you did this?

Regards

Alex
Post #3871
Add to Twitter Add to Facebook
 Posted 25 February 2010 22:42:53
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Yesterday @ 11:53:41
Posts: 63, Visits: 179
yeah sorry. I'll dig up the code and see what you need to do. You might have to register with LastFM for a usage code but there is a test code you can use. Going live with Myriad tomorrow so busy......w00t

Chris Spring
Epsom Hospital Radio
Engineering
Post #3894
Add to Twitter Add to Facebook
 Posted 27 February 2010 10:20:24
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2 hours ago
Posts: 142, Visits: 3,690
Chris
If any chance of how to use last.FM would be great
John
Bay Trust Radio
station.manager@baytrustradio.org.uk
Post #3905
Add to Twitter Add to Facebook
 Posted 28 February 2010 22:30:28
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Yesterday @ 11:53:41
Posts: 63, Visits: 179
I've had a look at the last.fm code and its a bit fiddly so suggest you get your tech boys to have a look.  What I did was sign up with LastFM and they give you a key that you need to use to access their system.

http://www.last.fm/api

If you look at the documentation there are examples of how to use it, using a demo key which you can't use for bulk work. I really don't think its designed for bulk work as if you do multiple requests per second they may block your usage. This is one of the example calls they show on their publicly available site above.

http://ws.audioscrobbler.com/2.0/?method=track.getinfo&api_key=b25b959554ed76058ac220b7b2e0a026&artist=cher&track=believe

What I basically did was export the audiowall library out to a CSV file and extracted out the cart number, artist and the track title. Using that I wrote a small windows script program to loop round and insert the artist and track name into the above url and call it.  From the returned data I pulled out the Notes section and saved it into the audiowall directory along with the WAV file there can be a MYR000 text file which is view in the notes section when a track is played. 

As mentioned you need to check the terms and conditions before you go down this route and you may not be able to use it in this manner if you are a non-profit organisation.

Chris

Chris Spring
Epsom Hospital Radio
Engineering

Post #3911
Add to Twitter Add to Facebook
 Posted 01 March 2010 19:12:08
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 24 April 2012 20:43:53
Posts: 45, Visits: 588
Thanks Chris for your post very interesting reading, as a person looking to invest in PSquared software for our community station I was totally shocked to see such a feature is not already built into the program.

Not wishing to totally HIJack your thread and noting FreeDB is used for CD rips why have PSquared not used the Open Source GPL API of MusicBrainz http://musicbrainz.org/search.html within their software?

FAQ Snip
FreeDB is based on the last version of CDDB that was freely available which was run voluntarily, not for profit. This freely volunteered effort was effectively stolen by Gracenote, who made it a commercial service that you have to pay to use in your music player software, or if you want to download large parts of the database for whatever reason. While it is a very useful site, it is technically inferior to this site as it is based on a flat format. i.e. releases are not grouped by artists, they just have a text field "Artist Name". Different printings of the same release that are not quite identical go into the listing twice etc. There is no concept of a single track being on more than one release -- a track doesn't really exist in its own right. While MusicBrainz is not perfect in this respect, it is a lot better, and plans for improvements are laid down. The path to achieving those goals is clear. It would be very hard to give FreeDB those facilities.
END Snip

I personally find MusicBrainz a very good site for information for my home MP3 collection and would have thought PSquared and it's Myriad or Autotrack program would utilize such tagging information within their own program given they provide fields for such information even though they recommend a station uses WAV files which as I understand from reading is also given a separate txt file to match the WAV with its associated information which is called within the programs. Why in 2010 is this software still not grabbing such information? if a station has 5 to 10 thousand songs that's an awful lot of hand coding!

MusicBrainz could at least be used to populate the Artist name, Song Title, Year and Additional nots about the group or song. After all loads of songs are now provided by downloadable MP3 which if I understand it correctly are imported into Myriad or Autotrack then no tagging is kept as FreeDB is only for CD's making it very unfriendly in the modern digital age.

Regards
Mark

PS
Think I might talk with Chris Hughes (Found within the forum) a very good friend who is going to help advise us on support for the products we purchase from PSquared this summer.


Regards

Mark Carney
Chief Executive & Technical Advisor
Pulse Media Broadcasting Limited

Pulse Radio
Web: www.pulseradio.org
Post #3913
Add to Twitter Add to Facebook
 Posted 01 March 2010 19:43:16
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 24 April 2012 20:43:53
Posts: 45, Visits: 588
Forgot to add this will give you an idea or the data that can be utilised.

Musicbrainz D2R Server
http://dbtune.org/musicbrainz/

Example data: album artist birth chamber_orchestra country death instrument l_album_label l_album_track l_album_url l_artist_artist l_artist_label l_artist_track l_artist_url l_birth l_death l_label_label l_label_track l_label_url l_track_track l_track_url l_url_url label language link_attribute link_attribute_type lt_album_album lt_album_artist lt_album_label lt_album_track lt_album_url lt_artist_artist lt_artist_label lt_artist_track lt_artist_url lt_label_label lt_label_track lt_label_url lt_track_track lt_track_url lt_url_url orchestra performance puid puid_stat puidjoin puidjoin_stat release release_tag script script_language signal signal_album symphony_orchestra tag track trackwords url wordlist


Regards

Mark Carney
Chief Executive & Technical Advisor
Pulse Media Broadcasting Limited

Pulse Radio
Web: www.pulseradio.org
Post #3914
Add to Twitter Add to Facebook
 Posted 02 March 2010 10:15:12
P Squared Employee

P Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared EmployeeP Squared Employee

Group: P Squared
Last Login: 6 hours ago
Posts: 273, Visits: 528
Hi,

We have looked into this in some detail.

Many of these sites are really great if you are an end user but the situation is different if you are a commercial entity like we are.

Take for example MusicBrainz. We contacted them around 6 months ago to discuss this functionality but their take on things is that integration into Myriad would be a commercial activity and as such would not be covered by their open source licensing. The only way we could access their info would be via a revenue share agreement where we pay them for every Myriad user accessing the service. Because of the way we structure our licensing, this would mean that we would be paying a fairly large amount of money on an ongoing basis to cover both old and new Myriad installations. Bottom line is that the only way we could justify this addition would be to increase the cost of Myriad or charge an ongoing service fee of some description, neither of which options have been popular when we have raised them in the past on this forum.

Last FM is much the same deal. In their case the deal is that we have to take out a permanent advertising contract with them plus they would also require us to submit ALL new releases and version updates to them, 30 days before release for approval. We feel that this would be an un-workable condition of use. They also reserve the right to charge in the future so it might be a charged service in 6 months time (or maybe not).

Even the social network sites such as Twitter and Facebook have issues. We have recently modified OCP to allow updates to Twitter which will be included in the next release but the terms of Twitter use prohibit automated updates so it is unclear whether widespread use of this type of feature might land you in hot water with Twitter / Facebook.

It would be great to take advantage of some of the new servcies available on the web and we have been looking at how it might be possible but the problem is that they are commercial organisations who have a perfect right to charge another commercial organisation for access to their resources.The difficulty we have is balancing potential gains against raising development and licensing costs.

That is why we prefer to offer assistance to enterprising users finding ways to utilise these services without breaching any 'commercial use' license agreements. One final word of warning is that if you are a commercial radiob station and you use MusicBrainz / Last FM data, you should check the fine print to ensure you are not breaching any agreements yourselves.


Liam BurkeCommercial Director - P Squared Ltd

Email: liamb@psquared.net

Telephone: +44 1482 383700

Skype: liamdburke
Post #3915
Add to Twitter Add to Facebook
 Posted 02 March 2010 10:32:01
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 24 April 2012 20:43:53
Posts: 45, Visits: 588
Hi Liam,

Thanks for you response which makes total sense, of course although you would have additional development cost it would be a handy feature for non commercial use stations or better still not-for-profit station as these surly would not be in breach of use? Checking on the MusicBrainz terms you can use their service even if you take advertising as long as it is NOT FOR PROFIT, IE only cover operating cost, this is something all Hospital and Community stations would fall into.

What would be handy is for the facility to be there but the end user (Station) has to insert the API data account themselves, this way they would take responsibility for its use while PSquared ensured the imported data did not corrupt their own programs.

Easy for me to say I know as there is still a commercial activity by PSquared in adding such a feature which could be construed as being for profit by the database developers.

A real shame in reality as this would be a massive assistance to all involved but I can understand how stations and PSquared do not wish to get into licensing issues and heightened costs.

Thanks again for your reply.


Regards

Mark Carney
Chief Executive & Technical Advisor
Pulse Media Broadcasting Limited

Pulse Radio
Web: www.pulseradio.org
Post #3916
Add to Twitter Add to Facebook


Reading This Topic

Expand / Collapse