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
Built Distribution
File details
Details for the file beatles_chords_markov_chain-0.0.23.tar.gz
.
File metadata
- Download URL: beatles_chords_markov_chain-0.0.23.tar.gz
- Upload date:
- Size: 17.4 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d440600c0cc873c2714a0c7129ade3cc13dc929cf213ad3e832141cfda5abac |
|
MD5 | d804923fc1f7934414b102ef0c5be35c |
|
BLAKE2b-256 | da377a4f836a805e6fa7421352dbdec58c1f831603907b874904dfeccebfc5ae |
File details
Details for the file beatles_chords_markov_chain-0.0.23-py3-none-any.whl
.
File metadata
- Download URL: beatles_chords_markov_chain-0.0.23-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02fe8d90cfc55d4019a08bf97b623af88483dcddb473285d69f2bbac8adbba4f |
|
MD5 | 2174774addae25698c6a733085fc1300 |
|
BLAKE2b-256 | 235ab509a7d86aefcabeb870dcec6333c3c81afbcdc5d9a612c8d689353ffa09 |