@@ -0,0 +1,1430 @@
+import Axon%0A%0Aclass Polyphoniser(Axon.AdaptiveCommsComponent.AdaptiveCommsComponent):%0A    polyphony = 8%0A    def __init__(self, **argd):%0A        super(Polyphoniser, self).__init__(**argd)%0A        self.voices = %5B%5D%0A        for i in range(self.polyphony):%0A            self.addOutbox(%22voice%25i%22 %25 i)%0A            self.voices.append(None)%0A%0A    def main(self, **argd):%0A        while 1:%0A            if self.dataReady(%22inbox%22):%0A                address, arguments = self.recv(%22inbox%22)%0A                address = address.split(%22/%22)%5B-1%5D%0A                if address == %22On%22:%0A                    noteNumber = arguments%5B0%5D%0A                    if None in self.voices:%0A                        index = self.voices.index(None)%0A                        self.voices%5Bindex%5D = noteNumber%0A                        self.send((address, arguments), %22voice%25i%22 %25 index)%0A                    else:%0A                        # Verbose - we ignore the note if the level of polyphony%0A                        # isn't high enough%0A                        pass%0A                elif address == %22Off%22:%0A                    noteNumber, frequency = arguments%0A                    if noteNumber in self.voices:%0A                        index = self.voices.index(noteNumber)%0A                        self.voices%5Bindex%5D = None%0A                        self.send((address, arguments), %22voice%25i%22 %25 index)%0A            if not self.anyReady():%0A                self.pause()%0A            yield 1%0A%0A

Add polyphoniser component for routeing note on and off messages around a number of voices