Browse Source

shadow support for differently sized patterns

master
Nils 3 years ago
parent
commit
33064ec057
  1. 11
      qtgui/pattern_grid.py

11
qtgui/pattern_grid.py

@ -425,10 +425,17 @@ class PatternGrid(QtWidgets.QGraphicsScene):
def createShadow(self, exportDict):
"""Receives steps from another track and display them as shadoy steps in the current one
as a reference. Creating a new shadow does not delete the old one.
It is possible that the source pattern is longer (multiplicator) than our own. We ignore
all shadows beyond our own length.
Same is true if the source has more notes (pitches) than ours. We do naive x/y mapping.
Making sense of that is up to the user :)
"""
for x, y in ((s["index"], s["pitch"]) for s in exportDict["pattern"]):
self._steps[(x,y)].shadow = True # (x,y):Step()
self._steps[(x,y)].setApperance()
if (x,y) in self._steps:
self._steps[(x,y)].shadow = True # (x,y):Step()
self._steps[(x,y)].setApperance()
def removeShadows(self):
for step in self._steps.values():

Loading…
Cancel
Save