Posts Tagged demo

Fetching my saved tracks from Spotify

The @SpotifyPlatform team just pushed out an update to the Spotify Web API that lets a developer retrieve and manipulate the tracks that a user has saved in ‘Your Music’. To show off this new functionality I wrote a quick demo that shows how to fetch the saved tracks for a Spotify user via the nifty new API.  The demo will first solicit permission from the user, and if the user grants such permissions, the app will then retrieved the saved tracks and show them as a simple list.

My Saved Tracks

 

The demo is on line here: My Saved Tracks and the source is on github.

,

Leave a comment

Fetching My Starred Items from Spotify

I wrote a quick demo that shows how to create a web app that fetches the starred items for a Spotify user via the nifty new Spotify Web API.  The demo will first solicit permission from the user, and if the user grants such permissions, the app will then retrieved the starred list and show the tracks in a simple list.

My_Starred_Items

The online demo is here: My Starred ItemsThe source is on github.

,

Leave a comment

Learn about a new genre every day

The Echo Nest knows about 800 genres of music (and that number is growing all the time). Among those 800 genres are ones that you already know about, like ‘jazz’,’rock’ and ‘classical’. But there are also hundreds of genres that you’ve probably never heard of. Genres like Filthstep,  Dangdut or Skweee.  Perhaps the best way to explore the genre space is via Every Noise at Once (built by Echo Nest genre-master Glenn McDonald).  Every Noise At Once shows you the whole genre space, allowing you to explore the rich and varied universe of music.  However, Every Noise at Once can be like drinking Champagne  from a firehose – there’s just too much to take in all at once (it is, after all, every noise – at once).  If you’d like to take a slower and more measured approach to learning about new music genres, you may be interested in Genre-A-Day.

Genre-A-Day is a web app that presents a new genre every day.  Genre-A-Day tells you about the genre,  shows you some representative artists for the genre,  lets you explore similar genres, and lets you listen to music in the genre.

ss

If you spend a few minutes every day reading about and listening to a new genre, after a few months you’ll be a much more well-rounded music listener, and after a few years your knowledge of genres will rival most musicologists’.

An easy way to make Genre-A-Day part of your daily routine is to follow @GenreADay on twitter. GenreADay will post a single tweet, once a day like so:

Under the hood – Genre-A-Day was built using the just released genre methods of The Echo Nest API. These methods allow you to get detailed info on the set of genres, the top artists for the genres, similar genres and so on. It also uses the super nifty genre presets in the playlist API that allow you to craft the genre-radio listener for someone who is new to the genre (core), for someone who is a long time listener of the genre (in rotation), or for someone looking for the newest music in that genre (emerging).  The source code for Genre-A-Day is on github.

, , , ,

3 Comments

Getty Images and The Echo Nest

This week, The Echo Nest and Getty Images announced that they were partnering to make thousands of high quality artist images available for developers through The Echo Nest API. Getty Images has spent years building an amazing library of artist images and now, as a result of this partnership, it is easy for developers to use these images in music apps.

I took the new Getty Images API for a spin and built a couple of apps that show how easy it is to build an Echo Nest app that uses the images. First, I built an app that shows images of the top hotttest artists:

Echo_Nest___Getty_Images_demo

 

 

Next, since Getty Images has some really awesome images going back to the classic rock era, I adapted my app to show some Getty Images for some of our top classic rock artists:

 

 

Echo_Nest___Getty_Images_demo-2

We’ve extended our image API to return additional information with the Getty images. There’s image attribution information, image size information, and some curated image tags that you can use to select the best image for your app. Tags include landscape, portrait, black-and-white, solo, award, performance, color and many more.

The Getty Images are really top notch.  It’s a great addition to The Echo Nest API. I’m excited to see how developers will use this asset.

, ,

3 Comments

One Minute Radio

If you’ve got a short attention span when it comes to new music, you may be interested in One Minute Radio. One Minute Radio is a Pandora-style radio app with the twist that it only every plays songs that are less than a minute long.  Select a  genre and you’ll get a playlist of very short songs.

One_Minute_Radio-2

Now I can’t testify that you’ll always get a great sounding playlist – you’ll hear  intros, false starts and novelty songs throughout, but it is certainly interesting.  And some genres are chock full of good short songs, like punk, speed metal, thrash metal and, surprisingly, even classical.

OMR was inspired by a conversation with Glenn about the best default for song duration filters in our playlisting API.  Check out One Minute Radio. The source is on github too.

, ,

2 Comments

Getting the Hotttest Artists in any genre with The Echo Nest API

If you spend a few hours listening to broadcast radio it becomes pretty evident who the most popular pop artists are.  You can’t go too long before you hear a song by Justin Timberlake, Rihanna, Bruno Mars or P!nk.  The hotttest pop artists get lots of airplay.  But what about all the other music out there?  Who are the hotttest gothic metal artists? Who are the most popular Texas blues artists?   Those are the kind of questions we try to answer with today’s Echo Nest demo:  The Hotttest Artists

Screenshot_3_29_13_1_04_PM

This app lets you select from among over 400 different genres from a cappella to Zydeco and see who are the hotttest artists in that genre.  The output includes a brief bio and image of the artist, and of course you can listen to any artist via Rdio.   The app is an interesting way to explore all of the different genres out there and sample some different types of music.  The source is available on github. The whole thing including all Javascript, html and CSS is less than 500 lines.

Try out the Hotttest Artist app  and be sure to check out all of the other Echo Nest demos on our demo page.

Leave a comment

Getting Artist Images with the Echo Nest API

This week I’ve been writing a few web apps to demonstrate how to do stuff with The Echo Nest API.   One app shows how you can use The Echo Nest API to get artist images.  The app is nice and simple. Type in the name of an artist and it will show you 100 images of the artist.

Screenshot_3_27_13_7_37_AM

The core code to get the images is here:

function fetchImages(artist) {
    var url = 'http://developer.echonest.com/api/v4/artist/images';

    var args = { 
            format:'json', 
            api_key: 'MY-API-KEY',
            name: artist,
            results: 100, 
    }; 

    info("Fetching images for " + artist);
    $.getJSON(url, args,
            function(data) {
                $("#results").empty();
                if (! ('images' in data.response)) {
                    error("Can't find any images for " + artist);
                } else {
                    $.each(data.response.images, function(index, item) {
                        var div = formatItem(index, item);
                        $("#results").append(div);
                    });
                }
            },
            function() {
                error("Trouble getting blog posts for " + artist);
            }
        );
}

The full source is on github.

With jQuery’s getJSON call, it is quite straightforward to retrieve the list of images from The Echo Nest for formatting and display.

The most interesting bits for me was learning how to make square images regardless of the aspect ratio of the image, without distorting them. This is done with a little CSS magic. Each image div gets a class like so:

        .image-container {
            width: 240px;
            height: 240px;
            background-size: cover;
            background-image:"http://example.com/url/to/image.png";
            background-repeat: no-repeat;
            background-position: 50% 50%;
            float:left;
        }

Try out the Artist Image demo , marvel at the square images and be sure to visit the Echo Nest Demo page to see all of the other demos I’ve been posting this week.

1 Comment