Mercurial > code > home > repos > light9
changeset 1395:b6ba0e7d126b
workaround for missing effects in songs
Ignore-this: 8433bee972cfc440067149c45e1ffab6
author | drewp@bigasterisk.com |
---|---|
date | Sun, 14 Jun 2015 20:26:36 +0000 |
parents | 0bfaeaa40cfe |
children | 3e89b00be550 |
files | light9/Effects.py light9/effecteval/effectloop.py |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/Effects.py Sun Jun 14 20:05:18 2015 +0000 +++ b/light9/Effects.py Sun Jun 14 20:26:36 2015 +0000 @@ -22,7 +22,7 @@ pixels = [] def __repr__(self): - return '<Strip which=%r px0=%r>' % (self.which, self.pixels[0,:]) + return '<Strip which=%r px0=%r>' % (self.which, self.pixels[0]) @classmethod def solid(cls, which='L', color=(1,1,1), hsv=None):
--- a/light9/effecteval/effectloop.py Sun Jun 14 20:05:18 2015 +0000 +++ b/light9/effecteval/effectloop.py Sun Jun 14 20:26:36 2015 +0000 @@ -234,6 +234,18 @@ for out in outputs: log.debug('combine output %r', out) + + + # workaround- somehow these subs that drive fx aren't + # sending their fx, so we react to the sub + if isinstance(out, Submaster.Submaster) and '*' in out.name: + level = float(out.name.split('*')[1]) + n = out.name.split('*')[0] + if n == 'widered': out = Effects.Strip.solid('W', (1,0,0)) * level + if n == 'widegreen': out = Effects.Strip.solid('W', (0,1,0)) * level + if n == 'wideblue': out = Effects.Strip.solid('W', (0,0,1)) * level + if n == 'whiteled': out = Effects.Strip.solid('W', (1,.5,.5)) * level + if isinstance(out, Effects.Blacklight): # no picking yet #key = 'blacklight%s' % out.which