The Genre Classifier

We then tried to expand further with a genre-identifier, which would sort any music into six genres: qawwali, hiphop, blues, jazz, classical and rock, with another five being added later on. This classifier was trained on Mr. Faheem Sheikh’s QawwalRang database. We at first used the same method, i.e. training our model on MFCC features, as the previous project, but reported a rather low success rate. This caused us to try using the prebuilt YAMNet model to help by feeding it our data and training our classifier on its embeddings (its middle layers’ partially processed outputs). This significantly increased its accuracy, and allowed us to expand it to eleven genres: qawwali, hiphop, blues, jazz, classical, rock, reggae, rock, disco, pop, and metal..

A More Technical Perspective

The Six-Genre MFCC Attempt

For our second machine learning project, we chose to build a model which could classify music into six different genres: qawwali, hiphop, blues, jazz, classical and rock. It used Mr. Faheem Sheikh’s QawwalRang database and used 60 MFCC features for each like the instrument classifier. This model had two hidden layers, and was a TensorFlow Sequential model. The code was again borrowed from the article on using audio classification with Librosa, which is the source for most of our projects. We then modified it to work for 11 genres.

The CQT Modification


We then modified our model to use CQT features as well, as recommended by Mr. Fahim Sheikh in his article, out of a hope that they would improve its performance. These features were better suited to detecting the tabla than the MFCCs, making them a perfect choice to identify the Qawwali genre. This gave this model a small but observable advantage over the solely MFCC using model, as seen in the following graph.

The YAMNet Model

We chose to use the help of the YAMNet audio classification model, which classifies audio samples into more than 500 different classes, ranging from sirens to shouting. This model takes in a .wav file and outputs embeddings alongside its finished result, which can be used by other audio models for enhanced efficiency. We trained a simple model to use the YAMNet embeddings with the help of this article, which reported an increased dev accuracy of around 0.85 for the eleven used genres. Our database consisted of 7700 videos, each 3 seconds long, which we acquired through slicing the files obtained from Mr. Sheikh’s database into three-second clips. Before doing so, we at first used the files in their original thirty second form.

Interestingly, whether using three or thirty second clips, our model’s performance remained roughly the same so long as the total amount of data we fed it remained the same. This contradicted our belief that reducing the clip length would degrade its performance by giving it less continuous data to work with. Another surprising fact we discovered was that, as you can see above, the YAMNet model out-performed the others by a significant margin, especially in the most important category of all – test accuracy. This discovery radically changed our machine learning approach by helping us realize the sizable advantage using YAMNet gave us, and greatly influenced our following projects.


Save the Sitar is a website dedicated to promoting and preserving Pakistan’s classical music. Join our growing community to help further our cause!

Follow Save the Sitar!

Get new content delivered directly to your inbox.

We’re on social media!

Our Machine Learning Projects and their Glossary

You can find below a list of all our major machine learning projects so far alongside an glossary of a few helpful machine learning terms. It should be noted that this glossary is extremely basic – it is only meant to provide a functional understanding of some of the terms used in our articles. For a more in-depth explanation, we encourage you to consult more detailed resources like this one.

Our Projects

The Tabla, Violin and Piano Classifier 

The Genre Classifier 

The Instrument Classifier 

The Raag Project 

The Glossary

CQT: A type of audio features which are used in machine learning.

Embeddings: The partially processed outputs of a neural network

MFCC: A type of audio features which is used in machine learning. They are supposed to mimic the experience of the human ear better than other features.

Neuron: The smallest unit of a neural network, a node which receives an input and produces an output.

TensorFlow: A machine learning Python library which we use heavily throughout our work.

Test Set: The set of data on which a model is finally tested to evaluate its performance

Training Set: The set of data on which a model is trained

Validation Set: The set of data on which the model is tested regularly to check what is needed to be done to enhance its performance.

YAMNet: A pre-existing TensorFlow model which we use to help process our data.


Save the Sitar is a website dedicated to promoting and preserving Pakistan’s classical music. Join our growing community to help further our cause!

Follow Save the Sitar!

Get new content delivered directly to your inbox.

We’re on social media!

The Piano, Tabla and Violin Identifier

Our very first machine learning project was extremely simple – a basic music identifier which was meant to familiarize us with machine learning in general. This identifier was initially meant to simply decide whether a piece of music contained a tabla or not, but we later on expanded it to include the violin and the piano as well. Our classifier quickly started to recognize and sort various excerpts of music, to our great surprise and pleasure, in spite of having an extremely small training data base.

A More Technical Perspective

This model closely echoing the perception of the human ear, and their being the primary featureused MFCCs largely due to their echoing the perception of the human ear quite closely, and their being the primary feature being used nowadays for audio classification. It was also a Sequential model due to these models being the most commonly used ones and being the simplest to understand, as they have a plain stack of layers. We made this identifier using Tensorflow, and largely borrowed from the code over here due to its being for a similar classification problem.

Its dataset was compiled from YouTube videos, with Muneeb writing code to download and slice them. We had an equal distribution from all three categories, with there being sixty audio files in total, all of which featured a sole instrument playing. We then extracted forty MFCC features from each file, and used a Tensorflow Sequential model with one hidden layer to process the data. This model had training and dev accuracies of 1.

This model represented a big step forward for us, as it was our very first machine learning project. It is hard to over-emphasize just how important it was to us to be able to actually see the concepts we had studied in action for the first time ever. We now had a taste of what machine learning actually was about – and we wanted more.


Save the Sitar is a website dedicated to promoting and preserving Pakistan’s classical music. Join our growing community to help further our cause!

Follow Save the Sitar!

Get new content delivered directly to your inbox.

We’re on social media!

Sitar players from the Jaipur Senia Gharana

One hot afternoon, at the peak summer in 2008, an undergraduate student from NCA, Ali Ayub was standing in the city centre of Hyderabad. For him the traffic, the noise, the jostling pedestrians, the street food vendors all seemed to merge into one another. His eyes were fixed on an ice-cream vendor and his cart. There seemed nothing atypical about this middle-aged gentleman to the casual observer. Surrounded by children, he was dexterously putting the ice-cream into cups in a measured yet surprisingly efficient way – ergo, just like any other vendor. The young undergraduate hesitated, but then decided to move forward. He had rehearsed the introduction many times: “Are you Ustad Abid Hussain Khan from the Senia gharana, the descendants of Mian Tansen, one of Akbar’s nauratans?”. When his turn came to talk to the ice-cream vendor, all Ali Ayub could muster was “Assalam alaikum. Are you Ustad Abid Hussain Khan?”. The conversation began with a nonchalant “Yes”, as the Ustad deftly put another ice-cream scoop into a paper cup.   Between dealing with his customers, Ali Ayub and Ustad Abid Hussain Khan had detailed conversations about the Masitkhani gat and other such fascinating musical details as the sun beat down upon them overhead. He frankly explained that financial reasons had driven him to stop playing the sitar and quitting Pakistan Radio as a staff artist. “Ice-cream selling is much better. Tomorrow, my son will grow this cart into an ice-cream shop”. His story is sadly no exception.

History and Family Trees

The Jaipur Senia gharana is the largest Pakistani sitar playing gharana. This gharana, whose members claim to be descendants of the legendary musician Tan Sen, migrated from Jaipur to Sindh during Partition.

The main part of the gharana’s recent history begins with Ustad Machhu Khan who was born around 1900 in Jaipur, and was initially taught the sitar by his father, Ustad Mannay Khan. Later on, he became a disciple of Kareem Sen, a direct descendent of Masit Khan, a celebrated tabla player from the Farukhabad gharana. In fact, he was so important that the celebrated Masitkhani baj is named after him!

Ustad Machhu Khan spent his youth in Jaipur as a court musician, but migrated during partition in 1947 to Karachi, where he spent the rest of his life. The musical legacy of Ustad Machhu Khan has sadly not been carried on by his family, as he did not teach the sitar to his children.  His only disciple, Javaid Allah Ditta, the son of the late tabla maestro Allah Ditta Khan Biharpuriya, quit playing the sitar after taking some initial training, and has since become a well-known composer. Unfortunately, none of Ustad Machhu Khan’s performances were recorded as Radio Pakistan broadcasted live at the time, and he has since been relegated to obscurity.

Sajid Khan performing

In the picture below we can see some other prominent members of the Jaipur Senia gharana, such as the two esteemed elders Ustad Ahmad Bux Khan and Ustad Muhammad Khan.

Left to right: Burhan Khan with a sitar, next to him Muhammad Khan, sitting beside Muhammad Khan is Ahmed Bux Khan with two additional gourd sitars, the rest are unknown

Ali Ayub acquired much of the following information from the descendants of Muhammad Khan, Ahmed Bux Khan’s adopted grandson, who still reside in Sindh. Their family tree can be seen below

In the above picture on the left is Burhan Khan, Ahmed Bux Khan’s maternal nephew, who is holding the sitar in a playing posture.  His family tree can be seen below

 Ustad Kabir Khan

Ustad Kabir Khan, Muhammad Khan’s great-great-grandson and one of his disciples, was the main exponent of the Senia gharana in Pakistan until only twenty years ago. He was born on 8th March 1924 in Jaipur and was taught the sitar by his father Amir Khan and his second cousin once-removed, Muhammad Khan. Kabir Khan migrated to Pakistan with his family during partition and settled in Karachi, where he became a staff artist at Radio Pakistan. He was awarded the Presidential Pride of Performance in 1996 due to his excellence as a sitar player, but passed away in 2002.

The Playing Style

The Senia Sitar playing style is the oldest and one of the most traditional instrumental styles, with their raags widely being considered to be the best-preserved.  Their emphasis on rhythmic variation as compared to the other gharanas, which often focus on the melodic side of compositions, sets them apart.  Their specialties are gats, a rhythmic composition where the musician is bound to follow a specific right hand plucking pattern.  The Jaipur Senia gharana is also the originator of the slow, stately and celebrated Masitkhani baj, as opposed to the faster Razakhani baj. The enclosed audio clip is a perfect example of their more sedate style of playing as opposed to the other sitar gharanas.

The Sitar Player and the Ice-cream Vendor

Thankfully the story of Ustad Abid Hussain Khan did not end with Ali Ayub’s interview. Ali Ayub and many others convinced him to train his son Shahid Hussain Khan to play the sitar, a decision which would have made Mian Tansen proud. Shahid Khan continues the practice of centuries old tradition of the Senia sitar players in Hyderabad, as do other members of this gharana all throughout Pakistan.


Save the Sitar is a website dedicated to promoting and preserving Pakistan’s classical music. Join our growing community to help further our cause!

Follow Save the Sitar!

Get new content delivered directly to your inbox.

We’re on social media!

Sitar Players from the Pounch district of Kashmir

The atmosphere at Bagh-e-Jinnah was electric. It almost felt as though all of Lahore was out to feast on music. It was a celebration of a centuries old tradition that was dying but certainly not dead yet. Hundreds of people were attending the December 2007 All-Pakistan Music Conference. Ali Ayub, carrying a camera and laptop, followed Dr. Lowell Lybarger into the green room.  He had forgotten all about the stinging cold air and the maddening traffic that he had encountered on his motorcycle ride to the venue. His attention was riveted by a young man at the centre of a crowd in the corner who was surrounded by fans, students, and musicians.  The star was none other than Ashraf Sharif Khan, the son of Ustad Sharif Khan. 

Much like the Indore Gharana that centered around Ustad Rais Khan, the Pounch gharana centers around one of the most famous and successful Pakistani sitar players, Ustad Sharif Khan.  While this gharana may be relatively unknown, it flourished in the court of Maharaja of Pounch, who was a connoisseur of music and played the surbahar himself.

Ustad Sharif Khan’s skills and style were defined by the fact that he was not only trained in the surbahar and the sitar by his own father and uncle, but was later the disciple of the amazing sitar player, Ustad Imdad Khan (the very first sitarist to ever be recorded and founder of the Imdadkhani sitar gharana).

After getting his initial training from his father, Ustad Sharif Khan, following in his father’s footsteps, became a disciple of Imdad Khan’s son. Later, after Partition, Ustad Sharif Khan’s family migrated to Lahore, where his son would be born. Ustad Sharif Khan, or rather Ustad Sharif Khan Pounchwaley as he went on to be known as, developed his own distinct style, which came to be known as the Sharifkhani baj, and won many prestigious awards, like the Pride of Performance.

Ustad Sharif Khan (Credit: The Friday Times)

The Playing Style

Ustad Sharif Khan developed his own baj, the Sharifkhani baj, which is quite exceptional. The baj is a blend of the Imdadkhani baj and the style of the dhrupad genre, as he was born to a family of dhrupad musicians. He was also known for using a unique mixture of the veena and the surbahar’s meend (sliding between notes),showing how his playing style was an amalgamation of all of the various techniques of the surbahar, the veena and the sitar. It is also interesting to note that even though he was taught by a member of the Imdadkhani gharana, his baj is different from that of other exponents of this gharana, as his style is more like that of his teacher’s father, Ustad Imdad Khan, than that of the newer exponents of the gharana, like Ustad Vilayat Khan. As a result, his performances are much less influenced by the khyal vocal genre, and are far more austere as compared to those of the newer Imdadkhani exponents.

The Poonch Gharana in the Twenty First Century

Initially Ashraf Sharif Khan found it hard to establish his own separate identity. However, his hard work and training have led him to make his mark. He has amalgamated Ustad Vilayat Khan’s lyricism with khayal ang to carve out his own legacy. He is currently carrying on his father’s legacy by teaching the sitar at Oslo.


Save the Sitar is a website dedicated to promoting and preserving Pakistan’s classical music. Join our growing community to help further our cause!

Follow Save the Sitar!

Get new content delivered directly to your inbox.

We’re on social media!