Caution

You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.10.2.

librosa.midi_to_svara_c

librosa.midi_to_svara_c(midi, *, Sa, mela, abbr=True, octave=True, unicode=True)[source]

Convert MIDI numbers to Carnatic svara within a given melakarta raga

Parameters:
midinumeric

The MIDI numbers to convert

Sanumber > 0

MIDI number of the reference Sa.

Default: 60 (261.6 Hz, C4)

melaint or str

The name or index of the melakarta raga

abbrbool

If True (default) return abbreviated names (‘S’, ‘R1’, ‘R2’, ‘G1’, ‘G2’, …)

If False, return long-form names (‘Sa’, ‘Ri1’, ‘Ri2’, ‘Ga1’, ‘Ga2’, …)

octavebool

If True, decorate svara in neighboring octaves with over- or under-dots.

If False, ignore octave height information.

unicodebool

If True, use unicode symbols to decorate octave information and subscript numbers.

If False, use low-order ASCII (’ and ,) for octave decorations.

Returns:
svarastr or list of str

The svara corresponding to the given MIDI number(s)