Music:YourApp

Jump to: navigation, search

Designing Your Music Data Application

You have a vision for your application. Here's what you need to know to make your vision a reality.

Roadmap to Rovi Music IDs

In the data returned by most API responses will be IDs for names, albums, tracks, etc.—IDs you can use to ask for further information in another request. Here's a roadmap to building additional pages from the Rovi IDs returned in responses:


The Top-Level Requests: The Info Requests

The Music Service and Name Service provide six top-level requests:
  • Name/Info
  • Song/Info
  • Album/Info
  • Release/Info
  • Composition/Info
  • Performance/Info
These Info requests return core information plus preformatted requests for available subsidiary information. And these Info requests can also return subsidiary information in the response. Here are some design considerations when using the Info requests:
  1. An Info response tells you what subsidiary data is available: if a review or biography is not available, for example, the response will not include the preformatted request for the review or biography. This feature allows your application the following program control options when parsing an Info response:
    • Grab an available request and offer the data as a link.
    • Grab an available request, execute it, and present the data.
    • If a request is unavailable, execute an alternative request.
  2. You don't have to make separate requests for subsidiary information. An Info response can include subsidiary information in the response. You can, for example, include a review in an Info response by specifying that as part of the Info request. Use this feature in the following cases:
    • To build a page around data and subsidiary data you already know is available.
    • To present whatever data is available using appropriate program controls. Note: some subsidiary requests return huge amounts of data. For these requests, it's better to make a separate call so you can specify parameters that paginate the response data.
A Sample Info Response
Here's a response to a composition/info request. Note the three subsidiary requests returned at the end of the response.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"Build-Unknown-Label",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"MC0002396628",
      "format":"json"
   },
   "serverName":"tul1cssw1",
   "startTime":"2012-06-11T18:37:40.9392860Z",
   "endTime":"2012-06-11T18:37:40.9861586Z",
   "duration":46,
   "composition":{
      "ids":{
         "amgClassicalId":"C 157374",
         "compositionId":"MC0002396628"
      },
      "title":"Symphony No. 3 in E flat major (\"Eroica\"), Op. 55",
      "composers":[
         {
            "id":"MN0000536126",
            "name":"Ludwig van Beethoven"
         }
      ],
      "avarageDuration":2993,
      "compositionDate":"1803-??-??",
      "publicationDate":"",
      "revisionDate":"",
      "firstPerformanceDate":"",
      "rating":5,
      "alternateTitle":"Eroica",
      "genres":[
         {
            "id":"MA0000012291",
            "name":"Symphony",
            "weight":10
         },
         {
            "id":"MA0000002521",
            "name":"Classical",
            "weight":9
         }
      ],
      "periods":[
         {
            "id":"MA0000001731",
            "name":"Classical"
         },
         {
            "id":"MA0000001734",
            "name":"Romantic"
         }
      ],
      "forms":[
         {
            "id":"MA0000001706",
            "name":"Symphony"
         }
      ],
      "description":null,
      "descriptionUri":"http:\/\/api.rovicorp.com\/v1\/composition\/description?format=json&apikey=4p1k3y&compositionid=MC0002396628",
      "parts":null,
      "partsUri":"http:\/\/api.rovicorp.com\/v1\/composition\/parts?format=json&apikey=4p1k3y&compositionid=MC0002396628",
      "releases":null,
      "releasesUri":"http:\/\/api.rovicorp.com\/v1\/composition\/releases?format=json&apikey=4p1k3y&compositionid=MC0002396628"
   }
}
A Sample Info Response That Includes Information From a Subsidiary Request
Here's the response to the same composition/info request as above, but one which includes the information from the partsUri subsidiary composition request. With the Music API, you have the flexibility to get a group of related information with an Info request or to get just the subsidiary information in a subsidiary request.
{
   "status":"ok",
   "code":200,
   "messages":null,
   "build":"Build-Unknown-Label",
   "parameters":{
      "apiKey":"4p1k3y",
      "id":"MC0002396628",
      "include":"parts",
      "format":"json"
   },
   "serverName":"tul1cssw3",
   "startTime":"2012-06-11T18:46:44.7060719Z",
   "endTime":"2012-06-11T18:46:44.7529454Z",
   "duration":46,
   "composition":{
      "ids":{
         "amgClassicalId":"C 157374",
         "compositionId":"MC0002396628"
      },
      "title":"Symphony No. 3 in E flat major (\"Eroica\"), Op. 55",
      "composers":[
         {
            "id":"MN0000536126",
            "name":"Ludwig van Beethoven"
         }
      ],
      "avarageDuration":2993,
      "compositionDate":"1803-??-??",
      "publicationDate":"",
      "revisionDate":"",
      "firstPerformanceDate":"",
      "rating":5,
      "alternateTitle":"Eroica",
      "genres":[
         {
            "id":"MA0000012291",
            "name":"Symphony",
            "weight":10
         },
         {
            "id":"MA0000002521",
            "name":"Classical",
            "weight":9
         }
      ],
      "periods":[
         {
            "id":"MA0000001731",
            "name":"Classical"
         },
         {
            "id":"MA0000001734",
            "name":"Romantic"
         }
      ],
      "forms":[
         {
            "id":"MA0000001706",
            "name":"Symphony"
         }
      ],
      "description":null,
      "descriptionUri":"http:\/\/api.rovicorp.com\/v1\/composition\/description?format=json&apikey=4p1k3y&compositionid=MC0002396628",
      "parts":[
         "Allegro con brio",
         "Marcia funebre. Adagio assai",
         "Scherzo. Allegro vivace",
         "Finale. Allegro molto"
      ],
      "partsUri":"http:\/\/api.rovicorp.com\/v1\/composition\/parts?format=json&apikey=4p1k3y&compositionid=MC0002396628",
      "releases":null,
      "releasesUri":"http:\/\/api.rovicorp.com\/v1\/composition\/releases?format=json&apikey=4p1k3y&compositionid=MC0002396628"
   }
}

Page Control: Offset and Count

Some requests return enormous amounts of information. Name/Discography, a subsidiary request, returns over 400 albums for the Beatles.
To control the amount of data you receive in a response, subsidiary requests offer the parameters offset and count if the requests return lists of data. These parameters set the starting point and number of items to return. Use these parameters in combination with page forward and page reverse controls.

So How Do I Start?

Let's start with that vision of yours. Here are some ideas for creating compelling content on any page, including a home page:

Present a Search Box

Should the user enter the full search query before hitting Enter?
  • If yes, call Search when the user hits Enter. Consider calling Autocomplete to return search text as the user types.
  • If no, call SingleStageSearch to return results as the user types.
  • Consider allowing the user to select the entitytype they are searching for—song, artist, album, or composition.
  • Present a page based on the user's selection.
  • Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature 90's Artists by Genre, Along With Their Three Most Recent Albums

  1. Blues.png
    Call Descriptor/MusicGenres to get IDs of the genres or subgenres you want.
  2. Call FilterBrowse with the following parameters:
    • filter=decade:1990s
    • filter=genreid for each genre. For example: filter=genreid:MA0000002613|genreid:MA0000002572. Note: You could filter on subgenre ID instead with filter=subgenreid.
    • include=discography to return the list of albums. Consider including other requests for the data you want to present about each artist, such as include=images to get URLs to images of the artists.
  3. From the response, grab and use the data you want:
    • Consider using data about the artists, such as the headlines from the headlineBio element.
    • With the artists' name IDs, add a Name/Info link to each artist that will drive your customer to a page about the artist.
    • Grab the data you want about the first three albums in the discography element.
  4. With the album IDs in the discography element, call Album/Images to return images about each album.
  5. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs..

Feature Recent Albums in a Genre

  1. Call Descriptor/MusicGenres to get IDs of the genres or subgenres you want to feature.
  2. Call FilterBrowse with the following parameters:
    • filter=genreid with genre ID. For example: filter=genreid:MA0000002613|genreid:MA0000002572. Note: You could filter on subgenre ID instead with filter=subgenreid.
    • filter=releasedate with start and end dates.
    • filter=editorialrating if you also want to filter albums by editorial rating.
    • include=value for the data you want to present about each album. For example, include=images to get URLs to album cover images.
  3. From the response, grab album IDs and add an Album/Info link to each album that will drive your customer to a page about the album.
  4. Consider calling Descriptor/Genres or Descriptor/Subgenres for a description of the genre that you can feature on the page.
  5. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature Top Songs in a Music Genre or Subgenre

  1. Call Descriptor/MusicGenres to get IDs of the genres and subgenres you want.
  2. Call Descriptor/SignificantSongs with the IDs.
  3. From the response, grab and use the data you want:
    • Grab the link to the album cover image you want.
    • With the artist name ID, add a Name/Info link that will drive your customer to a page about the artist.
    • With the album ID, add a Album/Info link that will drive your customer to a page about the album.
    • With the song ID, add a Song/Info link that will drive your customer to a page about the song and a song sample. Or make the call and add the data to this page.
  4. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Around a High Society Image, Feature Music With a Cosmopolitan Mood

Feature music by mood:
  1. Look up the ID of the mood in the Music Moods table.
  2. Call FilterBrowse for songs, artists, or albums with the following parameters:
    • filter=moodid:XA0000000967 for a cosmopolitan mood.
    • An include parameter for the content you want to feature. For example: include=sample for songs.
  3. From the response, grab and use the data you want.
  4. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature Music Appropriate for the Christmas Season

Feature music by theme:
  1. Look up the ID of the theme in the Music Themes table.
  2. Call FilterBrowse for songs, artists, or albums with the following parameters:
    • filter=themeid:MA0000005043.
    • An include parameter for the content you want to feature. For example: include=sample for songs.
  3. From the response, grab and use the data you want.
  4. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature an Album

  1. Grab the ID from a response that returns album IDs:
  2. Call Album/Info with the include parameter values that return the data you want to present:
  1. From the response, grab and use the data you want.
  2. Call Similar to add recommendations of similar albums.
  3. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature a Song

  1. Grab the ID from a response that returns track IDs:
  2. Call Song/Info with the include parameter values that return the data you want to present:
  3. From the response, grab and use the data you want.
  4. Call Similar to add recommendations of similar songs.
  5. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature a Composition

  1. Grab the ID from a response that returns composition IDs:
  2. Call Composition/Info with the include parameter values that return the data you want to present:
  3. From the response, grab and use the data you want.
  4. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature a Classical Music Performance

  1. Grab the ID from a response that returns performance IDs:
  2. Call Performance/Info with the include parameter values that return the data you want to present:
  3. From the response, grab and use the data you want.
  4. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Feature an Artist

  1. Grab the ID from a response that returns name IDs:
  1. Call Name/Info with the include parameter values that return the data you want to present. Note: these values may return large amounts of data. To control the amount of data returned, make separate requests instead using the offset and count parameters.
  1. From the response, grab and use the data you want.
  2. Use the IDs in responses to build your pages out, adding links to other pages as shown above in Roadmap to Rovi Music IDs.

Selecting Areas of Focus

Rovi Music is designed around the features of music entertainment that draw the most consumer interest. It only makes sense to present content around albums, songs, artists, compositions, and performances, especially given the tremendous amount of data that is available for each. But you may also want to shift the focus to engage consumers even more. Here are some ideas for how to do that.

Widen the Focus to Musical Style

In the presentation of any album, you can widen the focus to musical styles with an Album/Similar request. Note the top-ranked musical styles, and present the similar albums in the contexts of the musical styles.

Focus on Related Artists

In the presentation of a song, album, composition, or performance, you can extend the focus to related artists. Consider the benefits of presenting data from these requests:

Feature a Musical Style or Genre

Rovi Music provides requests you can use to select data around a musical style or genre for both popular and classical music. Use the following guidelines.

For Popular Music

Follow these guidelines for popular music:
  1. Choose a genre or subgenre you want to focus on:
  2. Request the list of significant songs for the genre or subgenre from Descriptor/SignificantSongs.
  3. Request the list of significant albums for the genre or subgenre from Descriptor/SignificantAlbums.
  4. Request the list of significant artists for the genre or subgenre from Descriptor/SignificantArtists.
  5. Choose any or all of the songs, albums, and artists you want to focus on.
  6. Choose the data you want to present, including, if you like, the description of the associated musical style, genre, or subgenre.
  7. Request and present the data.

For Classical Music

Follow these guidelines for classical music:
  1. Choose one of the genres for classical music:
  2. Request the list of significant composers for the genre from Descriptor/SignificantComposers.
  3. Request the list of significant compositions for the genre from Descriptor/SignificantCompositions.
  4. Choose any or all of the composers and compositions you want to focus on.
  5. Choose the data you want to present, including, if you like, the description of the genre.
  6. Request and present the data.
Personal tools