Previous topic

music21.key

Next topic

music21.layout

Table Of Contents

Table Of Contents

This Page

music21.languageExcerpts.naturalLanguageObjects

Module docs...

Functions

music21.languageExcerpts.naturalLanguageObjects.generateLanguageDictionary(languageString)
music21.languageExcerpts.naturalLanguageObjects.toChord(pitchArray, languageString)

Converts a list of strings to a music21.chord.Chord object given a language

Supported languages are Dutch, French, German, Italian, and Spanish

Unsupported strings default to pitch C Naturual

>>> languageExcerpts.naturalLanguageObjects.toChord(["Es","E","Eis"], "de")
<music21.chord.Chord E- E E#>
music21.languageExcerpts.naturalLanguageObjects.toDuration()

TODO: Everything

music21.languageExcerpts.naturalLanguageObjects.toNote(pitchString, languageString)

Converts a string to a music21.note.Note object given a language

Supported languages are Dutch, French, German, Italian, and Spanish

Defaults to C Naturual

>>> languageExcerpts.naturalLanguageObjects.toNote("Es", "de")
<music21.note.Note E->
>>> languageExcerpts.naturalLanguageObjects.toNote("H", "de")
<music21.note.Note B>
>>> for i in ['As','A','Ais']:
...     print(languageExcerpts.naturalLanguageObjects.toNote(i, "de"))
<music21.note.Note A->
<music21.note.Note A>
<music21.note.Note A#>
music21.languageExcerpts.naturalLanguageObjects.toPitch(pitchString, languageString)

Converts a string to a music21.pitch.Pitch object given a language.

Supported languages are Dutch, French, German, Italian, and Spanish

Defaults to C natural

>>> languageExcerpts.naturalLanguageObjects.toPitch("Es", "de")
<music21.pitch.Pitch E->
>>> languageExcerpts.naturalLanguageObjects.toPitch("H", "de")
<music21.pitch.Pitch B>
>>> for i in ['As','A','Ais']:
...     print(languageExcerpts.naturalLanguageObjects.toPitch(i, "de"))
A-
A
A#