Skip to main content

Python library for MIDI music creation

Project description

Documentation Status Tests Status

Melodia is a Python library for MIDI music creation.

It provides four core concepts – tone, time signature, note and track and various abstractions built on them, such as chords and chord progressions. Library contains MIDI writer which allows to output tracks to MIDI files in order to export them to any DAW.

Installation

Melodia is fully typed and requires Python 3.7 or greater.

pip install melodia

Documentation

Documentation is available at melodia.readthedocs.io.

Example

from melodia.core.track import Track
from melodia.music import chord
from melodia.io import midi

track = Track(signature=(4, 4))

track.add(chord.maj('C3', (1, 1)))
track.add(chord.maj('D3', (1, 1)))
track.add(chord.min('A3', (1, 1)))
track.add(chord.maj7('G3', (1, 1)))

with open('chords.mid', 'wb') as f:
    midi.dump(track, f)
Ableton Live 10 with imported 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

melodia-1.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

melodia-1.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file melodia-1.1.tar.gz.

File metadata

  • Download URL: melodia-1.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for melodia-1.1.tar.gz
Algorithm Hash digest
SHA256 6421fe6ac9d4bde0069174aa2b7ef8a6ae887955884fd98d58ba7775d76a718d
MD5 3b4718f9b51291d61c787cd8653ed9e0
BLAKE2b-256 6af5588ec731092430aae2c904b94337d8184a51dc633946e1fef95147cdd17d

See more details on using hashes here.

File details

Details for the file melodia-1.1-py3-none-any.whl.

File metadata

  • Download URL: melodia-1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

File hashes

Hashes for melodia-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b2c9e989f9ed1c553efb9693a000026e125ad21aca74a907d688272ba3e5e50
MD5 6b6673439e7fe9268268bfbd4654cdd4
BLAKE2b-256 3d1c119bd9b158d5a4b4993636b8574e1d243c3f1aea44453d2e0a00dcc850d1

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