Exemplo n.º 1
0
def Run():


	Left = []
	Right = []
	counter =0
	#lj.SendLJ("/custom1/start 1")

	# OSC Server callbacks
	print("Starting OSC server at",myIP," port",OSCinPort,"...")
	oscserver.addMsgHandler( "/custom1/ljscene", OSCljscene )

	# Add OSC generic plugins commands : 'default", /ping, /quit, /pluginame/obj, /pluginame/var, /pluginame/adddest, /pluginame/deldest
	lj.addOSCdefaults(oscserver)

	try:

		while lj.oscrun:

			lj.OSCframe()
			Left = []
			Right = []
	
			x = vertices[0][0]
			y = vertices[0][1]
			z = vertices[0][2]
	
			# LJ tracers will "move" the laser to this first point in black, then move to the next with second point color.
			# For more accuracy in dac emulator, repeat this first point.

			# Generate all points in square.
			for point in face:
				x = vertices[point][0]
				y = vertices[point][1]
				z = vertices[point][2]

				Left.append(Proj(x+LeftShift(z*25),y,z,0,counter,0))
				Right.append(Proj(x+RightShift(z*25),y,z,0,counter,0))	
	

			lj.PolyLineOneColor(Left, c = Leftsquare.color , layer = Leftsquare.layer, closed = Leftsquare.closed)
			lj.PolyLineOneColor(Right, c = Rightsquare.color , layer = Rightsquare.layer, closed = Rightsquare.closed)

			lj.DrawDests()
	
			
			time.sleep(0.1)
	
			counter += 1
			if counter > 360:
				counter = 0

	except KeyboardInterrupt:
		pass

	# Gently stop on CTRL C

	finally:

		lj.ClosePlugin()
Exemplo n.º 2
0
oscserver.addMsgHandler("/aurora/Xcoord", OSCXcoord)
oscserver.addMsgHandler("/aurora/Ycoord", OSCYcoord)
oscserver.addMsgHandler("/aurora/linesize", OSClinesize)
oscserver.addMsgHandler("/aurora/scale", OSCale)
oscserver.addMsgHandler("/aurora/radius", OSCradius)
oscserver.addMsgHandler("/aurora/scandots", OSCandots)
oscserver.addMsgHandler("/aurora/scim", OSCim)

oscserver.addMsgHandler("/aurora/intensity", OSCintensity)
oscserver.addMsgHandler("/aurora/rotspeed", OSCrotspeed)
oscserver.addMsgHandler("/aurora/transamt", OSCtransamt)
oscserver.addMsgHandler("/aurora/rotdirec", OSCrotdirec)
oscserver.addMsgHandler("/aurora/trckr/frame", OSCtrckr)
# Add OSC generic layerugins commands : 'default", /ping, /quit, /pluginame/obj, /pluginame/var, /pluginame/adddest, /pluginame/deldest
lj.addOSCdefaults(oscserver)
oscserver.addMsgHandler("default", OSChandler)
#anim.prepareSTARFIELD()

beatstepUI()

#beatstep.UpdatePatch(beatstep.patchnumber)

print("Updating Aurora UI...")
UpdateAuroraUI()

midix.check()

animSpeeds()

audioR = 1