Skip to main content

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)

  1. Download and install the latest version of Python.

  2. Download the CreativePython Setup Script.

  3. Open creativePythonSetup.py with IDLE, Python's Integrated Development Learning Environment.

  4. From the IDLE toolbar, select Run, then Run Module.

  5. CreativePython will check for its requirements on your system, download any missing requirements, and install its libraries.

  6. When you see [CreativePython Setup]: CreativePython installed successfully., you're all done! You're ready to start using CreativePython.

NOTE: You can use the setup script in any Python3 environment - not just IDLE!

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

Importing Libraries

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: The first time 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 in interactive mode:

python -i playNote.py

If this is the first time you've used CreativePython, it will ask to download a soundfont.

After you do, you should hear a single C4 half-note.

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

creativepython-0.1.3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

creativepython-0.1.3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file creativepython-0.1.3.tar.gz.

File metadata

  • Download URL: creativepython-0.1.3.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

Hashes for creativepython-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6e1e58db14c3ee76c5f9704d4649a18a1f4e0130955de5cad5acd06c76d10a1a
MD5 e94e2c31322b5404bb38dbcd12f0ed2b
BLAKE2b-256 9167d224746fe777a591979c3317261344b669aac7e0fcdb9b4462e2939b0744

See more details on using hashes here.

File details

Details for the file creativepython-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: creativepython-0.1.3-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

Hashes for creativepython-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 331eed0f53371300523d1b9c0e112cff3d4d39dca6e4525ef9842a8d19cffa63
MD5 44f404b755f5aa5c6f3df03f10ac9de4
BLAKE2b-256 bb44c2cdcc13c33555a631783ca042fc3a0ba0183d8e309c55c4472251eae46d

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