Changeset - 1bb30b0eaa38
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-06-03 22:46:04
drewp@bigasterisk.com
reformat
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/midifade/midifade.py
Show inline comments
 
@@ -26,6 +26,7 @@ MAX_SEND_RATE = 30
 
currentFaders = {}  # midi control channel num : FaderUri
 
ctx = URIRef(showUri() + '/fade')
 

	
 

	
 
def compileCurrents(graph):
 
    currentFaders.clear()
 
    try:
 
@@ -50,9 +51,11 @@ def getCurMappedPage(g: SyncedGraph):
 
    mapping = getGraphMappingNode(g)
 
    return g.value(mapping, L9['outputs'])
 

	
 

	
 
def setCurMappedPage(g: SyncedGraph, mapping: URIRef, newPage:URIRef):
 
    g.patchObject(ctx, mapping, L9.outputs, newPage)
 

	
 

	
 
def getChansToFaders(g: SyncedGraph) -> Dict[int, URIRef]:
 
    fadePage = getCurMappedPage(g)
 
    ret = []
 
@@ -84,6 +87,7 @@ def changePage(g: SyncedGraph, dp: int):
 
    newPage =allPages[newIdx]
 
    setCurMappedPage(g, mapping, newPage)
 

	
 

	
 
def writeHwValueToGraph(graph: SyncedGraph, ctx, fader: URIRef, strength: float):
 
    log.info(f'setFader(fader={fader}, strength={strength:.03f}')
 
    valueLit = decimalLiteral(round(strength, 3))
0 comments (0 inline, 0 general)