Skip to main content

A small python package for generating music.

Reason this release was yanked:

this version has an unnecessary dependency on scipy

Project description

jc3000

A small python package for generating music. Inspired by this which was inspired by this (that's why it's called jc3000).

You can generate any notes you want based on any fundamental (the frequency of concert A in this case, fundamental as a term is used kind of loosely). You can also use either just or equal temperament.

More reading

This page has really good information on how music and scales work at the physical level.

Default sample rate is 44,100 Hz.
Default concert A is 440 Hz.

Examples

  • Play the licc
from jc3000 import Sequence

s = Sequence(fs=44100, fundamental=440, equal=True)
s.add_note('d', duration=.125)
s.add_note('e', .125)
s.add_note('f', .125)
s.add_note('g', .125)
s.add_note('e', .257)  # .257 for ~swing-iness~
s.add_note('c', .125)
s.add_note('d', .25)

s.write_file('the_licc.wav')
  • Play the C major scale with concert A set to 432 Hz.
from jc3000 import Sequence

s = Sequence(fundamental=432)

notes = ['cdefgabc']

for i, note in enumerate(notes):
    if i < 5:
        s.add_note(note)
    else:
        s.add_note(note, octave=1)
        
s.write_file('cmajor_432hz.wav')

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

jc3000-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

jc3000-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file jc3000-0.0.1.tar.gz.

File metadata

  • Download URL: jc3000-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for jc3000-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cbd5488a349642300ebea0e252e1bc7ac0e27fe85a0a853d80c0357f7587e3cd
MD5 6bad00f48840ed521360848e7d8e6687
BLAKE2b-256 5b6d3038021bc10cb311c7254475feb08992e85c47f3d76db156ab5ac33f2250

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jc3000-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.2

File hashes

Hashes for jc3000-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f6670da0881956f694175fa32a71d55327b687c813f83a3411f0bd10323a4a7
MD5 bbc7b661747c32e5fddf984dc9411c59
BLAKE2b-256 b59c3e627ea0332a430c13bd87454be6dbf2765639b6174cd427576e960ba0b9

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