Changeset - 3e89b00be550
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 10 years ago 2015-06-14 20:33:19
drewp@bigasterisk.com
more leds in sub workaround
Ignore-this: d2cb74ad15845be6c917716ec33eeb0d
1 file changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
light9/effecteval/effectloop.py
Show inline comments
 
@@ -104,13 +104,12 @@ class EffectLoop(object):
 
        if self.currentPlaying:
 
            t += max(0, now - self.songTimeFetch)
 
        return t
 

	
 
    @inlineCallbacks
 
    def sendLevels(self):
 
        print ''
 
        t1 = time.time()
 
        log.debug("time since last call: %.1f ms" % (1000 * (t1 - self.lastSendLevelsTime)))
 
        self.lastSendLevelsTime = t1
 
        try:
 
            with self.stats.sendLevels.time():
 
                if self.currentSong is not None:
 
@@ -232,22 +231,23 @@ class LedLoop(EffectLoop):
 
                    'blacklight0': 0, 'blacklight1': 0,
 
                    'W': numpy.zeros((1, 3), dtype=numpy.float16)}
 
        
 
        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
 
            # sending their fx during playback (KC only), so we react
 
            # to the sub itself
 
            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 n == 'widered': out = Effects.Strip.solid('LRW', (1,0,0)) * level
 
                if n == 'widegreen': out = Effects.Strip.solid('LRW', (0,1,0)) * level
 
                if n == 'wideblue': out = Effects.Strip.solid('LRW', (0,0,1)) * level
 
                if n == 'whiteled': out = Effects.Strip.solid('LRW', (1,.7,.7)) * level
 
                if n == 'blacklight': out = Effects.Blacklight(level) # missing blues!
 
 
 
            if isinstance(out, Effects.Blacklight):
 
                # no picking yet
 
                #key = 'blacklight%s' % out.which
 
                for key in ['blacklight0', 'blacklight1']:
 
                    combined[key] = max(combined[key], out)
0 comments (0 inline, 0 general)