A Python-based software environment for developing algorithmic art projects.
Project description
CreativePython
CreativePython is a Python-based software environment for learning and developing algorithmic art projects. It mirrors the JythonMusic API, and is powered by PySide6 and portaudio.
CreativePython is distributed under the MIT License.
This package is still under development.
Beginner Installation (IDLE)
Download and install the latest version of Python.
Download the CreativePython IDLE Install Script.
Open the .py script with IDLE, Python's Integrated Development Learning Environment. From the toolbar, select Run, then Run Module.
CreativePython will ask permission to download a high-quality soundfont (FluidR3 G2-2.sf2) for you. IMPORTANT: type yes in the IDLE Shell and hit enter. Without a soundfont, CreativePython can't produce MIDI sounds.
Custom Installation
Windows
Install CreativePython using pip:
python -m pip install CreativePython
MacOS
Use Homebrew to install the prerequisite portaudio library, then install CreativePython using pip:
brew install portaudio
pip install CreativePython
Linux
Use apt, or your preferred package manager, to install the prerequisite portaudio library, then install CreativePython using pip:
sudo apt-get portaudio
pip install CreativePython
Using CreativePython
import
CreativePython's core modules are the music, gui, image, timer, osc, and midi libraries. You can import these libraries into your python code using:
import music
from music import *
from music import Note, Play, C4, HN
Or a similar statement. CreativePython includes a number of useful constants, so we recommend using wildcard imports like from music import *.
NOTE: When you import music, CreativePython will ask permission to download a high-quality soundfont (FluidR3 G2-2.sf2) for you. You should only have to do this once.
running CreativePython programs
CreativePython is designed for use in Python's Interactive Mode. To use Interactive Mode, enter a command like:
python -i <filename>.py
Example
Download playNote.py:
# playNote.py
# Demonstrates how to play a single note.
from music import * # import music library
note = Note(C4, HN) # create a middle C half note
Play.midi(note) # and play it!
In a terminal, run the code using:
python -i playNote.py
If this is the first time you've used CreativePython, it will ask to download a soundfont.
After that, you should hear a single C4 note.
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
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 creativepython-0.1.1.tar.gz.
File metadata
- Download URL: creativepython-0.1.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c11406e5f1972d4774e039d9ee066acd826a24d51f198cb01ee80f7cdb0b0f8
|
|
| MD5 |
077d0b081cd920f688a737529618e3cd
|
|
| BLAKE2b-256 |
d50366194aee83a3908651f24d2b1540c71394b27dcbcec3a7c3ab9ace949ca4
|
File details
Details for the file creativepython-0.1.1-py3-none-any.whl.
File metadata
- Download URL: creativepython-0.1.1-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1558f4e4755dac02c9b8af76e3211e923d9fc2d12d4a8331aff54ad443d91130
|
|
| MD5 |
bb3fe96e942cea0893845803f63455c4
|
|
| BLAKE2b-256 |
3bbe6d83f4784f8a484e8d7414f7df0dd9880456a8af9d664b36885d353bdd1a
|