Caution

You're reading the documentation for a development version. For the latest released version, please have a look at 0.11.0.

librosa.display.ChromaSvaraFormatter

class librosa.display.ChromaSvaraFormatter(Sa=None, mela=None, abbr=True, unicode=True)[source]

A formatter for chroma axes with svara instead of notes.

If mela is given, Carnatic svara names will be used. Otherwise, Hindustani svara names will be used. If Sa is not given, it will default to 0 (equivalent to C).

Parameters:
Safloat or None

The MIDI note number corresponding to Sa. If None, defaults to 0 (C).

melastr, int, or None

For Carnatic svara, the index or name of the melakarta raga. If None, Hindustani svara names are used.

abbrbool

If True, use abbreviated svara names.

If False, use full svara names.

unicodebool

If True, use unicode symbols for accidentals.

If False, use ASCII symbols for accidentals.

See also

ChromaFormatter
__init__(Sa=None, mela=None, abbr=True, unicode=True)[source]

Methods

__init__([Sa, mela, abbr, unicode])

create_dummy_axis(**kwargs)

fix_minus(s)

Some classes may want to replace a hyphen for minus with the proper Unicode symbol (U+2212) for typographical correctness. This is a helper method to perform such a replacement when it is enabled via :rc:`axes.unicode_minus`.

format_data(value)

Return the context-independent string representation of a single value.

format_data_short(value)

Return a short string representation of value for the mouseover tooltip (the coordinate display in the interactive figure window).

format_ticks(values)

Return the tick label strings for all values.

get_offset()

set_axis(axis)

set_locs(locs)

Set the locations of the ticks.

Attributes

axis

locs

[Deprecated]

Sa

mela

abbr

unicode