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
Release files for ragamala 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ragamala-0.1.1.tar.gz | 30.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ragamala-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.5 kB
Release files / ragamala-0.1.1.tar.gz
| Download URL | ragamala-0.1.1.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d05ca4765f76e7656ba78cf592c16086104333393d4d93a890212be5ee02e24b
|
|
BLAKE2b-256 checksum How to use checksums |
366da33d5c3f6e79177a283b9f3f734e885ad5e46376afed5af44fb0d2a2f01f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency logRelease files / ragamala-0.1.1-py3-none-any.whl
| Download URL | ragamala-0.1.1-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8759c05caaabf3f34f699eba6f4b11959ffd18b0dc877e93ed10e387d4d6c530
|
|
BLAKE2b-256 checksum How to use checksums |
08638fbd8e0a7fcbc06975ec64a03f459c4bcfe72611e9acceb9d9ceb4010067
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 26, 2026.
Transparency log