You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.2 KiB
27 lines
1.2 KiB
_FLOAT=0; _GATHER=1; _LINES=2; _LFADE=3; _EXPAND=4; _ELLIPSE=5
|
|
|
|
def _toggle():
|
|
root=op('/project1/deep_sound')
|
|
st=root.fetch('state_dict', None)
|
|
if st is None: return
|
|
ast=int(round(st.get('appState',_FLOAT)))
|
|
if ast==_FLOAT:
|
|
st['appState']=_GATHER
|
|
st['gatherTimer']=root.par.Gatherwait.val
|
|
elif ast in (_EXPAND,_ELLIPSE):
|
|
st['dissolving']=1
|
|
else:
|
|
st.update({'appState':_FLOAT,'dissolving':0,'ellipseAlpha':1.,'ellipseDrawT':0.,
|
|
'marqueeAngle':0.,'marqueeAlpha':0.,'expandT':0.,'labelFadeProgress':0.,
|
|
'gatherTimer':-1.,'pauseTimer':-1.,'pid0':0,'pid1':0,'pid2':0,'pid3':0,
|
|
'currentSeg':0,'textAlpha':1.,'lineAlpha':0.,'marqAlpha':0.})
|
|
root.store('line_segs',[])
|
|
root.store('label_alphas',[0.,0.,0.,0.])
|
|
root.store('state_dict', st)
|
|
root.par.Textalpha=float(st.get('textAlpha',1.))
|
|
|
|
def onOffToOn(channel,sampleIndex,val,prev): _toggle()
|
|
def onOnToOff(channel,sampleIndex,val,prev): pass
|
|
def onValueChange(channel,sampleIndex,val,prev): pass
|
|
def onWhileOn(channel,sampleIndex,val,prev): pass
|
|
def onWhileOff(channel,sampleIndex,val,prev): pass
|
|
|