A small python package for generating music.
Reason this release was yanked:
this version throws a runtime error (ew) on silent notes
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.
Installation
You can install it via pip. It requires numpy. Probably not compatible with python <= 3.6.
python3 -m pip install jc3000
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jc3000-0.0.6.tar.gz
.
File metadata
- Download URL: jc3000-0.0.6.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d70a0a2bed2c39e03672f387da8d291dd77d47695c28b8a2375d3a37e23ec911 |
|
MD5 | a71ae46a056782d0422a999cc364e484 |
|
BLAKE2b-256 | c22983eed2f8cd3b7555d74482db0a401181da4bd70e8aa35ccbc44159192c2a |
File details
Details for the file jc3000-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: jc3000-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb33b24d2649474f57c04c125cab7257838ce6c6793f3b0702728e4b77ff9c01 |
|
MD5 | 80a31e6b5c39eb89b98e5f1bd25149e5 |
|
BLAKE2b-256 | d60a7b74f1c7d85c7894990c2c039c787c5d02645589f7747cb1d04f135cb2b5 |