Toolkit with music synthesis and analysis tools for python.
Project description
pymusicbox
A library with toolkits for music synthesis and analysis. This is a work in progress.
Current Features
- Symbolic language to represent notes and tracks
- Create instruments with sine oscilators and harmonics
Installation
pip install pymusicbox
Example Usage
from pymusicbox.synth.instrument.oscillator import HarmonicOscillator, HarmonicsConfiguration
from pymusicbox.symbolic.symbols import Note, NoteEvent, Track
track = Track(events=[
NoteEvent(time=0, note=Note(pitch='C', octave=3, length=1, velocity=100)),
NoteEvent(time=1, note=Note(pitch='D', octave=3, length=1, velocity=80)),
NoteEvent(time=2, note=Note(pitch='E', octave=3, length=1, velocity=90)),
NoteEvent(time=2, note=Note(pitch='A', octave=3, length=1, velocity=100)),
NoteEvent(time=3, note=Note(pitch='A', octave=3, length=1.8, velocity=110)),
NoteEvent(time=3, note=Note(pitch='D', octave=2, length=1.8, velocity=110)),
])
harmonics = HarmonicsConfiguration(attack=0.1, decay=0.2, release=0.2, sustain_factor=0.6)
oscillator = HarmonicOscillator(harmonics=harmonics)
audio = oscillator.render_track(track)
audio.write('output.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
pymusicbox-0.0.3.tar.gz
(5.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymusicbox-0.0.3.tar.gz.
File metadata
- Download URL: pymusicbox-0.0.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
576485dedce5cb49b04f8618c4080510216437ec30a56d4c6a793885e9c531fa
|
|
| MD5 |
1409f356443a3c19810e2d3d0851495a
|
|
| BLAKE2b-256 |
7d35f3545e3260e022332090ab2722fe20a54ae2fdfdebb9ce6ff4fbb003f34c
|
File details
Details for the file pymusicbox-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pymusicbox-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26470ad25962179881cf9176315225cdb45f62d53b5967da89cb1845983134fd
|
|
| MD5 |
2cb9ffe8b30333b61c3853995a7b5e90
|
|
| BLAKE2b-256 |
fc90dad14a90833ba12c3a2a84478fdf336bdd627105d5194e6323a723cf8827
|