Changeset - a093a69067fb
[Not reviewed]
default
0 3 0
drewp@bigasterisk.com - 9 years ago 2016-06-12 20:58:19
drewp@bigasterisk.com
strobe support for quantum
Ignore-this: de605da71370bed0ff4a15d3898bf25b
3 files changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/collector/device.py
Show inline comments
 
@@ -165,25 +165,24 @@ def toOutputAttrs(deviceType, deviceAttr
 
            L9['auraGreen']: 0,
 
            L9['auraBlue']: 0,
 
        }
 
        out[L9['pan']], out[L9['panFine']] = fine16Attr(L9['rx'])
 
        out[L9['tilt']], out[L9['tiltFine']] = fine16Attr(L9['ry'])
 
        out[L9['red']], out[L9['green']], out[L9['blue']] = rgbAttr(L9['color'])
 
        out[L9['white']] = 0
 

	
 
        return out
 
    elif deviceType == L9['MacQuantum']:
 
        out = {
 
            L9['dimmerFadeLo']: 0,
 
            L9['shutter']: 30, # strobe is in here too: slow @ 50 -> fast @ 200
 
            L9['fixtureControl']: 0,
 
            L9['fx1Select']:  0,
 
            L9['fx1Adjust']:  0,
 
            L9['fx2Select']:  0,
 
            L9['fx2Adjust']:  0,
 
            L9['fxSync']:  0,            
 
            }
 

	
 
        # note these values are set to 'fade', so they update slowly. Haven't found where to turn that off.
 
        out[L9['cyan']], out[L9['magenta']], out[L9['yellow']] = cmyAttr(L9['color'])
 
        
 
        out[L9['focusHi']], out[L9['focusLo']] = fine16Attr(L9['focus'])
 
@@ -197,22 +196,28 @@ def toOutputAttrs(deviceType, deviceAttr
 
            L9['spider']: 36,
 
            L9['windmill']: 41,
 
            L9['limbo']: 46,
 
            L9['brush']: 51,
 
            L9['whirlpool']: 56,
 
            L9['stars']: 61,
 
            }[deviceAttrSettings.get(L9['gobo'], L9['open'])]
 

	
 
        # my goboSpeed deviceAttr goes 0=stopped to 1=fastest (using one direction only)
 
        x = .5 + .5 * floatAttr(L9['goboSpeed'])
 
        out[L9['goboSpeedHi']] = _8bit(x)
 
        out[L9['goboSpeedLo']] = _8bit((x * 255) % 1.0)
 

	
 
        strobe = floatAttr(L9['strobe'])
 
        if strobe < .1:
 
            out[L9['shutter']] = 30
 
        else:
 
            out[L9['shutter']] = 50 + int(150 * (strobe - .1) / .9)
 
        
 
        out.update( {
 
            L9['colorWheel']: 0,
 
            L9['goboStaticRotate']: 0,
 
            L9['prismRotation']: _8bit(floatAttr(L9['prism'])),
 
            L9['iris']: _8bit(floatAttr(L9['iris']) * (200/255)),
 
            })
 
        return out
 
    else:
 
        raise NotImplementedError('device %r' % deviceType)
show/dance2016/deviceClass.n3
Show inline comments
 
@@ -2,24 +2,26 @@
 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
 

	
 
:color              a :DeviceAttr; :dataType :color .
 
:rx                 a :DeviceAttr; :dataType :angle .
 
:ry                 a :DeviceAttr; :dataType :angle .
 
:uv                 a :DeviceAttr; :dataType :scalar .
 
:brightness         a :DeviceAttr; :dataType :scalar .
 
:zoom               a :DeviceAttr; :dataType :scalar ;
 
  rdfs:comment "maybe make this a separate 'wide to narrow' type" .
 
:focus              a :DeviceAttr; :dataType :scalar .
 
:iris               a :DeviceAttr; :dataType :scalar .
 
:prism              a :DeviceAttr; :dataType :scalar .
 
:strobe             a :DeviceAttr; :dataType :scalar;
 
  rdfs:comment "0=none, 1=fastest" .
 
:goboSpeed          a :DeviceAttr; :dataType :scalar ;
 
  rdfs:comment "0=stopped, 1=rotate the fastest".
 
:quantumGoboChoice  a :DeviceAttr; :dataType :choice;
 
  :choice :open, :spider, :windmill, :limbo, :brush, :whirlpool, :stars .
 

	
 
:SimpleDimmer a :DeviceClass;
 
  :deviceAttr :brightness;
 
  :attr
 
    [ :outputAttr :level; :dmxOffset 0 ] .
 

	
 
:ChauvetColorStrip a :DeviceClass;
 
  :deviceAttr :color;
 
@@ -99,27 +101,27 @@
 
    [ :dmxOffset 16 ; :outputAttr :fx2Select ],
 
    [ :dmxOffset 17 ; :outputAttr :fx2Adjust ],
 
    [ :dmxOffset 18 ; :outputAttr :fxSync ],
 
    [ :dmxOffset 19 ; :outputAttr :auraShutter ], # use 22
 
    [ :dmxOffset 20 ; :outputAttr :auraDimmer ],
 
    [ :dmxOffset 21 ; :outputAttr :auraColorWheel ],
 
    [ :dmxOffset 22 ; :outputAttr :auraRed ],
 
    [ :dmxOffset 23 ; :outputAttr :auraGreen ],
 
    [ :dmxOffset 24 ; :outputAttr :auraBlue ] .
 

	
 
:MacQuantum a :DeviceClass; 
 
  :docs <http://www.martin.com/Martin.Download.aspx?file=/files/files/productdocuments/11_MANUALS/999/35000279b%20UM_MACQuantumProfile_EN_B.pdf>;
 
  :deviceAttr :color, :rx, :ry, :zoom, :focus, :iris, :prism, :quantumGoboChoice, :goboSpeed;
 
  :deviceAttr :color, :rx, :ry, :zoom, :focus, :iris, :prism, :quantumGoboChoice, :goboSpeed, :strobe;
 
  :attr
 
    [ :dmxOffset 0; :outputAttr :shutter ; rdfs:comment "use 30" ],
 
    [ :dmxOffset 0; :outputAttr :shutter ],
 
    [ :dmxOffset 1; :outputAttr :dimmerFadeHi ],
 
    [ :dmxOffset 2; :outputAttr :dimmerFadeLo ],
 
    [ :dmxOffset 3; :outputAttr :cyan ],
 
    [ :dmxOffset 4; :outputAttr :magenta ],
 
    [ :dmxOffset 5; :outputAttr :yellow ],
 
    [ :dmxOffset 6; :outputAttr :colorWheel ; rdfs:comment "use 0" ],
 
    [ :dmxOffset 7; :outputAttr :goboChoice ],
 
    [ :dmxOffset 8; :outputAttr :goboSpeedHi ],
 
    [ :dmxOffset 9; :outputAttr :goboSpeedLo ],
 
    [ :dmxOffset 10; :outputAttr :goboStaticRotate ],
 
    [ :dmxOffset 11; :outputAttr :prismRotation ],
 
    [ :dmxOffset 12; :outputAttr :iris ],
show/dance2016/effect.n3
Show inline comments
 
@@ -12,24 +12,26 @@
 
#     :chaseTempo 120; :code "chase()"; :devices dev:colorStrip, dev:moving1;
 
#     :fadeShape :fadeCurve1; :palette "#0000ff", "#ff0000", "#ffffff";
 
#     :publishAttr :strength .
 

	
 
#effect:Strobe a :Effect; rdfs:label "strobe"; :publishAttr :duty, :offset, :rate, :strength .
 

	
 

	
 
effect:animRainbow a :Effect; rdfs:label "animRainbow"; :publishAttr :strength, :rate ; :group "anim".
 

	
 
effect:orangeSearch a :Effect; :publishAttr :strength ; :group "anim".
 
effect:lightning a :Effect; :publishAttr :strength ; :group "anim".
 

	
 
effect:strobewarm :group "anim".
 

	
 
effect:house :group "main" .
 
effect:cyc :group "main" .
 

	
 
effect:centerSpot a :Effect; rdfs:label "center spot";
 
     :group "main"; :order 3; :publishAttr :strength;
 
     :setting effect:centerSpots0, effect:centerSpots1, effect:centerSpots2, effect:centerSpots3, effect:centerSpots4 .
 
effect:centerSpots0 :device dev:q2; :deviceAttr :color;
 
     :scaledValue "#ffffff" .
 
effect:centerSpots1 :device dev:q2; :deviceAttr :focus;
 
     :value 0.31 .
 
effect:centerSpots2 :device dev:q2; :deviceAttr :rx;
 
     :value 0.50 .
0 comments (0 inline, 0 general)