Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekzhang/harmony
🎶 Generate four-part harmony following idiomatic voice-leading procedures with DP!
https://github.com/ekzhang/harmony
chorale dynamic-programming harmony music-generation procedural-generation voice-leading
Last synced: about 1 month ago
JSON representation
🎶 Generate four-part harmony following idiomatic voice-leading procedures with DP!
- Host: GitHub
- URL: https://github.com/ekzhang/harmony
- Owner: ekzhang
- License: bsd-3-clause
- Created: 2018-12-29T02:48:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T17:58:31.000Z (over 1 year ago)
- Last Synced: 2024-05-02T00:54:10.616Z (5 months ago)
- Topics: chorale, dynamic-programming, harmony, music-generation, procedural-generation, voice-leading
- Language: Python
- Homepage: https://autoharmony.herokuapp.com
- Size: 102 KB
- Stars: 44
- Watchers: 6
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Harmony
Generate four-part harmony following idiomatic voice-leading procedures with DP!
```python
>>> voiceProgression('B-', 'I I6 IV V43/ii ii V V7 I')
```![Four-part harmony](https://i.imgur.com/9bl7V5t.png)
See the web interface at [autoharmony.herokuapp.com](https://autoharmony.herokuapp.com/). This was built with [Music21](https://github.com/cuthbertLab/music21).
## Usage
First, install and activate dependencies managed by [Pipenv](https://github.com/pypa/pipenv).
```shell
$ pipenv install
$ pipenv shell
```To generate a chorale:
```shell
$ python voicing.py
```Then, create a fresh Postgres database. Tables will be created on first application run. To launch the development web server:
```shell
$ FLASK_APP=app.py FLASK_DEBUG=1 DATABASE_URL= flask run
```To launch the production web server:
```shell
$ DATABASE_URL= WEB_CONCURRENCY=2 gunicorn app:app
```## License
Licensed under the [BSD 3-Clause License](LICENSE.txt).