diff --git a/mapping/midiPageHandler.py b/mapping/midiPageHandler.py index 9263fec..79567b5 100644 --- a/mapping/midiPageHandler.py +++ b/mapping/midiPageHandler.py @@ -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] diff --git a/mapping/panapulse.py b/mapping/panapulse.py index c77e528..e7dbffc 100644 --- a/mapping/panapulse.py +++ b/mapping/panapulse.py @@ -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: diff --git a/midiRebind.py b/midiRebind.py index dfa9f66..c405416 100755 --- a/midiRebind.py +++ b/midiRebind.py @@ -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"]) diff --git a/pythonAnalogWay b/pythonAnalogWay index 8ee61ff..4d6deae 160000 --- a/pythonAnalogWay +++ b/pythonAnalogWay @@ -1 +1 @@ -Subproject commit 8ee61ff7a4048dd58bff8e4e793acec629399acb +Subproject commit 4d6deaeaa31f00e948ec2d4614d386fb9ac460f6