Hindustani raga reference tool
Project description
raga
A terminal reference tool for Hindustani classical music — look up ragas and talas, browse by time, mood, or feel, and get suggestions suited to the moment.
What is this?
Ragas and talas are the melodic and rhythmic foundations of Hindustani classical music. This tool helps you explore them: look up detailed information about any raga or tala, discover which ones suit a particular time of day or mood, and listen to audio previews. Whether you're a student learning Indian classical music, a listener discovering new ragas, or a musician planning your practice, this reference tool gives you quick access to the essential details.
Demo
Try raga suggest to get ragas suited to the current time of day:
$ raga suggest
Suggesting 3 raga(s) for afternoon
╭─────────────────────── Madhuvanti ─────────────────────╮
│ Thaat Todi │
│ Time Afternoon │
│ Mood sweet, yearning, romantic │
│ Arohana Sa Re Ga Ma♯ Pa Ni SA │
│ Avarohana SA Ni Dha Pa Ma♯ Ga Re Sa │
│ │
│ A relatively modern raga... [description continues] │
╰────────────────────────────────────────────────────────╯
Or look up a specific raga with colored notation and detailed analysis:
$ raga lookup yaman
╭─────────────────── Yaman ─────────────────────────────╮
│ Thaat Kalyan │
│ Time Evening │
│ Vadi / Samvadi Ga / Ni │
│ Mood serene, romantic, devotional │
│ Arohana Sa Re Ga Ma♯ Pa Dha Ni SA │
│ Avarohana SA Ni Dha Pa Ma♯ Ga Re Sa │
│ │
│ One of the most foundational and widely taught │
│ ragas... [description continues] │
╰────────────────────────────────────────────────────────╯
Installation
pip install ragamala
Requires Python 3.11 or later.
Quick Start
raga suggest # suggest ragas for the current time
raga lookup yaman # detailed view of one raga
raga list --mood devotional # filter by mood
tala lookup teentaal # look up a tala by name
tala list --beats 16 # filter by beat count
Optional: Audio Playback
The raga play command requires FluidSynth and a SoundFont file. The lookup, list, and suggest commands work without audio.
Install FluidSynth
# macOS
brew install fluid-synth
# Debian/Ubuntu
apt install fluidsynth
# Windows
# Download from https://github.com/FluidSynth/fluidsynth/releases
Install the audio extra
pip install ragamala[audio]
Get a SoundFont
Download a free SoundFont file (e.g., FluidR3_GM.sf2) from the FluidSynth project or MuseScore. Then pass it to raga play:
raga play yaman --soundfont /path/to/FluidR3_GM.sf2
Or set the RAGA_SOUNDFONT environment variable once:
export RAGA_SOUNDFONT=/path/to/FluidR3_GM.sf2
raga play yaman # uses the env var
Commands
raga
raga lookup <name> # look up a raga by name (fuzzy match)
raga list # list all ragas
raga list --thaat Kalyan # filter by thaat
raga list --time evening # filter by time of day
raga list --mood devotional
raga list --season spring
raga list --plain # plain text output (no color, pipe-friendly)
raga list --output ragas.txt # write plain text to a file
raga suggest # suggest ragas for the current time of day
raga suggest --time morning # suggest for a specific time
raga suggest --mood romantic # suggest by mood
raga suggest --time dusk --mood solemn --count 5
raga play <name> # play arohana+avarohana via FluidSynth
raga play <name> --sa D4 # set Sa reference pitch (default: C4)
raga play <name> --tempo 60 # set tempo in BPM (default: 80)
raga play <name> --soundfont /path/to/FluidR3_GM.sf2
tala
tala lookup <name> # look up a tala by name (fuzzy match)
tala list # list all talas
tala list --beats 16 # filter by beat count
tala list --feel stately # filter by feel
tala list --tempo vilambit # filter by tempo
tala list --plain # plain text output (no color, pipe-friendly)
tala list --output talas.txt # write plain text to a file
tala suggest # suggest talas from the full collection
tala suggest --beats 16 # suggest talas with a specific beat count
tala suggest --feel lively # suggest by feel
tala suggest --tempo drut --count 2
Shell completions
Both raga and tala support tab completion for all options and their values (raga names, thaats, times, moods, seasons, feels, tempos, beat counts).
raga --install-completion # install completion for your current shell
tala --install-completion
raga --show-completion # print the completion script (for manual setup)
tala --show-completion
Supported shells: bash, zsh, fish, PowerShell.
Reference
Raga time values
dawn · morning · afternoon · evening · dusk · night · late night · midnight · any
raga suggest defaults to the current time of day when called with no arguments.
Swara notation
Swaras are displayed with color: komal (flat) notes in yellow, tivra (sharp) Ma in magenta. Upper-octave SA is bold.
Tala theka notation
Bols prefixed with ~ are khali (unaccented) beats, rendered dim and italic.
Data
Ragas and talas are stored as JSON in src/raga/data/. To add entries, edit ragas.json or talas.json directly — no code changes needed.
Development
To contribute, first install in development mode:
pip install -e ".[dev]"
Then run tests:
python -m pytest tests/ -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ragamala-0.1.0.tar.gz.
File metadata
- Download URL: ragamala-0.1.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2889d953ef1a86b005b48de556cc18ee4eecd641fd6a7be97e2bc1ad4c5a25ba
|
|
| MD5 |
fedff24589c4e4d1ed3a93f552e50826
|
|
| BLAKE2b-256 |
e037b3f9294f1a52b13de9476b7d87058c81886f9c03ea13c34acfb6ac69176d
|
Provenance
The following attestation bundles were made for ragamala-0.1.0.tar.gz:
Publisher:
publish.yml on lukegrecki/raga
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragamala-0.1.0.tar.gz -
Subject digest:
2889d953ef1a86b005b48de556cc18ee4eecd641fd6a7be97e2bc1ad4c5a25ba - Sigstore transparency entry: 1398106359
- Sigstore integration time:
-
Permalink:
lukegrecki/raga@a781bb6dbf48b7e049a80bcb917bc1163a140573 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lukegrecki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a781bb6dbf48b7e049a80bcb917bc1163a140573 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ragamala-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ragamala-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2204419e541676248632476c43bbcccbd569fe403b803430a2a08847a32c875e
|
|
| MD5 |
8d5050d002873baf9334533cc97c8827
|
|
| BLAKE2b-256 |
83a688ce3a039c9a2d013665db78baab2f63dd55c14cd9fe96ebddbf715a8b06
|
Provenance
The following attestation bundles were made for ragamala-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on lukegrecki/raga
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ragamala-0.1.0-py3-none-any.whl -
Subject digest:
2204419e541676248632476c43bbcccbd569fe403b803430a2a08847a32c875e - Sigstore transparency entry: 1398106364
- Sigstore integration time:
-
Permalink:
lukegrecki/raga@a781bb6dbf48b7e049a80bcb917bc1163a140573 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lukegrecki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a781bb6dbf48b7e049a80bcb917bc1163a140573 -
Trigger Event:
release
-
Statement type: