CreativePython 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. creativepython-0.3.2/LICENSE +40 -0
  2. creativepython-0.3.2/LICENSE-PSF +67 -0
  3. creativepython-0.3.2/MANIFEST.in +5 -0
  4. creativepython-0.3.2/PKG-INFO +204 -0
  5. creativepython-0.3.2/README.md +134 -0
  6. creativepython-0.3.2/pyproject.toml +51 -0
  7. creativepython-0.3.2/setup.cfg +4 -0
  8. creativepython-0.3.2/src/CreativePython/__init__.py +10 -0
  9. creativepython-0.3.2/src/CreativePython/examples/.DS_Store +0 -0
  10. creativepython-0.3.2/src/CreativePython/examples/ArvoPart.CantusInMemoriam.py +76 -0
  11. creativepython-0.3.2/src/CreativePython/examples/ConcretPH_Xenakis.py +41 -0
  12. creativepython-0.3.2/src/CreativePython/examples/DeepPurple.SmokeOnTheWater.py +67 -0
  13. creativepython-0.3.2/src/CreativePython/examples/JS_Bach.Canon.TriasHarmonica.BWV1072.py +77 -0
  14. creativepython-0.3.2/src/CreativePython/examples/JS_Bach.Canon_1.GoldbergGround.BWV1087.py +39 -0
  15. creativepython-0.3.2/src/CreativePython/examples/Mozart.MusikalischesWurfelspiel.py +101 -0
  16. creativepython-0.3.2/src/CreativePython/examples/PierreCage.StructuresPourDeuxChances.py +47 -0
  17. creativepython-0.3.2/src/CreativePython/examples/RGB_Display.py +73 -0
  18. creativepython-0.3.2/src/CreativePython/examples/TerryRiley.InC.py +34 -0
  19. creativepython-0.3.2/src/CreativePython/examples/arpeggiator1.py +30 -0
  20. creativepython-0.3.2/src/CreativePython/examples/arpeggiator2.py +32 -0
  21. creativepython-0.3.2/src/CreativePython/examples/autumnLeaves.py +77 -0
  22. creativepython-0.3.2/src/CreativePython/examples/axelF.py +26 -0
  23. creativepython-0.3.2/src/CreativePython/examples/biosignals.txt +3555 -0
  24. creativepython-0.3.2/src/CreativePython/examples/boids.py +268 -0
  25. creativepython-0.3.2/src/CreativePython/examples/brownianMelody.py +47 -0
  26. creativepython-0.3.2/src/CreativePython/examples/changesByTupac.py +23 -0
  27. creativepython-0.3.2/src/CreativePython/examples/clementine.py +140 -0
  28. creativepython-0.3.2/src/CreativePython/examples/continuousPitchInstrumentAudio.py +54 -0
  29. creativepython-0.3.2/src/CreativePython/examples/drumExample.py +22 -0
  30. creativepython-0.3.2/src/CreativePython/examples/drumMachinePattern1.py +50 -0
  31. creativepython-0.3.2/src/CreativePython/examples/drumsComeAlive.py +87 -0
  32. creativepython-0.3.2/src/CreativePython/examples/fibonacci.py +19 -0
  33. creativepython-0.3.2/src/CreativePython/examples/findPitchOctave.py +14 -0
  34. creativepython-0.3.2/src/CreativePython/examples/furElise.py +27 -0
  35. creativepython-0.3.2/src/CreativePython/examples/generativeMusic.py +47 -0
  36. creativepython-0.3.2/src/CreativePython/examples/goldenTree.py +55 -0
  37. creativepython-0.3.2/src/CreativePython/examples/guidoWordMusic.py +70 -0
  38. creativepython-0.3.2/src/CreativePython/examples/harmonicesMundi.py +67 -0
  39. creativepython-0.3.2/src/CreativePython/examples/harmonicesMundiRevisisted.py +65 -0
  40. creativepython-0.3.2/src/CreativePython/examples/harmonographLateral.py +47 -0
  41. creativepython-0.3.2/src/CreativePython/examples/harmonographRotary.py +70 -0
  42. creativepython-0.3.2/src/CreativePython/examples/iPianoBlackDown.png +0 -0
  43. creativepython-0.3.2/src/CreativePython/examples/iPianoOctave.png +0 -0
  44. creativepython-0.3.2/src/CreativePython/examples/iPianoParallel.py +73 -0
  45. creativepython-0.3.2/src/CreativePython/examples/iPianoSimple.py +86 -0
  46. creativepython-0.3.2/src/CreativePython/examples/iPianoWhiteCenterDown.png +0 -0
  47. creativepython-0.3.2/src/CreativePython/examples/iPianoWhiteLeftDown.png +0 -0
  48. creativepython-0.3.2/src/CreativePython/examples/iPianoWhiteRightDown.png +0 -0
  49. creativepython-0.3.2/src/CreativePython/examples/midiIn1.py +14 -0
  50. creativepython-0.3.2/src/CreativePython/examples/midiIn2.py +13 -0
  51. creativepython-0.3.2/src/CreativePython/examples/midiIn3.py +25 -0
  52. creativepython-0.3.2/src/CreativePython/examples/midiOut.a.py +12 -0
  53. creativepython-0.3.2/src/CreativePython/examples/midiOut.b.py +14 -0
  54. creativepython-0.3.2/src/CreativePython/examples/midiSynthesizer.py +34 -0
  55. creativepython-0.3.2/src/CreativePython/examples/midiSynthesizer2.py +55 -0
  56. creativepython-0.3.2/src/CreativePython/examples/moondog-bird_slament.wav +0 -0
  57. creativepython-0.3.2/src/CreativePython/examples/musicalSphere.py +178 -0
  58. creativepython-0.3.2/src/CreativePython/examples/note.py +55 -0
  59. creativepython-0.3.2/src/CreativePython/examples/octoplus.py +56 -0
  60. creativepython-0.3.2/src/CreativePython/examples/oscIn1.py +13 -0
  61. creativepython-0.3.2/src/CreativePython/examples/oscIn2.py +19 -0
  62. creativepython-0.3.2/src/CreativePython/examples/pentatonicMelody.py +33 -0
  63. creativepython-0.3.2/src/CreativePython/examples/pianoPhase.py +28 -0
  64. creativepython-0.3.2/src/CreativePython/examples/pianoRollGenerator.py +43 -0
  65. creativepython-0.3.2/src/CreativePython/examples/playNote.py +7 -0
  66. creativepython-0.3.2/src/CreativePython/examples/proteinMusic.py +59 -0
  67. creativepython-0.3.2/src/CreativePython/examples/randomCircles.py +36 -0
  68. creativepython-0.3.2/src/CreativePython/examples/randomCirclesThroughMidiInput.py +52 -0
  69. creativepython-0.3.2/src/CreativePython/examples/randomCirclesTimed.py +67 -0
  70. creativepython-0.3.2/src/CreativePython/examples/retrograde.a.py +22 -0
  71. creativepython-0.3.2/src/CreativePython/examples/retrograde.b.py +36 -0
  72. creativepython-0.3.2/src/CreativePython/examples/retrograde.c.py +41 -0
  73. creativepython-0.3.2/src/CreativePython/examples/rowYourBoat.py +61 -0
  74. creativepython-0.3.2/src/CreativePython/examples/scaleTutor.py +27 -0
  75. creativepython-0.3.2/src/CreativePython/examples/sierpinskiTriangle.py +52 -0
  76. creativepython-0.3.2/src/CreativePython/examples/simpleButtonInstrument.py +34 -0
  77. creativepython-0.3.2/src/CreativePython/examples/simpleCircleInstrument.py +70 -0
  78. creativepython-0.3.2/src/CreativePython/examples/sineMelody.py +23 -0
  79. creativepython-0.3.2/src/CreativePython/examples/sineMelodyPlus.py +28 -0
  80. creativepython-0.3.2/src/CreativePython/examples/sliderControl.py +66 -0
  81. creativepython-0.3.2/src/CreativePython/examples/sonifyBiosignals.py +79 -0
  82. creativepython-0.3.2/src/CreativePython/examples/sonifyImage.py +109 -0
  83. creativepython-0.3.2/src/CreativePython/examples/soundscapeLoutrakiSunset.jpg +0 -0
  84. creativepython-0.3.2/src/CreativePython/examples/stringQuartet.py +36 -0
  85. creativepython-0.3.2/src/CreativePython/examples/textMusic.py +62 -0
  86. creativepython-0.3.2/src/CreativePython/examples/theWayItIs.py +33 -0
  87. creativepython-0.3.2/src/CreativePython/examples/themeAndVariations.py +64 -0
  88. creativepython-0.3.2/src/CreativePython/examples/throwingDice.py +37 -0
  89. creativepython-0.3.2/src/CreativePython/examples/windChimes.py +56 -0
  90. creativepython-0.3.2/src/CreativePython/examples/zipfMetrics.py +81 -0
  91. creativepython-0.3.2/src/CreativePython/resources/.DS_Store +0 -0
  92. creativepython-0.3.2/src/CreativePython/resources/550973__luizguilherme_a__clean-guitarr-riff.mp3 +0 -0
  93. creativepython-0.3.2/src/CreativePython/resources/chopper.jpg +0 -0
  94. creativepython-0.3.2/src/CreativePython/resources/de-brazzas-monkey.jpg +0 -0
  95. creativepython-0.3.2/src/CreativePython.egg-info/PKG-INFO +204 -0
  96. creativepython-0.3.2/src/CreativePython.egg-info/SOURCES.txt +109 -0
  97. creativepython-0.3.2/src/CreativePython.egg-info/dependency_links.txt +1 -0
  98. creativepython-0.3.2/src/CreativePython.egg-info/requires.txt +15 -0
  99. creativepython-0.3.2/src/CreativePython.egg-info/top_level.txt +12 -0
  100. creativepython-0.3.2/src/_RealtimeAudioPlayer.py +936 -0
  101. creativepython-0.3.2/src/bin/libportaudio.2.dylib +0 -0
  102. creativepython-0.3.2/src/gui.py +4187 -0
  103. creativepython-0.3.2/src/iannix.py +455 -0
  104. creativepython-0.3.2/src/image.py +92 -0
  105. creativepython-0.3.2/src/markov.py +543 -0
  106. creativepython-0.3.2/src/midi.py +996 -0
  107. creativepython-0.3.2/src/music.py +6118 -0
  108. creativepython-0.3.2/src/osc.py +450 -0
  109. creativepython-0.3.2/src/timer.py +491 -0
  110. creativepython-0.3.2/src/zipf.py +224 -0
  111. creativepython-0.3.2/tests/test_keyEvent.py +23 -0
@@ -0,0 +1,40 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Dr. Bill Manaris
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ================================================================================
24
+ THIRD PARTY COMPONENTS
25
+ ================================================================================
26
+
27
+ This software includes PENCIL, a derivative work based on IDLE (Integrated
28
+ Development and Learning Environment), which is part of Python and distributed
29
+ under the Python Software Foundation License Version 2.
30
+
31
+ IDLE Components:
32
+ - Location: resources/pencillib/
33
+ - Copyright: © 2001-2023 Python Software Foundation. All Rights Reserved.
34
+ - License: Python Software Foundation License Version 2 (see LICENSE-PSF.txt)
35
+ - Original Authors: Guido van Rossum and Python development team
36
+ - PENCIL Modifications: Copyright © 2025 Dr. Bill Manaris
37
+
38
+ For complete IDLE/PENCIL licensing information and contributor credits, see:
39
+ - LICENSE-PSF.txt (Python Software Foundation License)
40
+ - resources/pencillib/CREDITS.txt (Complete contributor list)
@@ -0,0 +1,67 @@
1
+ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
2
+ --------------------------------------------
3
+
4
+ This license applies to the IDLE components (located in resources/pencillib/)
5
+ that are incorporated into PENCIL.
6
+
7
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
8
+ the Individual or Organization ("Licensee") accessing and otherwise using this
9
+ software ("Python") in source or binary form and its associated documentation.
10
+
11
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
12
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
13
+ analyze, test, perform and/or display publicly, prepare derivative works,
14
+ distribute, and otherwise use Python alone or in any derivative version,
15
+ provided, however, that PSF's License Agreement and PSF's notice of copyright,
16
+ i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
17
+ 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022,
18
+ 2023 Python Software Foundation; All Rights Reserved" are retained in Python
19
+ alone or in any derivative version prepared by Licensee.
20
+
21
+ 3. In the event Licensee prepares a derivative work that is based on or
22
+ incorporates Python or any part thereof, and wants to make the derivative work
23
+ available to others as provided herein, then Licensee hereby agrees to include
24
+ in any such work a brief summary of the changes made to Python.
25
+
26
+ 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO
27
+ REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT
28
+ LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF
29
+ MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON
30
+ WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
31
+
32
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY
33
+ INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING,
34
+ DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF
35
+ ADVISED OF THE POSSIBILITY THEREOF.
36
+
37
+ 6. This License Agreement will automatically terminate upon a material breach of
38
+ its terms and conditions.
39
+
40
+ 7. Nothing in this License Agreement shall be deemed to create any relationship of
41
+ agency, partnership, or joint venture between PSF and Licensee. This License
42
+ Agreement does not grant permission to use PSF trademarks or trade name in a
43
+ trademark sense to endorse or promote products or services of Licensee, or any
44
+ third party.
45
+
46
+ 8. By copying, installing or otherwise using Python, Licensee agrees to be bound
47
+ by the terms and conditions of this License Agreement.
48
+
49
+
50
+ ACKNOWLEDGMENT
51
+ --------------
52
+
53
+ PENCIL is a derivative work based on IDLE (Integrated Development and Learning
54
+ Environment), which is part of the Python standard library.
55
+
56
+ Original IDLE was created by Guido van Rossum and has been maintained and
57
+ enhanced by numerous contributors to the Python project.
58
+
59
+ PENCIL modifications include:
60
+ - Custom default themes and keymaps ("JEM")
61
+ - Modified configuration directory (~/.pencilrc/)
62
+ - Integration with CreativePython environment
63
+ - Various UI and feature enhancements
64
+
65
+ For a complete list of IDLE contributors, see resources/pencillib/CREDITS.txt
66
+
67
+ IDLE source code and documentation: https://github.com/python/cpython/tree/main/Lib/pencillib
@@ -0,0 +1,5 @@
1
+ recursive-include src/bin *
2
+ recursive-include src/CreativePython/resources *
3
+ recursive-include src/CreativePython/examples *
4
+ recursive-exclude */.DS_Store
5
+ recursive-exclude */__pycache__/*
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.4
2
+ Name: CreativePython
3
+ Version: 0.3.2
4
+ Summary: A Python-based software environment for developing algorithmic art projects.
5
+ Author-email: "Dr. Bill Manaris" <manaris@cofc.edu>, Taj Ballinger <ballingertj@g.cofc.edu>, Trevor Ritchie <ritchiets@g.cofc.edu>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Dr. Bill Manaris
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ ================================================================================
29
+ THIRD PARTY COMPONENTS
30
+ ================================================================================
31
+
32
+ This software includes PENCIL, a derivative work based on IDLE (Integrated
33
+ Development and Learning Environment), which is part of Python and distributed
34
+ under the Python Software Foundation License Version 2.
35
+
36
+ IDLE Components:
37
+ - Location: resources/pencillib/
38
+ - Copyright: © 2001-2023 Python Software Foundation. All Rights Reserved.
39
+ - License: Python Software Foundation License Version 2 (see LICENSE-PSF.txt)
40
+ - Original Authors: Guido van Rossum and Python development team
41
+ - PENCIL Modifications: Copyright © 2025 Dr. Bill Manaris
42
+
43
+ For complete IDLE/PENCIL licensing information and contributor credits, see:
44
+ - LICENSE-PSF.txt (Python Software Foundation License)
45
+ - resources/pencillib/CREDITS.txt (Complete contributor list)
46
+ Project-URL: Homepage, https://jythonmusic.me
47
+ Keywords: music,audio,midi,learning,algorithmic art,algoart
48
+ Classifier: Programming Language :: Python :: 3
49
+ Classifier: Operating System :: OS Independent
50
+ Classifier: License :: OSI Approved :: MIT License
51
+ Requires-Python: >=3.9
52
+ Description-Content-Type: text/markdown
53
+ License-File: LICENSE
54
+ License-File: LICENSE-PSF
55
+ Requires-Dist: setuptools>=69.0
56
+ Requires-Dist: tinysoundfont>=0.3.6
57
+ Requires-Dist: osc4py3>=1.0.8
58
+ Requires-Dist: mido>=1.3.3
59
+ Requires-Dist: PySide6>=6.9.1
60
+ Requires-Dist: python-rtmidi>=1.5.8
61
+ Requires-Dist: sounddevice>=0.5.2
62
+ Requires-Dist: soundfile>=0.13.1
63
+ Requires-Dist: tqdm>=4.67.1
64
+ Requires-Dist: pooch>=1.8
65
+ Requires-Dist: pypianoroll>=1.0
66
+ Provides-Extra: dev
67
+ Requires-Dist: build; extra == "dev"
68
+ Requires-Dist: twine; extra == "dev"
69
+ Dynamic: license-file
70
+
71
+ # CreativePython
72
+
73
+ CreativePython is a Python-based software environment for learning and developing algorithmic art projects. It mirrors the [JythonMusic API](https://jythonmusic.me/api-reference/), and is powered by [PySide6](https://wiki.qt.io/Qt_for_Python) and [portaudio](http://portaudio.com/).
74
+
75
+ CreativePython is distributed under the MIT License.
76
+
77
+ - [Homepage](https://jythonmusic.me/)
78
+ - [Download All Examples [ZIP]](https://www.dropbox.com/scl/fo/rvc8m8pt4m0281qn0t4oi/AO2Y0W2qOrOcurlQmLa7M54?rlkey=0sf80bmov135tc85dk9k7ats6&dl=1)
79
+ - [Report a Bug (email link)](mailto:creativepythoncofc@gmail.com&subject=[CreativePython]%20Bug%20Report&body=CreativePython%20Version:%20(e.g.%200.1.8)%0D%0AOperating%20System:%20(e.g.%20macOS%2015,%20Windows%2011,%20Ubuntu%2024.04)%0D%0APython%20Version:%20(e.g.%203.11)%0D%0A%0D%0ASummary:%0D%0A%0D%0ASteps%20to%20Reproduce:%0D%0A1.%20%0D%0A2.%20%0D%0A3.%20%0D%0A%0D%0AExpected%20Result:%0D%0A%0D%0AActual%20Result:%0D%0A%0D%0AError%20Messages%20or%20Logs:%0D%0A)
80
+ - [Request a Feature (email link)](mailto:creativepythoncofc@gmail.com&subject=[CreativePython]%20Feature%20Request&body=CreativePython%20Version:%20(e.g.%200.1.8)%0D%0AOperating%20System:%20(e.g.%20macOS%2015,%20Windows%2011,%20Ubuntu%2024.04)%0D%0A%0D%0AFeature%20Name:%0D%0A%0D%0ADescription:%0D%0A%0D%0AExample%20Use%20Case%20or%20Scenario:%0D%0A%0D%0ARelated%20Modules%20or%20Functions:%0D%0A%0D%0A)
81
+
82
+ This package is still under development.
83
+
84
+ # Requirements
85
+
86
+ Before installing CreativePython, you will need:
87
+
88
+ - **Python3**, version 3.9 or greater [[Download](https://www.python.org/downloads/)]
89
+ - **A C++ compiler** (see **Troubleshooting** below)
90
+
91
+ # Installation
92
+
93
+ If you're familiar with Python development, we recommend installing CreativePython through the Command Prompt/Terminal.
94
+
95
+ ## Windows
96
+
97
+ Install CreativePython using `pip`:
98
+
99
+ ```
100
+ python -m pip install CreativePython
101
+ ```
102
+
103
+ ## MacOS
104
+
105
+ Use [Homebrew](https://brew.sh/) to install the prerequisite [portaudio](http://portaudio.com/) library, then install CreativePython using `pip`:
106
+
107
+ ```
108
+ brew install portaudio
109
+ pip install CreativePython
110
+ ```
111
+
112
+ ## Linux
113
+
114
+ Use apt, or your preferred package manager, to install the prerequisite [portaudio](http://portaudio.com/) library, then install CreativePython using `pip`:
115
+
116
+ ```
117
+ sudo apt-get portaudio
118
+ pip install CreativePython
119
+ ```
120
+
121
+ # Using CreativePython
122
+
123
+ ## Importing Libraries
124
+
125
+ CreativePython's core modules are the `music`, `gui`, `image`, `timer`, `osc`, and `midi` libraries. You can import these libraries into your python code using:
126
+
127
+ ```
128
+ import music
129
+ from music import *
130
+ from music import Note, Play, C4, HN
131
+ ```
132
+
133
+ Or a similar statement. CreativePython includes a number of useful constants, so we recommend using wildcard imports like `from music import *`.
134
+
135
+ **NOTE:** The first time you import `music`, CreativePython will download a high-quality soundfont (FluidR3 G2-2.sf2) for you. You should only have to do this once.
136
+
137
+ ## Running CreativePython programs
138
+
139
+ CreativePython is designed for use in Python's Interactive Mode. To use Interactive Mode, enter a command like:
140
+
141
+ ```
142
+ python -i <filename>.py
143
+ ```
144
+
145
+ ## Example
146
+
147
+ Download [playNote.py](https://www.dropbox.com/scl/fi/z6rkjy4xnofmg0t899se3/playNote.py?rlkey=o3t8c91ne6agj2lqf2aupl8m5&dl=1):
148
+
149
+ ```
150
+ # playNote.py
151
+ # Demonstrates how to play a single note.
152
+
153
+ from music import * # import music library
154
+
155
+ note = Note(C4, HN) # create a middle C half note
156
+ Play.midi(note) # and play it!
157
+ ```
158
+
159
+ In IDLE, you can open playNote.py, and select **Run**, then **Run Module** from the toolbar.
160
+
161
+ In a terminal, run playNote.py in interactive mode:
162
+
163
+ ```
164
+ python -i playNote.py
165
+ ```
166
+
167
+ After you do, you should hear a single C4 half-note.
168
+
169
+ ## Troubleshooting
170
+
171
+ ### CMake configuration failed
172
+
173
+ Some of CreativePython's libraries may need to compile C++ code during installation.
174
+
175
+ - On Windows, download and install [Visual Studio Build Tools 2022](https://visualstudio.microsoft.com/downloads/). In the Visual Studio installer, make sure "Desktop Development with C++" is checked.
176
+
177
+ - On MacOS, you can download and install [XCode from the App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
178
+
179
+ Restart your computer, then try installing CreativePython again.
180
+
181
+ # PENCIL Editor
182
+
183
+ CreativePython will soon be available as PENCIL, a customized Python IDE based on IDLE (Python's Integrated Development and Learning Environment).
184
+
185
+ ## Attribution
186
+
187
+ PENCIL is derived from IDLE, which is part of Python and created by Guido van Rossum and the Python development team. IDLE is distributed under the Python Software Foundation License Version 2.
188
+
189
+ **Original IDLE Credits:**
190
+ - Copyright © 2001-2023 Python Software Foundation. All Rights Reserved.
191
+ - See `resources/pencillib/CREDITS.txt` for complete IDLE contributor list.
192
+
193
+ **PENCIL Modifications:**
194
+ - Copyright © 2025 Dr. Bill Manaris
195
+ - Modified for use with CreativePython
196
+ - Includes custom "JEM" theme and keymap defaults
197
+ - User configuration stored in `~/.pencilrc/`
198
+
199
+ ## Licenses
200
+
201
+ - **CreativePython**: MIT License (see `LICENSE`)
202
+ - **IDLE/PENCIL**: Python Software Foundation License Version 2 (see `LICENSE-PSF.txt`)
203
+
204
+ For complete licensing information, see the `LICENSE` and `LICENSE-PSF.txt` files in this distribution.
@@ -0,0 +1,134 @@
1
+ # CreativePython
2
+
3
+ CreativePython is a Python-based software environment for learning and developing algorithmic art projects. It mirrors the [JythonMusic API](https://jythonmusic.me/api-reference/), and is powered by [PySide6](https://wiki.qt.io/Qt_for_Python) and [portaudio](http://portaudio.com/).
4
+
5
+ CreativePython is distributed under the MIT License.
6
+
7
+ - [Homepage](https://jythonmusic.me/)
8
+ - [Download All Examples [ZIP]](https://www.dropbox.com/scl/fo/rvc8m8pt4m0281qn0t4oi/AO2Y0W2qOrOcurlQmLa7M54?rlkey=0sf80bmov135tc85dk9k7ats6&dl=1)
9
+ - [Report a Bug (email link)](mailto:creativepythoncofc@gmail.com&subject=[CreativePython]%20Bug%20Report&body=CreativePython%20Version:%20(e.g.%200.1.8)%0D%0AOperating%20System:%20(e.g.%20macOS%2015,%20Windows%2011,%20Ubuntu%2024.04)%0D%0APython%20Version:%20(e.g.%203.11)%0D%0A%0D%0ASummary:%0D%0A%0D%0ASteps%20to%20Reproduce:%0D%0A1.%20%0D%0A2.%20%0D%0A3.%20%0D%0A%0D%0AExpected%20Result:%0D%0A%0D%0AActual%20Result:%0D%0A%0D%0AError%20Messages%20or%20Logs:%0D%0A)
10
+ - [Request a Feature (email link)](mailto:creativepythoncofc@gmail.com&subject=[CreativePython]%20Feature%20Request&body=CreativePython%20Version:%20(e.g.%200.1.8)%0D%0AOperating%20System:%20(e.g.%20macOS%2015,%20Windows%2011,%20Ubuntu%2024.04)%0D%0A%0D%0AFeature%20Name:%0D%0A%0D%0ADescription:%0D%0A%0D%0AExample%20Use%20Case%20or%20Scenario:%0D%0A%0D%0ARelated%20Modules%20or%20Functions:%0D%0A%0D%0A)
11
+
12
+ This package is still under development.
13
+
14
+ # Requirements
15
+
16
+ Before installing CreativePython, you will need:
17
+
18
+ - **Python3**, version 3.9 or greater [[Download](https://www.python.org/downloads/)]
19
+ - **A C++ compiler** (see **Troubleshooting** below)
20
+
21
+ # Installation
22
+
23
+ If you're familiar with Python development, we recommend installing CreativePython through the Command Prompt/Terminal.
24
+
25
+ ## Windows
26
+
27
+ Install CreativePython using `pip`:
28
+
29
+ ```
30
+ python -m pip install CreativePython
31
+ ```
32
+
33
+ ## MacOS
34
+
35
+ Use [Homebrew](https://brew.sh/) to install the prerequisite [portaudio](http://portaudio.com/) library, then install CreativePython using `pip`:
36
+
37
+ ```
38
+ brew install portaudio
39
+ pip install CreativePython
40
+ ```
41
+
42
+ ## Linux
43
+
44
+ Use apt, or your preferred package manager, to install the prerequisite [portaudio](http://portaudio.com/) library, then install CreativePython using `pip`:
45
+
46
+ ```
47
+ sudo apt-get portaudio
48
+ pip install CreativePython
49
+ ```
50
+
51
+ # Using CreativePython
52
+
53
+ ## Importing Libraries
54
+
55
+ CreativePython's core modules are the `music`, `gui`, `image`, `timer`, `osc`, and `midi` libraries. You can import these libraries into your python code using:
56
+
57
+ ```
58
+ import music
59
+ from music import *
60
+ from music import Note, Play, C4, HN
61
+ ```
62
+
63
+ Or a similar statement. CreativePython includes a number of useful constants, so we recommend using wildcard imports like `from music import *`.
64
+
65
+ **NOTE:** The first time you import `music`, CreativePython will download a high-quality soundfont (FluidR3 G2-2.sf2) for you. You should only have to do this once.
66
+
67
+ ## Running CreativePython programs
68
+
69
+ CreativePython is designed for use in Python's Interactive Mode. To use Interactive Mode, enter a command like:
70
+
71
+ ```
72
+ python -i <filename>.py
73
+ ```
74
+
75
+ ## Example
76
+
77
+ Download [playNote.py](https://www.dropbox.com/scl/fi/z6rkjy4xnofmg0t899se3/playNote.py?rlkey=o3t8c91ne6agj2lqf2aupl8m5&dl=1):
78
+
79
+ ```
80
+ # playNote.py
81
+ # Demonstrates how to play a single note.
82
+
83
+ from music import * # import music library
84
+
85
+ note = Note(C4, HN) # create a middle C half note
86
+ Play.midi(note) # and play it!
87
+ ```
88
+
89
+ In IDLE, you can open playNote.py, and select **Run**, then **Run Module** from the toolbar.
90
+
91
+ In a terminal, run playNote.py in interactive mode:
92
+
93
+ ```
94
+ python -i playNote.py
95
+ ```
96
+
97
+ After you do, you should hear a single C4 half-note.
98
+
99
+ ## Troubleshooting
100
+
101
+ ### CMake configuration failed
102
+
103
+ Some of CreativePython's libraries may need to compile C++ code during installation.
104
+
105
+ - On Windows, download and install [Visual Studio Build Tools 2022](https://visualstudio.microsoft.com/downloads/). In the Visual Studio installer, make sure "Desktop Development with C++" is checked.
106
+
107
+ - On MacOS, you can download and install [XCode from the App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12).
108
+
109
+ Restart your computer, then try installing CreativePython again.
110
+
111
+ # PENCIL Editor
112
+
113
+ CreativePython will soon be available as PENCIL, a customized Python IDE based on IDLE (Python's Integrated Development and Learning Environment).
114
+
115
+ ## Attribution
116
+
117
+ PENCIL is derived from IDLE, which is part of Python and created by Guido van Rossum and the Python development team. IDLE is distributed under the Python Software Foundation License Version 2.
118
+
119
+ **Original IDLE Credits:**
120
+ - Copyright © 2001-2023 Python Software Foundation. All Rights Reserved.
121
+ - See `resources/pencillib/CREDITS.txt` for complete IDLE contributor list.
122
+
123
+ **PENCIL Modifications:**
124
+ - Copyright © 2025 Dr. Bill Manaris
125
+ - Modified for use with CreativePython
126
+ - Includes custom "JEM" theme and keymap defaults
127
+ - User configuration stored in `~/.pencilrc/`
128
+
129
+ ## Licenses
130
+
131
+ - **CreativePython**: MIT License (see `LICENSE`)
132
+ - **IDLE/PENCIL**: Python Software Foundation License Version 2 (see `LICENSE-PSF.txt`)
133
+
134
+ For complete licensing information, see the `LICENSE` and `LICENSE-PSF.txt` files in this distribution.
@@ -0,0 +1,51 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "CreativePython"
7
+ version = "0.3.2"
8
+ description = "A Python-based software environment for developing algorithmic art projects."
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ authors = [
12
+ { name = "Dr. Bill Manaris", email = "manaris@cofc.edu" },
13
+ { name = "Taj Ballinger", email = "ballingertj@g.cofc.edu" },
14
+ { name = "Trevor Ritchie", email = "ritchiets@g.cofc.edu" },
15
+ ]
16
+ keywords = ["music", "audio", "midi", "learning", "algorithmic art", "algoart"]
17
+ requires-python = ">=3.9"
18
+ classifiers = [
19
+ "Programming Language :: Python :: 3",
20
+ "Operating System :: OS Independent",
21
+ "License :: OSI Approved :: MIT License",
22
+ ]
23
+ dependencies = [
24
+ "setuptools>=69.0",
25
+ "tinysoundfont>=0.3.6",
26
+ "osc4py3>=1.0.8",
27
+ "mido>=1.3.3",
28
+ "PySide6>=6.9.1",
29
+ "python-rtmidi>=1.5.8",
30
+ "sounddevice>=0.5.2",
31
+ "soundfile>=0.13.1",
32
+ "tqdm>=4.67.1",
33
+ "pooch>=1.8",
34
+ "pypianoroll>=1.0"
35
+ ]
36
+
37
+ [tool.setuptools]
38
+ package-dir = {"" = "src"}
39
+ py-modules = ["gui", "image", "midi", "music", "osc", "timer", "iannix", "markov", "zipf", "_RealtimeAudioPlayer"]
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
43
+
44
+ [tool.setuptools.package-data]
45
+ "CreativePython" = ["bin/libportaudio.2.dylib"]
46
+
47
+ [project.urls]
48
+ Homepage = "https://jythonmusic.me"
49
+
50
+ [project.optional-dependencies]
51
+ dev = ["build", "twine"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,10 @@
1
+ import platform, ctypes, importlib.resources
2
+
3
+
4
+ # import portaudio binary on MacOS
5
+ if platform.system() == "Darwin":
6
+ try:
7
+ with importlib.resources.path("CreativePython.bin", "libportaudio.2.dylib") as libpath:
8
+ ctypes.CDLL(str(libpath))
9
+ except Exception:
10
+ pass
@@ -0,0 +1,76 @@
1
+ # ArvoPart.CantusInMemoriam.py
2
+ #
3
+ # Recreates a variation of Arvo Part's "Cantus in Memoriam Benjamin
4
+ # Britten" (1977) for string orchestra and bell, using Mod functions.
5
+
6
+ from music import *
7
+
8
+ # musical parameters
9
+ repetitions = 2 # length of piece
10
+ tempo = 112 # tempo of piece
11
+ bar = WN+HN # length of a measure
12
+
13
+ # create musical data structure
14
+ cantusScore = Score("Cantus in Memoriam Benjamin Britten", tempo)
15
+
16
+ bellPart = Part(TUBULAR_BELLS, 0)
17
+ violinPart = Part(VIOLIN, 1)
18
+
19
+ # bell
20
+ bellPitches = [REST, A4, REST, REST, A4, REST, REST, A4]
21
+ bellDurations = [bar/2, bar/2, bar, bar/2, bar/2, bar, bar/2, bar/2]
22
+
23
+ bellPhrase = Phrase(0.0)
24
+ bellPhrase.addNoteList(bellPitches, bellDurations)
25
+ bellPart.addPhrase(bellPhrase)
26
+
27
+ # violin - define descending aeolian scale and rhythms
28
+ pitches = [A5, G5, F5, E5, D5, C5, B4, A4]
29
+ durations = [HN, QN, HN, QN, HN, QN, HN, QN]
30
+
31
+ # violin 1
32
+ violin1Phrase = Phrase(bar * 6.5) # start after 6 and 1/2 measures
33
+ violin1Phrase.addNoteList(pitches, durations)
34
+
35
+ # violin 2
36
+ violin2Phrase = violin1Phrase.copy()
37
+ violin2Phrase.setStartTime(bar * 7.0) # start after 7 measures
38
+ Mod.elongate(violin2Phrase, 2.0) # double durations
39
+ Mod.transpose(violin2Phrase, -12) # an octave lower
40
+
41
+ # violin 3
42
+ violin3Phrase = violin2Phrase.copy()
43
+ violin3Phrase.setStartTime(bar * 8.0) # start after 8 measures
44
+ Mod.elongate(violin3Phrase, 2.0) # double durations
45
+ Mod.transpose(violin3Phrase, -12) # an octave lower
46
+
47
+ # violin 4
48
+ violin4Phrase = violin3Phrase.copy()
49
+ violin4Phrase.setStartTime(bar * 10.0) # start after 10 measures
50
+ Mod.elongate(violin4Phrase, 2.0) # double durations
51
+ Mod.transpose(violin4Phrase, -12) # an octave lower
52
+
53
+ # repeat phrases enough times
54
+ Mod.repeat(violin1Phrase, 8 * repetitions)
55
+ Mod.repeat(violin2Phrase, 4 * repetitions)
56
+ Mod.repeat(violin3Phrase, 2 * repetitions)
57
+ Mod.repeat(violin4Phrase, repetitions)
58
+
59
+ # violin part
60
+ violinPart.addPhrase(violin1Phrase)
61
+ violinPart.addPhrase(violin2Phrase)
62
+ violinPart.addPhrase(violin3Phrase)
63
+ violinPart.addPhrase(violin4Phrase)
64
+
65
+ # score
66
+ cantusScore.addPart(bellPart)
67
+ cantusScore.addPart(violinPart)
68
+
69
+ # fade in, and fade out
70
+ Mod.fadeIn(cantusScore, WN)
71
+ Mod.fadeOut(cantusScore, WN * 12)
72
+
73
+ # view, play, and write
74
+ View.sketch(cantusScore)
75
+ Play.midi(cantusScore)
76
+ Write.midi (cantusScore, "ArvoPart.CantusInMemoriam.mid")
@@ -0,0 +1,41 @@
1
+ # ConcretPH_Xenakis.py
2
+ #
3
+ # A short example which generates a random cloud texture
4
+ # inspired by Iannis Xenakis's 'Concret PH' composition
5
+ #
6
+ # see http://en.wikipedia.org/wiki/Concret_PH
7
+
8
+ from music import *
9
+ from random import *
10
+
11
+ # constants for controlling musical parameters
12
+ cloudWidth = 64 # length of piece (in quarter notes)
13
+ cloudDensity = 23.44 # how dense the cloud may be
14
+ particleDuration = 0.2 # how long each sound particle may be
15
+ numParticles = int(cloudDensity * cloudWidth) # how many particles
16
+
17
+ part = Part(BREATHNOISE)
18
+
19
+ # make particles (notes) and add them to cloud (part)
20
+ for i in range(numParticles):
21
+
22
+ # create note with random attributes
23
+ pitch = randint(0, 127) # pick from 0 to 127
24
+ duration = random() * particleDuration # 0 to particleDuration
25
+ dynamic = randint(0, 127) # pick from silent to loud
26
+ panning = random() # pick from left to right
27
+ note = Note(pitch, duration, dynamic, panning) # create note
28
+
29
+ # now, place it somewhere in the cloud (time continuum)
30
+ startTime = random() * cloudWidth # pick from 0 to end of piece
31
+ phrase = Phrase(startTime) # create phrase with this start time
32
+ phrase.addNote(note) # add the above note
33
+ part.addPhrase(phrase) # and add both to the part
34
+ # now, all notes have been created
35
+
36
+ # add some elegance to the end
37
+ Mod.fadeOut(part, 20)
38
+
39
+ View.show(part)
40
+ Play.midi(part)
41
+ Write.midi(part, "ConcretPh.mid")