Identification Using Neural Network For Classical Music Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Indian Classical Music is one of the oldest forms of music alive in todays generation. It is associated with various melodies, which are set to certain fixed variation of notes and is generally called as Raga or Rag. A Raga is normally very pleasing to ear if played according to its rules. Identification of a raga from a music script certainly needs training. Many parameters such as Arohan, Avarohan, pakada are associated with the raga of a classical music, which need to be extracted and using these features neural network can be trained, which in turn used for raga identification. Same can be obtained using manual analysis of the features extracted. This system uses Artificial Neural Network and Matlab.

After training a person about different ragas of music, the person is capable of identify the raga of given music. Same mechanism is used here in this project by using artificial neural network. It has to be trained using training algorithm for different ragas, which is used for raga identification. This consists of two parts:

1. Feature Extraction: To analyze, by scanning the music script, a set of features which characterizes the music is extracted.

2. Training and Identification: An artificial neural network is created and it is trained for different ragas. This is simulated to identify the raga of a given music.

The result of proposed system is analyzed using manual method.In this paper, A System for Automatic Raga Identification, which is an illustration of the application of techniques in AI to the study of Indian music, presents an approach to solve the problem of automatic identification of ragas from audio samples, is based on a Hidden Markov Model enhanced with a string matching algorithm. The whole system is built on top of an automatic note transcriptor. In the paper 'Measuring similarities across musical components: An approach based on the raga paradigm. It has taken a preliminary look at computational methods of identifying similarity in musical compositions. In the paper Music Classification using Neural Networks, it has mentioned the use of neural network.

Rest of the paper is organized as follows; The Section 2 is Final System which outlines the proposed structure of the project's final implementation. The Section 3 is Manual Analysis which explains the manual experimental analysis for the proposed system. The Section 4 is Results which presents the summary of performance results of the project at each stage of development for both the methods of raga identification. The Section 5 is Discussion which explains the need of neural network and the manual method.

2. Final System

The final system consists of two main algorithms, Feature Extraction and Identification, embedded into a graphical user interface, an outline of which is as shown in the figure







Fig 1: Overview of the final system

The user chooses a music script file which is then given as input to the Feature Extraction algorithm to produce a Feature Vector. Neural Network is created first by specifying the number of inputs and the outputs and it is trained with different raga's music script. Now the Feature Vector is given as input to the identification process, which simulates the trained neural network and as a result gives the raga of the selected music script.

2.1 Feature Extraction

The music script file is scanned and the notes are stored in the array. Now this is traced for pair of note's (swara's) at a time. The counts of these pairs are stored in the matrix. From this 3 types of features are extracted.

2.1.1 Arohan Features

To get the arohan features, scan the ascending note pairs, i.e. SR, RG,GM etc, then find the sum of the counts of those pairs starting with some note(for example Sa). This is considered has one of the arohan features. Similarly it is calculated for all the notes.

2.1.2 Avarohan Features

To get the avarohan features, scan the descending pairs, i.e. RS, GR, MG etc, then find the sum of the counts of those pairs starting with some note(for example Sa'). This is considered as one of the avarohan features. Similarly it is calculated for all the notes.

2.1.3 Same note pair Features


Feature vector

To get the same note pair features, scan the same note pairs, i.e. SS, RR, GG etc, its count is taken as the features. It is calculated for all the notes. Once these features are obtained it has to be normalized, so that its value is in the range of 0 to 1. For that each feature is divided by the total number of pairs present. This will be the final feature set.

Pair note scanning

Save in the array

Read the music script file

Save pair note counts

Compute Arohan features

Compute same note fair features

Compute Avarohan features

Compute feature

2.2 Training and Identification

Training is the step where neural network is trained with different ragas' music scripts as shown in Fig 3. Here again feature extraction process has to be used for all the scripts, and form the database. Find out the number of input, output and hidden layer neurons and hence create the neural network. Features are taken from the database and the neural network is trained using training algorithm. It results in a trained network.

Features Database

Human beings have many neural networks in the brain which is capable of performing many tasks. But it has to be trained first i.e. after learning about different things, the person is capable of understand those things, with the knowledge already built. Same mechanism is used here also for raga identification. After training with different music script it builds the knowledge about those ragas.

Read the features

Create the Neural Network

Train the neural network

Save the neural network

Fig 3: Training

Identification step analyses the extracted features of the music and as a result displays the raga of the input music script file by simulating the loaded Neural Network (trained) as shown

In Fig 4.

Features Vector

Simulate the Neural Network

Load the Neural Network

Identified Raga

Fig 4: Identification

3. Manual Analysis

It is clear that the raga of music can be distinguished by the use of arohan, avarohan and pakada of the raga. But it has to be extracted from the given music script. For that script must be scanned and features must be extracted. Then it is classified according to its behavior either ascending, descending and same note pair features. Then for these 3 types of features, bit pattern is formed, to reduce the number of comparisons of the features. This can be done by putting 1 if the note is present otherwise 0. Then for these features decimal value is calculated, using binary to decimal conversion function. This value is now given to identification step, which identifies the raga of the given music script.

Music Script File


Compute Arohan Features

Compute Avarohan Features

Compute Pakad Features

Compute Arohan Bit Value

Compute Arohan Bit Value

Compute Arohan Bit Value

Compute Bit Pattern Value


Identified Raga

Fig 5: Final System-Manual Analysis

3.1 Extraction

In this step music script file is scanned and the notes are stored in the array. Then the array is scanned for pair of notes (swara's) and its count is calculated. Then it is saved in the feature matrix for further classification.

3.2 Classification

This is the next step where extracted features are classified according to their nature. That means here from the features matrix the 3 types (Arohan, Avarohan and Pakad) of features are classified. These features are:

3.2.1. Arohan and Avarohan Features

These features are calculated same as explained in the part 2.1.1 and 2.1.2.

3.2.2 Pakad Features

'Pakad' literally means a grip. In musical parlance, pakada is the signature phrase for the raga. Given two very similar ragas, they differ at least in their pakads. Formally, the pakad is any string which conforms to the Arohana and Avarohana. It is important from a computational point of view since it is unique for the raga. The problem, however, lies in the facts that the length of the pakad is unbounded, and the pakad might not be present in its entirety in the composition, but parts of it may be distributed over the composition as the underlying "theme" of the composition. To get the pakad features, scan the ascending and descending note pairs and four maximum count pairs are taken from each part. Other counts are made zero.

3.3 Compute Bit Pattern Value

In this step, to reduce the comparison process classified features, bit pattern is generated.(That is arohan, avarohan and pakad features' bit pattern is generated). From arohan and avarohan features if that sum of counts are greater than 0, that note is made 1, otherwise it is 0. Similarly from calculated pakad, if it has greater than 0 values, that position is made 1, otherwise 0. Once it is generated its corresponding decimal value is calculated.

3.4 Identification

In this step the raga of the target music is identified. Arohan, Avarohan and Pakad features values are already calculated, and also its bit pattern values. Now these values are compared and hence identify the raga.

4. Results

The Raga Identification Using Neural Network is tested successfully for Bhoopali and Kalyani raga and the results are verified using Manual method.

4.1 Manual Analysis results

This experiment starts with getting the note information from the file to an array. Then the array is scanned for pair notes and its count is saved in the matrix. It is given in Table 1.

Table 1: Feature (Pair Notes) matrix

As it is shown in table1, the features are in the matrix form. So by this matrix all the possible note combinations can be checked easily. Its relative counts are also there in the table. By looking at the matrix it is clear that upper triangular matrix has the ascending pairs and lower triangular matrix has the descending pairs. Next step is to get the arohan, avarohan and pakad from this table. In the first row find the sum the values from column r toS' (i.e. Sr + SR + Sg + SG + Sm + SM + SP + SD + SD + Sn + SN + SS'). If the sum is greater than zero then it is understood that note S is there in the Arohan. It is calculated for the entire 12 notes (S to N) in the upper triangular part. That gives the idea about those notes present in the arohan or not. Similarly it is calculated from S' to r form the lower triangular matrix. That is for the avarohan sequence. Finally arohan and avarohan bit pattern is calculated as shown in the Table 2.

Table 2: Arohan & Avarohan Bit Pattern

Form this result it is easy to tell about the notes present in arohan & avarohan sequences. So for the Bhoopali Raga, it matches with the experimental result. From this analysis the Arohan and Avarohan notes of the raga can be identified and are as shown in the table 3.

Table 3: Arohan & Avarohan Notes

To get the pakad of the raga, the matrix is tested for the maximum count in the upper and lower triangular matrix. Here four maximums are considered from each of the part. Once it is obtained its position is saved as follows,

Table 4: Forward Four Maximum.

Table 5: Reverse Four Maximum.

Here the first and second column gives the position of the matrix, which has the maximum count. And the third column gives the count. Now in the matrix, only for those positions have to put 1, for others put 0. Then the table looks like,

Table 6: Pakad matrix

Now all the features are represented in terms of the binary bit pattern. To identify the raga all these features have to be compared. So to reduce the number of comparisons, its corresponding decimal value is calculated.

Table 7: Features

Now just by comparing these values directly raga can be identified. Here it is successfully identified as Bhoopali Raga.

4.2 Neural Network results

From the given music script 50 notes are selected as shown below, for this neural network approach is used.

Table 8: Swara Script (Notes)

From this the features are extracted as explained in the part 2.1and calculate 36 features as shown in the Table 9.

Table 9: Features

These features are now given to the network, which identifies the raga of given music script. Here in this case the identified raga is Bhoopali.

5. Discussion

This paper describes the concept of raga identification using the neural network. The use of neural network is, much analysis of the features of a music script is not required. Because once features are extracted from different music script it is given to the neural network for training. Since it is a supervised learning, the input and corresponding output is properly specified, so it will adjust the weights according to that. Once it is trained for all ragas, it can be used for identifying the raga. But using neural network it is not clear that how exactly this works. That can be understood by checking the results using manual analysis. This will do all sort of analysis with the extracted features as explained in the previous section.

6. Conclusion

This uses the technology of MATLAB and Artificial Neural Network. The system has simple modules and is easy to execute separately which provides flexibility to changing requirements. This is successfully tested for two ragas Bhoopali and Kalyani. The same method can be used for identifying all the ragas. Then the training will be complex. So to reduce the complexity, ragas can be grouped by some characteristics. So that one network is used for one group and it can be fused to give the final output.