some code cleaning
This commit is contained in:
parent
946528cb67
commit
297220fddc
@ -6,7 +6,7 @@ Display Link, OSC, Artnet and Midi timecodes
|
||||
Listen on all network interfaces and midi interfaces
|
||||
|
||||
OSC port : 9001
|
||||
Artnet Port : 6454
|
||||
Artnet port : 6454
|
||||
|
||||
Needs timecode, rtmidi, mido
|
||||
|
||||
@ -31,3 +31,7 @@ Needs timecode, rtmidi, mido
|
||||
- BPM computed from received clock messages
|
||||
- MTC (quarterframes).Tested against mtc_generate from https://github.com/jeffmikels/timecode_tools.git
|
||||
|
||||
To Run (python 3.8)
|
||||
|
||||
python3 tcview.py
|
||||
|
||||
|
15
tcview.py
15
tcview.py
@ -251,8 +251,6 @@ def BPMAdj(val1, keyname):
|
||||
newtempo(currentbpm-1)
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Artnet
|
||||
#
|
||||
@ -312,7 +310,7 @@ def artnetHandler(data):
|
||||
sequence = data[12]
|
||||
physical = data[13]
|
||||
print(data[0:7], "version :",data[10],data[11], "sequence :", sequence, "physical :", physical, "type :", data[9],data[8])
|
||||
#motherosc.send('/artnet/package', "version : "+str(data[10])+"."+str(data[11]) +" sequence : "+str(sequence)+ " physical : "+str(physical)+" type : " +str(data[9])+" "+str(data[8]))
|
||||
|
||||
# OpDmx
|
||||
if data[8] == 0x00 and data[9] == 0x50:
|
||||
|
||||
@ -321,13 +319,8 @@ def artnetHandler(data):
|
||||
lengthhi = data[16]
|
||||
length = data[17]
|
||||
dmx = data[18:]
|
||||
#for i in range(0,len(dmx)):
|
||||
#for i in range(0,5):
|
||||
# print("canal",i,"value",dmx[i])
|
||||
#print(dmx)
|
||||
print("OpDmx : subuni", subuni, "net", net ,'length', len(dmx))
|
||||
#motherosc.send('/artnet/OpDmx :', "subuni " +str(subuni)+ " net "+str(net) +' length '+str(len(dmx)))
|
||||
#toleds()
|
||||
|
||||
|
||||
# OpTimeCode
|
||||
if data[8] == 0x00 and data[9] == 0x97:
|
||||
@ -338,12 +331,10 @@ def artnetHandler(data):
|
||||
hours = data[17]
|
||||
codetype = data[18]
|
||||
print("OptimeCode : hours", hours, "minutes", minutes, "seconds", seconds, "frames", frames,"type", codetypes[codetype])
|
||||
#motherosc.send('/artnet/timecode', str(hours)+ ":"+str(minutes)+ ":"+ str(seconds)+ ":"+str(frames)+" timecode type "+str(codetype))
|
||||
interface.update_artnetcode(str(hours)+ ":"+str(minutes)+ ":"+ str(seconds)+ ":"+str(frames)+" "+codetypes[codetype])
|
||||
|
||||
if data[8] == 0x00 and data[9] == 0x98:
|
||||
print("OpTimeSync")
|
||||
#motherosc.send('/artnet/OpTimeSync', 1)
|
||||
|
||||
|
||||
|
||||
@ -472,8 +463,6 @@ class Interface(Frame):
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
||||
#print(dmxdata)
|
||||
myframe = Tk()
|
||||
|
||||
OSC_Start()
|
||||
|
Loading…
Reference in New Issue
Block a user