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.note_to_svara_c
- librosa.note_to_svara_c(notes, *, Sa, mela, abbr=True, octave=True, unicode=True)[source]
Convert western notes to Carnatic svara
Note that this conversion assumes 12-tone equal temperament.
- Parameters:
- notesstr or iterable of str
Notes to convert (e.g., ‘C#’ or [‘C4’, ‘Db4’, ‘D4’]
- Sastr
Note corresponding to Sa (e.g., ‘C’ or ‘C5’).
If no octave information is provided, it will default to octave 0 (
C0
~= 16 Hz)- melastr or int [1, 72]
Melakarta raga name or index
- 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.
If False, use low-order ASCII (’ and ,) for octave decorations.
This only takes effect if octave=True.
- Returns:
- svarastr or np.ndarray of str
The svara corresponding to the given notes
Examples
>>> librosa.note_to_svara_h(['C4', 'G4', 'C5', 'D5', 'G5'], Sa='C5', mela=1) ['Ṣ', 'P̣', 'S', 'G₁', 'P']