Package: harmalysis
HarmalysisA language for encoding roman numeral analysisQuick startThe easiest way to test the language is to download the pip packagepip install harmalysisand try the harmalysis interpreterpython -m harmalysisTry some entries in the interpreter. Here is a quick reference of possible annotations.Quick reference# Using the default key (C Major)I# C Major triadIV# F Major triadV7# G Dominant seventh chord# Using a reference keya:i# A Minor triada:viio7# G# Fully-diminished seventh chorda:VI# F Major triad# Establishing a new keyI# C Major triadiii# E Minor triadV7/V# D Dominant seventh chordG=>:I# G Major triadIV# C Major triadii7# A Minor seventh chordV# D Major triad# Use of special chords and inversionsf=>:i# F Minor triadviio7/ii# F# Fully-diminished seventh chordiio# G Diminished triadV43/V# G Dominant seventh chord, second inversionV6# C Major triad, first inversionV7# C Dominant seventh chordi# F Minor triadV6/N# Db Major triad, first inversion (Dominant of the Neapolitan)N# Gb Major triad (Neapolitan of F Minor, root position)i# F Minor triadGuidelineThe chord annotations in harmalysis can be divided in three types of chords:Tertian chords (e.g.,I,ii,V7, etc.)Special chords (e.g.,Neapolitan,German augmented sixth, etc.)Descriptive chords (e.g.,CM3D5)Tertian chordsThe syntax of a tertian chord is based mainly on the definition of akey,scale degree,added intervals, and aninversion.Other features likemissing intervalsandalternative notationsare also available.KeyKeys in the notation are divided in three categories, depending on their function:Reference key: A key given by the user as the reference key for a particular annotation.Example:F:IA first degree major triad,I, in the context ofF Major.Established key: Similar to a reference key, except that a established key becomes the new default key when no key is specified.This is the suggested notation for establishing a key at the beginning of the piece, or after a modulation.Example:F=>:I
IV # <-- The IV degree of F major (Bb major triad)The first annotation corresponds to a first degree major triad,I, in the context ofF Major.The second annotation corresponds to aIVdegree inF Major, namely,Bb Major.Tonicized key: The tonicized key is the key from which the roman numeral is interpretedExample:C=>:V/V# G Major is the tonicized key,# roman numeral is V of G Major (D Major triad)V/V/V# D Major is the tonicized key,# roman numeral is V of D Major (A Major triad)In the case of multiplelevelsof tonicization (e.g., theV/V/Vannotation), the sequence of tonicized keys are resolved recursively from right to left until a resulting key is found. This key will be the tonicized key.Nevertheless,harmalysiskeeps track of all the intermediate tonicizations and they can be retrieved from the returned object.Scale degrees (or roman numerals)Scale degrees consist of the symbolsI-VIIandi-viiThe notation for roman numerals iscase sensitiveThey are case sensitive because they provide two assets of informationTherootof the chord with respect to a key, given by the roman numeral itself, and,The quality of the third accompanying that root, given by thecaseof the roman numeralFor example:I- The root is the first degree of the establshed key, and it is accompanied by a major thirdi- The root is the first degree of the establshed key, and it is accompanied by a minor thirdIt might seem weird to denote the root of the chord and (only) its third with the scale degree.What about the fifth of the triad?TriadsBy default, the fifth of the chord is aperfect fifth.Major and minor triadsTherefore, major and minor triads can be described with only a case-sensitive scale degree (lower-case for minor, and upper-case for major triads))I# C majori# c minorAugmented triadsAugmented triads are denoted by the+symbol after the scale degree.c:III+# Eb augmented triadAugmented triads are only accepted when the scale degree is upper cased. That is, it implies a major triad. In this context, the+can be interpreted as anaugmented fifthinstead of a perfect fifth.Diminished triadsDiminished triads are denoted by theosymbol after the scale degree.c:viio# B diminished triadDiminished triads are only accepted when the scale degree is lower cased. That is, it implies a minor triad. In this context, theocan be interpreted as adiminished fifthinstead of a perfect fifth.