CreativePython 0.1.7__tar.gz → 0.1.8__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.
- {creativepython-0.1.7/src/CreativePython.egg-info → creativepython-0.1.8}/PKG-INFO +1 -1
- {creativepython-0.1.7 → creativepython-0.1.8}/pyproject.toml +1 -1
- {creativepython-0.1.7 → creativepython-0.1.8/src/CreativePython.egg-info}/PKG-INFO +1 -1
- {creativepython-0.1.7 → creativepython-0.1.8}/src/gui.py +35 -30
- {creativepython-0.1.7 → creativepython-0.1.8}/src/music.py +486 -114
- {creativepython-0.1.7 → creativepython-0.1.8}/src/timer.py +79 -165
- {creativepython-0.1.7 → creativepython-0.1.8}/LICENSE +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/MANIFEST.in +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/README.md +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/setup.cfg +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/__init__.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/_creativepythonSetup.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/_soundfont.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/.DS_Store +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/ArvoPart.CantusInMemoriam.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/ConcretPH_Xenakis.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/DeepPurple.SmokeOnTheWater.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/JS_Bach.Canon.TriasHarmonica.BWV1072.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/JS_Bach.Canon_1.GoldbergGround.BWV1087.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/Mozart.MusikalischesWurfelspiel.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/PierreCage.StructuresPourDeuxChances.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/RGB_Display.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/TerryRiley.InC.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/arpeggiator1.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/arpeggiator2.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/autumnLeaves.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/axelF.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/biosignals.txt +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/boids.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/brownianMelody.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/changesByTupac.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/clementine.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/continuousPitchInstrumentAudio.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/drumExample.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/drumMachinePattern1.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/drumsComeAlive.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/fibonacci.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/findPitchOctave.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/furElise.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/generativeMusic.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/goldenTree.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/guidoWordMusic.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/harmonicesMundi.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/harmonicesMundiRevisisted.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/harmonographLateral.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/harmonographRotary.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoBlackDown.png +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoOctave.png +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoParallel.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoSimple.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoWhiteCenterDown.png +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoWhiteLeftDown.png +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/iPianoWhiteRightDown.png +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiIn1.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiIn2.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiIn3.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiOut.a.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiOut.b.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiSynthesizer.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/midiSynthesizer2.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/moondog-bird_slament.wav +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/musicalSphere.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/note.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/octoplus.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/oscIn1.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/oscIn2.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/pentatonicMelody.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/pianoPhase.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/pianoRollGenerator.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/playNote.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/proteinMusic.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/randomCircles.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/randomCirclesThroughMidiInput.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/randomCirclesTimed.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/retrograde.a.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/retrograde.b.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/retrograde.c.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/rowYourBoat.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/scaleTutor.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sierpinskiTriangle.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/simpleButtonInstrument.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/simpleCircleInstrument.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sineMelody.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sineMelodyPlus.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sliderControl.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sonifyBiosignals.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/sonifyImage.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/soundscapeLoutrakiSunset.jpg +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/stringQuartet.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/textMusic.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/theWayItIs.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/themeAndVariations.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/throwingDice.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/windChimes.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/examples/zipfMetrics.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/resources/.DS_Store +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/resources/550973__luizguilherme_a__clean-guitarr-riff.mp3 +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/resources/chopper.jpg +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython/resources/de-brazzas-monkey.jpg +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython.egg-info/SOURCES.txt +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython.egg-info/dependency_links.txt +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython.egg-info/requires.txt +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/CreativePython.egg-info/top_level.txt +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/_RealtimeAudioPlayer.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/iannix.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/image.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/markov.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/midi.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/osc.py +0 -0
- {creativepython-0.1.7 → creativepython-0.1.8}/src/zipf.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CreativePython
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: A Python-based software environment for developing algorithmic art projects.
|
|
5
5
|
Author-email: "Dr. Bill Manaris" <manaris@cofc.edu>, Taj Ballinger <ballingertj@g.cofc.edu>, Trevor Ritchie <ritchiets@g.cofc.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "CreativePython"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.8"
|
|
8
8
|
description = "A Python-based software environment for developing algorithmic art projects."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CreativePython
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: A Python-based software environment for developing algorithmic art projects.
|
|
5
5
|
Author-email: "Dr. Bill Manaris" <manaris@cofc.edu>, Taj Ballinger <ballingertj@g.cofc.edu>, Trevor Ritchie <ritchiets@g.cofc.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -567,10 +567,10 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
567
567
|
def __init__(self, display):
|
|
568
568
|
super().__init__()
|
|
569
569
|
self.display = display
|
|
570
|
-
self.lastMouseDown = None
|
|
571
|
-
self.lastMouseMove = None
|
|
572
|
-
self.moveThreshold = 5
|
|
573
|
-
self.
|
|
570
|
+
self.lastMouseDown = None # last location mouse down event occured (set to None when mouse is up)
|
|
571
|
+
self.lastMouseMove = None # last known mouse movement/position
|
|
572
|
+
self.moveThreshold = 5 # maximum distance to trigger a mouse click (down/up in the same place)
|
|
573
|
+
self.draggingItem = None # last item clicked on
|
|
574
574
|
self.itemsUnderMouse = set() # set of items under last known mouse position
|
|
575
575
|
|
|
576
576
|
self.display._view.viewport().installEventFilter(self) # redirect mouse events
|
|
@@ -630,10 +630,14 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
630
630
|
self.lastMouseDown = (x, y) # store mouse down position
|
|
631
631
|
candidates = self._findObjectListAt(x, y) # find all items under mouse
|
|
632
632
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
633
|
+
self.draggingItem = None # clear dragging item
|
|
634
|
+
i = 0
|
|
635
|
+
while self.draggingItem is None and i < len(candidates):
|
|
636
|
+
item = candidates[i]
|
|
637
|
+
if "mouseDrag" in item._callbackFunctions: # if item has a mouseDrag event, store it
|
|
638
|
+
self.draggingItem = item
|
|
639
|
+
i = i + 1
|
|
640
|
+
|
|
637
641
|
|
|
638
642
|
# second, we can send event to display
|
|
639
643
|
self.display._event("mouseDown", [x, y])
|
|
@@ -661,8 +665,8 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
661
665
|
if dx <= self.moveThreshold and dy <= self.moveThreshold: # is it under the threshold?
|
|
662
666
|
isMouseClick = True # yes, this is also a mouseClick
|
|
663
667
|
|
|
664
|
-
# self.focusItem = None # clear focus item
|
|
665
668
|
self.lastMouseDown = None # clear mouse down position
|
|
669
|
+
self.draggingItem = None # clear dragging item
|
|
666
670
|
|
|
667
671
|
# second, we can send event(s) to display
|
|
668
672
|
self.display._event("mouseUp", [x, y])
|
|
@@ -708,11 +712,9 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
708
712
|
# second, we can send event to display
|
|
709
713
|
self.display._event("mouseDrag", [x, y])
|
|
710
714
|
|
|
711
|
-
# last, drag events
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
if self.focusItem is not None:
|
|
715
|
-
moveHandled = self.focusItem._event("mouseDrag", [x,y])
|
|
715
|
+
# last, drag events to the dragging item
|
|
716
|
+
if self.draggingItem is not None:
|
|
717
|
+
moveHandled = self.draggingItem._event("mouseDrag", [x,y])
|
|
716
718
|
else:
|
|
717
719
|
moveHandled = False
|
|
718
720
|
|
|
@@ -774,7 +776,7 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
774
776
|
|
|
775
777
|
def handleKeyPress(self, event):
|
|
776
778
|
"""
|
|
777
|
-
Delivers keyDown and keyType events to the display and
|
|
779
|
+
Delivers keyDown and keyType events to the display and each item in the display.
|
|
778
780
|
keyDown uses the numeric code for the pressed key.
|
|
779
781
|
keyType uses the typed character for the pressed key (if any).
|
|
780
782
|
"""
|
|
@@ -786,20 +788,21 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
786
788
|
self.display._event("keyDown", [key])
|
|
787
789
|
self.display._event("keyType", [char])
|
|
788
790
|
|
|
789
|
-
# last, we send events to
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
791
|
+
# last, we send events to each item
|
|
792
|
+
eventHandled = False
|
|
793
|
+
|
|
794
|
+
for item in self.display.items:
|
|
795
|
+
keyDownHandled = item._event("keyDown", [key])
|
|
796
|
+
keyTypeHandled = item._event("keyType", [char])
|
|
797
|
+
if keyDownHandled or keyTypeHandled:
|
|
798
|
+
eventHandled = True # if either event got handled by any item, report it
|
|
796
799
|
|
|
797
|
-
return
|
|
800
|
+
return eventHandled
|
|
798
801
|
|
|
799
802
|
|
|
800
803
|
def handleKeyRelease(self, event):
|
|
801
804
|
"""
|
|
802
|
-
Delivers keyUp events to the display and
|
|
805
|
+
Delivers keyUp events to the display and each item in the display.
|
|
803
806
|
keyUp uses the numeric code for the pressed key.
|
|
804
807
|
"""
|
|
805
808
|
# first, we need to find some information
|
|
@@ -808,13 +811,15 @@ class EventDispatcher(_QtCore.QObject):
|
|
|
808
811
|
# second, we send event to display
|
|
809
812
|
self.display._event("keyUp", [key])
|
|
810
813
|
|
|
811
|
-
# last, we send event to
|
|
812
|
-
|
|
813
|
-
keyUpHandled = self.focusItem._event("keyUp", [key])
|
|
814
|
-
else:
|
|
815
|
-
keyUpHandled = False
|
|
814
|
+
# last, we send event to each item
|
|
815
|
+
eventHandled = False
|
|
816
816
|
|
|
817
|
-
|
|
817
|
+
for item in self.display.items:
|
|
818
|
+
keyUpHandled = item._event("keyUp", [key])
|
|
819
|
+
if keyUpHandled:
|
|
820
|
+
eventHandled = True # if the event got handled by any item, report it
|
|
821
|
+
|
|
822
|
+
return eventHandled
|
|
818
823
|
|
|
819
824
|
|
|
820
825
|
def _findMousePosition(self, event):
|