Cleanup of some old code, corrected the regular inputs
Error on live input and some selection; likely race condition on threads, cleanup maybe
This commit is contained in:
parent
f936aa5fcf
commit
63f10d29ac
|
|
@ -398,6 +398,14 @@ class pulseRackController(object):
|
|||
self.idlastmemorypressed=0
|
||||
self.offset=0 # Offset on the lines
|
||||
|
||||
def initColorLines(self):
|
||||
"Give an initial color the base lines"
|
||||
for line in self.returnRanges.values():
|
||||
for col in range(8):
|
||||
self.returnInterface.addStatus((line,col),"Inactive")
|
||||
self.returnInterface.applyChanges()
|
||||
self.returnInterface.applyColors()
|
||||
|
||||
def pressReceived(self,linecol,val):
|
||||
"""Received an order from the controller, the order must be associated
|
||||
with an actual command and send it to the IOController"""
|
||||
|
|
@ -508,13 +516,13 @@ class AkaiAPCMini(midiPageHandler):
|
|||
|
||||
###########
|
||||
# For debug purposes coloring all neutral to be able to skip initialisation
|
||||
for j in range(5):
|
||||
for i in range(8):
|
||||
self.addStatus((j,i),"Inactive")
|
||||
# for j in range(5):
|
||||
# for i in range(8):
|
||||
# self.addStatus((j,i),"Inactive")
|
||||
|
||||
for j in range(5,8):
|
||||
for i in range(8):
|
||||
self.addStatus((j,i),None)
|
||||
# for j in range(8):
|
||||
# for i in range(8):
|
||||
# self.addStatus((j,i),None)
|
||||
|
||||
def noteReceived(self,note,val):
|
||||
line,col=self._noteToPos[note]
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def printl(label=""):
|
|||
|
||||
eprint=printl("[mPH:ERROR]")
|
||||
dprint,ddprint,iprint,wprint=nopeF,nopeF,nopeF,nopeF
|
||||
bindings.dprint,bindings.ddprint,bindings.iprint=nopeF,nopeF,nopeF
|
||||
# bindings.dprint,bindings.ddprint,bindings.iprint=nopeF,nopeF,nopeF
|
||||
|
||||
if _VERBOSE>=1:
|
||||
wprint=printl("[mPH:WARNING]")
|
||||
|
|
@ -56,8 +56,8 @@ def _onload(self):
|
|||
"Send a reset colors"
|
||||
import time,sys
|
||||
try:
|
||||
HOSTS=[["127.0.0.1",3000]] # Test server
|
||||
#HOSTS=[["192.168.0.140",10500]] # Test server
|
||||
#HOSTS=[["127.0.0.1",3000]] # Test server
|
||||
HOSTS=[["192.168.0.140",10500]] # Test server
|
||||
|
||||
# The socket remote controller
|
||||
controllerPulse1=bindings.analogController(*HOSTS[0])
|
||||
|
|
@ -66,13 +66,14 @@ def _onload(self):
|
|||
handler.addInterfaceOut(self.interfaceOut(1))
|
||||
|
||||
# The pulse module, bound to 3 lines
|
||||
modulePulse=handler.addModule(midiPageHandler.pulseRackController,[4,1,2])
|
||||
modulePulse1=handler.addModule(midiPageHandler.pulseRackController,[1,3,5])
|
||||
|
||||
# The IO interface between the pulse and the controller, one IO is necessary per auxilliary application
|
||||
IOInterface=midiPageHandler.IOInterfacePulse(handler,modulePulse,controllerPulse1)
|
||||
IOInterface=midiPageHandler.IOInterfacePulse(handler,modulePulse1,controllerPulse1)
|
||||
|
||||
# Finishing initialising the controller (Should be done in a thread to avoid locking)
|
||||
controllerPulse1.addFeedbackInterface(IOInterface)
|
||||
modulePulse1.initColorLines()
|
||||
controllerPulse1.connectionSequence()
|
||||
#controllerPulse.keepPinging()
|
||||
except ConnectionRefusedError:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ def launchWithArgs(args):
|
|||
try:
|
||||
local=os.path.dirname(__file__)
|
||||
path=os.path.join(local,"patch","{}.ini".format(args.patch))
|
||||
print(path)
|
||||
conf=configparser.ConfigParser()
|
||||
conf.read(path)
|
||||
interpath="mapping.{}".format(conf["interface"]["mapping"])
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 8ee61ff7a4048dd58bff8e4e793acec629399acb
|
||||
Subproject commit 4d6deaeaa31f00e948ec2d4614d386fb9ac460f6
|
||||
Loading…
Reference in New Issue