Skip to main content

A package containing a Markov Chain trained to generate chord progressions.

Project description

Introduction

This python module was born after a week of experiments with the pomegranate library, that offers a nice implementation of a Markov chains (https://github.com/jmschrei/pomegranate), and the Beatles chords library, that contains chord annotations of the discography of the band The Beatles (the original database can be found here: http://isophonics.net/content/reference-annotations-beatles). The result is an easy to install module, that can be reused by anyone that want to experiment with automatic music composition and chord generation.

Installation

The package can easily be installed using the pip package manager.

pip install beatles_chords_markov_chain

Notation

In order to represent a chord progression, without being constrained to a particular scale or mode, a symbolic approach using intervals is employed.

# the roman notation is used to represent the chords of a generic mode
chord_notation = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII']

Usage

The trained markov chain contained in the module, is able to generate sequences of variable lenghts. A generated sequence is a list of symbols that can be used to create interesting chord progressions based on the style of The Beatles.

from beatles_chords_markov_chain import chords_markov_chain
number_of_chords = 6
chords_for_your_next_song = chords_markov_chain.sample(number_of_chords)

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

beatles_chords_markov_chain-0.0.20.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

beatles_chords_markov_chain-0.0.20-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file beatles_chords_markov_chain-0.0.20.tar.gz.

File metadata

  • Download URL: beatles_chords_markov_chain-0.0.20.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for beatles_chords_markov_chain-0.0.20.tar.gz
Algorithm Hash digest
SHA256 e8a426b4709198666398dec26575fc84cf67c71392dd267d1a9857d143587859
MD5 3b4591abc29e22520be7b27219973aea
BLAKE2b-256 defcc13108f57feea329103c5cfdfc1d3d2a6b12b76fd642ceb0a91a5d625bc0

See more details on using hashes here.

File details

Details for the file beatles_chords_markov_chain-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: beatles_chords_markov_chain-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for beatles_chords_markov_chain-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 267e896061c52b06a1bc3e8965224b3eb294df341d98b12b0b972e8922a3f244
MD5 dd679cc124782e018b3c0f43feba0154
BLAKE2b-256 c96c46706326cdd1049afcee3030732ca0301ffefa003d07c2181b5fcdef0f67

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