Skip to main content

A language for harmonic analysis and roman numerals.

Project description

Harmalysis

A language for encoding roman numeral analysis

Quick start

The easiest way to test the language is to download the pip package

pip install harmalysis

and try the harmalysis interpreter

python -m harmalysis

Try some entries in the interpreter. Here is a quick reference of possible annotations.

Quick reference

# Using the default key (C Major)
I           # C Major triad
IV          # F Major triad
V7          # G Dominant seventh chord
# Using a reference key
a:i         # A Minor triad
a:viio7     # G# Fully-diminished seventh chord
a:VI        # F Major triad
# Establishing a new key
I           # C Major triad
iii         # E Minor triad
V7/V        # D Dominant seventh chord
G=>:I       # G Major triad
IV          # C Major triad
ii7         # A Minor seventh chord
V           # D Major triad
# Use of special chords and inversions
f=>:i       # F Minor triad
viio7/ii    # F# Fully-diminished seventh chord
iio         # G Diminished triad
V43/V       # G Dominant seventh chord, second inversion
V6          # C Major triad, first inversion
V7          # C Dominant seventh chord
i           # F Minor triad
V6/N        # Db Major triad, first inversion (Dominant of the Neapolitan)
N           # Gb Major triad (Neapolitan of F Minor, root position)
i           # F Minor triad

Guideline

The 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 chords

The syntax of a tertian chord is based mainly on the definition of a key, scale degree, added intervals, and an inversion.

Other features like missing intervals and alternative notations are also available.

Key

Keys 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:I

A first degree major triad, I, in the context of F 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 of F Major.

The second annotation corresponds to a IV degree in F Major, namely, Bb Major.

  • Tonicized key: The tonicized key is the key from which the roman numeral is interpreted

Example:

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 multiple levels of tonicization (e.g., the V/V/V annotation), 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, harmalysis keeps 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 symbols I-VII and i-vii
  • The notation for roman numerals is case sensitive
  • They are case sensitive because they provide two assets of information
    • The root of the chord with respect to a key, given by the roman numeral itself, and,
    • The quality of the third accompanying that root, given by the case of the roman numeral

For example:

I - The root is the first degree of the establshed key, and it is accompanied by a major third

i - The root is the first degree of the establshed key, and it is accompanied by a minor third

It 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?

Triads

By default, the fifth of the chord is a perfect fifth.

Major and minor triads

Therefore, 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 major
i    # c minor

Augmented triads

Augmented triads are denoted by the + symbol after the scale degree.

c:III+    # Eb augmented triad

Augmented 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 an augmented fifth instead of a perfect fifth.

Diminished triads

Diminished triads are denoted by the o symbol after the scale degree.

c:viio    # B diminished triad

Diminished triads are only accepted when the scale degree is lower cased. That is, it implies a minor triad. In this context, the o can be interpreted as a diminished fifth instead of a perfect fifth.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harmalysis-0.9.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

harmalysis-0.9.1-py2.py3-none-any.whl (38.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file harmalysis-0.9.1.tar.gz.

File metadata

  • Download URL: harmalysis-0.9.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for harmalysis-0.9.1.tar.gz
Algorithm Hash digest
SHA256 610086a87099a8e379a005cb6935cfea9a7c3c7854f9ec0584b529a3b80580f8
MD5 d4bb42213e3729c9aefa62809848cbc7
BLAKE2b-256 6b341a5335e0d2298cfd98a683b91eeedf1b532fabb1852f6ed991ce2c48b9aa

See more details on using hashes here.

File details

Details for the file harmalysis-0.9.1-py2.py3-none-any.whl.

File metadata

  • Download URL: harmalysis-0.9.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for harmalysis-0.9.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bc2414798b37228804e607dc69565b8db28ea655eba1a1d4870b93bd5108280d
MD5 2be622e7f0f4883aa9540502c49d2a92
BLAKE2b-256 079617cdaa212dab06364e0dfa0d9705933aeab417c530ca7d4ecb38d75a3174

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page