Skip to main content

Audiolize your data

Project description

audiorepr

A python package to represent data using musical notes.

Documentation Status

Installation

pip install audiorepr

Examples

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"])
  • By default, we use a min-max mapper to map the data onto midi notes 16 to 96. You can easily write your own mapper or simply map your own data on to the range [0, 126].
  • The specified pandas dataframe columns will be mapped onto different tracks.
  • audiolize.audiolizer also accepts numpy array or list as data input.

Play the output midi file using the player of your choice.

  • timidity(Mac, Win, Linux): a midi play in your terminal.
  • GarageBand(Mac): free software by Apple. GarageBand allows you to change tune the audio by changing the volumes, instruments, tempo, etc.

Documentation

[WIP]

Development

  1. Create a new environment: conda create -n audiorepr python=3.7 pip
  2. Instal requirements: pip install -r requirements

Generate Documentation

The documentation is generated through sphinx.

  1. cd docs
  2. make html

The generated documentation is located inside build/html.

To update the documentation, update the .rst files in the source folder.

Publishing

Publishing to PYPI service:

  1. Run python setup.py sdist bdist_wheel
  2. Test upload: python -m twine upload --repository testpypi dist/*
  3. Upload:
    python -m twine upload dist/*
    

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

audiorepr-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

audiorepr-0.0.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file audiorepr-0.0.2.tar.gz.

File metadata

  • Download URL: audiorepr-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.6

File hashes

Hashes for audiorepr-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cf7cf990e96a027876fa69f0d9d10dd4e0dc3a61597c82ad5586c1d88127a2de
MD5 abacbd1ff0c74825729888d58fa20d9f
BLAKE2b-256 1a8a44a8db64adef2a2f14cac5e24033d987a83d28173ab1ff996bfec051dfda

See more details on using hashes here.

File details

Details for the file audiorepr-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: audiorepr-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.6

File hashes

Hashes for audiorepr-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13dceff3547622a6841855c4a20cb3fe265f6bd5fa60606ee907694e38ef345c
MD5 0ffa5d720f180dc8093fdb83f94174f4
BLAKE2b-256 856fa6f03bb8fa04efb6b03b93affc527a0b674073ae726a10ded378bcde1ccb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page