Ragabot

Indian classical (hindustani) music has some structure to a composition in raaga.

Notations

following saptak represents shuddha swaras in madhya saptak

Composition in Raga

We will represent our composition in csv file format as given below

SA,SA,Dha,Pa,Ga,Re,Sa,Re,Ga$,Pa,Ga,Dha,Pa,Ga$
Ga,Pa,Dha,SA,RE,SA,Dha,Pa,SA,Pa,Dha,Pa,Ga,Re,Sa$
Ga,Ga,Pa,Dha,Pa,SA,SA$,Dha,Dha,SA,RE,GA,RE,SA,Dha
GA,GA,RE,SA,RE,RE,SA,Dha,SA,Pa,Dha,Pa,Ga,Re,Sa$

probabilities of what follows!

      ____   Pa (0.1)     ____ Ga (0.5)
     / ___   Ga (0.1)    /
    / / __   Re (0.3)--------- Sa (0.4)
   / / /                 \____ dha (0.1)
  / / /
Sa -------  Sa (0.2)
  \ \ \
   \ \ \__  dha (0.25)
    \ \___  pa (0.04)
     \____  ga (0.01)

Generating these probabilities

sampling

to generate new notations from probabiities we will need a reverse function which can find notations given the probabilities

Lets generate actual tune!

How do we know it is bhoop?

pakad for bhoop raag is

pakad = (('dha', 'dha', 'Sa'),('Ga','Re','Pa','Ga'),('Dha','Pa','Ga','Re'))

we will search for it

``` deque append is working like this

| | | | | | | |

```