Skip to main content

Network transition chord progressions

Project description

Chord Progression Network

Network transition chord progression generator

DESCRIPTION

This class generates network transition chord progressions. The transitions are given by a net of scale positions, and the chord "flavors" are defined by a chord_map of types. The chords that are returned are either named chords or lists of three or more named notes with octaves.

The chord types are as follows:

'' (i.e. an empty string) means a major chord.
'm' signifies a minor chord.
'7' is a seventh chord and 'M7' is a major 7th chord.
'dim' is a diminished chord and 'aug' is augmented.
'9', '11', and '13' are extended 7th chords.
'M9', 'M11', and 'M13' are extended major-7th chords.
'm9', 'm11', and 'm13' are extended minor-7th chords.

For the major scale (ionian mode), this chord_map is ['', 'm', 'm', '', '', 'm', 'dim']. The dorian mode is ['m', 'm', '', '', 'm', 'dim', '']. A chromatic scale is all minors. This can be set in the constructor, or seen by printing it after Generator construction.

The tonic attribute means that if the first chord of the progression is being generated, then for 0 choose a random successor of the first chord, as defined by the net attribute. For 1, return the first chord in the scale. For any other value, choose a random value of the entire scale.

The resolve attribute means that if the last progression chord is being generated, then for 0 choose a random successor. As for the tonic, for 1, return the first chord in the scale, and for any other value, choose a random value of the entire scale. In all other cases (i.e. the middle chords of the progression), choose a random successor.

By default, all chords and notes with accidentals are returned as sharps. If you want flats, set the flat attribute to True in the constructor.

If the substitute attribute is set to True, then the progression chords are subject to extended, "jazz" chord, including tritone substitution. For now, for this work-in-progress advanced option, please see the substitution() method in the source...

SYNOPSIS

from chord_progression_network import Generator

g = Generator( # defaults
    max=8,
    scale_note='C',
    scale_name='major',
    octave=4,
    net={
        1: [1, 2, 3, 4, 5, 6],
        2: [3, 4, 5],
        3: [1, 2, 4, 6],
        4: [1, 3, 5, 6],
        5: [1, 4, 6],
        6: [1, 2, 4, 5],
        7: [],
    },
    chord_map=[ '', 'm', 'm', '', '', 'm', 'dim' ],
    tonic=1,
    resolve=1,
    flat=False,
    chord_phrase=False,
    substitute=False,
    verbose=False,
)
phrase = g.generate()

MUSICAL EXAMPLE

from music21 import chord, stream
from chord_progression_network import Generator

g = Generator(verbose=True)
phrase = g.generate()

s = stream.Score()

for chord in phrase:
    s.append(chord.Chord(chord, type='whole'))

s.show()

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

chord_progression_network-0.1.1.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chord_progression_network-0.1.1-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file chord_progression_network-0.1.1.tar.gz.

File metadata

File hashes

Hashes for chord_progression_network-0.1.1.tar.gz
Algorithm Hash digest
SHA256 49ceb4dad1d53ac50a41374a23b8d3ead476a982c76f738d0b0ab9c368a119b7
MD5 924d50e957ee801cbcd293a9c8f8e4a5
BLAKE2b-256 03921a14423989aa2384f74aa0faa4adb737429a49e3f3080c9115465da31bbe

See more details on using hashes here.

File details

Details for the file chord_progression_network-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chord_progression_network-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d843e9cde7eac3bb1739306d330699f396476d5bfe5e6a7523f581f14ac36a2
MD5 9412dd8b0b24c87f50109ed64e2b45a0
BLAKE2b-256 c01d13dcb43f10a276bad4b5d90468d0b18f7968a624f092f01f882b15402c07

See more details on using hashes here.

Supported by

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