Skip to content
A generative model for Indian classical music using finite state machines
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A generative model for Indian Carnatic music using Finite State Machines. While, obviously, more sophisticated models could be built for generating (Indian classical) music, it is worth noting that this non-neural-network based approach is a plausible baseline at the very least.

Blog post explaining the approach -

To try, install Music21 using pip and then from carnatic_fsm/carnatic_fsm run

python abhogi aadi

This would simulate a pre-generate finite state machine for abhogi raagam set to aadi taalam's rhythm, and generate a midi file to listen to and also the musical score (requires museScore to be installed). Comment out line 101 in if you just want the midi output.

Sample generated music

Music generated using this model based in abhogi raagam is available here

Music library

This repo uses Music21 to programatically construct the musical piece and save it as a score as well as in midi format.


You can’t perform that action at this time.