Caution
You're reading an old version of this documentation. If you want up-to-date information, please have a look at 0.9.1.
librosa.note_to_svara_h¶
- librosa.note_to_svara_h(notes, Sa, abbr=True, octave=True, unicode=True)[source]¶
Convert western notes to Hindustani svara
Note that this conversion assumes 12-tone equal temperament.
- Parameters
- notesstr or list 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)- abbrbool
If True (default) return abbreviated names (‘S’, ‘r’, ‘R’, ‘g’, ‘G’, …)
If False, return long-form names (‘Sa’, ‘re’, ‘Re’, ‘ga’, ‘Ga’, …)
- 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 list of str
The svara corresponding to the given notes
Examples
>>> librosa.note_to_svara_h(['C4', 'G4', 'C5', 'G5'], Sa='C5') ['Ṣ', 'P̣', 'S', 'P']