Skip to main content

A package for exploring the fundamentals of how we define music.

Project description

crazy-piano

Assists in the exploration of how we define music. Currently generates a set of frequencies for any number of notes in an octave. 10-keys-per-octave keyboard? Why not!

Installation (with pip)

pip install crazy-piano

Functionality

List of Functions

  • compute_frequencies(m=12, f0=440, base=2, low_thresh=20, high_thresh=8000): Generates a set of frequencies corresponding to different numbers of notes per octave. Based on a modified version of the formula for computing frequencies in an octave.
    • m: The number of steps in an octave. 12 is standard.
    • f0: Baseline frequency. 440 Hz is conventional starting point for A4 pitch.
    • base: The base of growth for frequencies. Determines how fast the frequencies increase.
    • low_thresh: The lowest frequency allowed. 20 Hz is low limit of human hearing.
      • When low_thresh is met, still finishes the octave. i.e. If the 3rd note of an octave is below low_thresh, will still return the 1st and 2nd notes of that octave.
    • high_thresh: The highest frequency allowed. 8000 Hz traditionally the 8th octave.
      • When high_thresh is met, still finishes the octave. i.e. If the m-2 note of an octave is above high_thresh , will still return the m-1 and m notes of that octave.

Ideas for more? Create an issue, or email mikealtonji@gmail.com with feedback.

Usage

Creates a pandas dataframe containing the frequencies for each note, where 440 Hz is the base value. Uses default values for low and high frequency cut-offs.

from crazy_piano import compute_frequencies
keyboard_10_notes = compute_frequencies(m=10)

Output Dataframe Columns

Octave: f0 is the reference point. It is the 0th note of the 0th octave. Octaves lower are negative, and larger are positive. Integer. Note Number: f0 is the reference point. It is the 0th note of any octave. The largest Note Number is therefore m-1. Integer. Frequency (Hz): The frequency corresponding to the Octave and Note Number, in Hertz. Float.

Contributors

  • Michael Altonji Interested in collaborating? Email mikealtonji@gmail.com, or submit issues for features you'd like to see in the future!

License

MIT License

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

crazy-piano-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

crazy_piano-0.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file crazy-piano-0.0.1.tar.gz.

File metadata

  • Download URL: crazy-piano-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.38.0 CPython/3.7.3

File hashes

Hashes for crazy-piano-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f2c84fca12f1fd0f61d368fa480b44a788de27192996a1baab9e3a98e255d90b
MD5 eaf42d2024327a9cce561f62a36d73a8
BLAKE2b-256 9c62dc667c69c1008c104bcd46512302d01ee7fa535ee9fa462e56077040e7c3

See more details on using hashes here.

File details

Details for the file crazy_piano-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: crazy_piano-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.6.0 requests-toolbelt/0.8.0 tqdm/4.38.0 CPython/3.7.3

File hashes

Hashes for crazy_piano-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a221e516690ef83bf46d8b6a4ed0e2e7bf70ece2ea0b34f3a548fbd22d956dd1
MD5 34563ee1efee15884b5c15b4a2bcd76e
BLAKE2b-256 55eb8af1d8082bc1a37ace2f34ec25f1d30d0580ee3bbfc5d5195aa126e3ac7d

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