A python package to represent data using musical notes.
MIT License
A python package to represent data using musical notes.
pip install audiorepr
Demo in examples/covid19.py
.
import pandas as pd
from audiorepr import audiolize
ecdc = "https://gist.githubusercontent.com/emptymalei/90869e811b4aa118a7d28a5944587a64/raw/1534670c8a3859ab3a6ae8e9ead6795248a3e664/ecdc%2520covid%252019%2520data"
df = pd.read_csv(ecdc)
audiolize.audiolizer(df, target="ecdc-covid19-by-date.midi", pitch_columns=["DE", "AT", "FR"])
audiolize.audiolizer
also accepts numpy array or list as data input.Play the output midi file using the player of your choice.
Mac
, Win
, Linux
): a midi play in your terminal.Mac
): free software by Apple. GarageBand allows you to change tune the audio by changing the volumes, instruments, tempo, etc.conda create -n audiorepr python=3.7 pip
pip install -r requirements
The documentation is generated through sphinx.
cd docs
make html
The generated documentation is located inside build/html
.
To update the documentation, update the .rst
files in the source
folder.
Publishing to PYPI service:
python setup.py sdist bdist_wheel
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*