예제 #1
0
    def _setup_hardware(self):
        def send_subsequence(subseq):
            for msg in subseq:
                self._send_midi(msg)

        sequence_to_run = [
            Task.run(partial(send_subsequence, subsequence))
            for subsequence in split_list(self._messages_to_send, 20)
        ]
        self._tasks.add(Task.sequence(*sequence_to_run))
        self._messages_to_send = []
예제 #2
0
    def _setup_hardware(self):

        def send_subsequence(subseq):
            for msg in subseq:
                self._send_midi(msg)

        sequence_to_run = [ Task.run(partial(send_subsequence, subsequence)) for subsequence in split_list(self._messages_to_send, 20) ]
        self._tasks.add(Task.sequence(*sequence_to_run))
        self._messages_to_send = []