Skip to content Skip to navigation

Connexions

You are here: Home » Content » Introduction of LPC approach

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • Rice University ELEC 301 Projects

    This module is included inLens: Rice University ELEC 301 Project Lens
    By: Rice University ELEC 301As a part of collection:"ELEC 301 Projects Fall 2006"

    Click the "Rice University ELEC 301 Projects" link to see all content affiliated with them.

Recently Viewed

Introduction of LPC approach

Module by: Yiming Wang

Summary: General introduction of the LPC approach of our genre detection method.

LPC Approach

The LPC approach we used was based on the Linear Predictive Coefficients, which is a function in MATLAB. After researching predictive models, we determined that the LPC, which is normally applicable to speech, could be used for sound prediction as well. It works on the premise that given a vector, the LPC function will determine the coefficients of an Nth order forward linear predictor.

A = LPC(X,N)

A = [1 A (2) A (3) ... A (N+1) ]

Determining the Genre via Errors

We used the dot product to find the error between the predicted nth term and the actual nth term of the input music. For our purposes, we chose to use the 25th order after determining that it yielded the highest accuracy experimentally.

Error = A * X

= X (n) – A (2)*X (n-1) – A (3)*X (n-2) – ... – A (N+1)*X (n-N)

The predictor was used to determine the error between the input song and the genre (our genre database). The idea is that the genre that gives the least error would be the genre of the input song.

RockLPCTotal ErrorClassicalLPCTotal ErrorRapLPCTotal ErrorInput Song? Genre ?

This figure represents the testing of the song with each genre database. Testing consisted of the following procedure:

We first loaded the input song. Then applied it to the database for each genre (one at a time) to determine which genre it is most similar to. For the first genre, find the LPC coefficients for it. Then section the input song vector into two sections of length 25 each, as shown in figure 2. Apply each section to the LPC coefficients to find the error for each section. Then sum up the errors in each section to find the total error for that genre. Finally, do it for all the genres. By the end of this procedure, we would have the total errors for each genre. And the minimum error should be the genre that the input song belonged to.

Sections of song vector (fig. 2)

Problems

We found several specific errors in using the LPC method. First and foremost, it took too much time to calculate the errors (about 53 seconds per input song). Thus, we could not be able to put enough sampled songs into our database, which lead to get more accurate results. However, if we used another method of forming our database, specifically by using a matrix, the computations would have been much faster, and we could have used more songs in our database. The problem was that in our program, we recalculated the LPC coefficients each time we ran checked an input song. Had we saved the LPC coefficient values in a matrix, the computations would have been much faster.

The LPC could not accurately detect neither jazz nor pop under the algorithm we had developed. In fact, the LPC was most accurate when deciding between two random types of songs, but not five. It was particularly accurate with rap and classical.

Comments, questions, feedback, criticisms?

Send feedback