Ejemplo n.º 1
0
 def parse_data_buffer(self):
     JStationSysexEvent.parse_data_buffer(self)
     # no length in this message
     self.req_procedure = self.read_next_bytes(2)
     self.error_code = self.read_next_bytes(2)
     self.error_msg = self.ERRORS.get(self.error_code)
     if self.error_msg == None:
          self.error_msg = '*Unknown code*'
Ejemplo n.º 2
0
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)
        data_length = self.read_next_bytes(4)

        if self.is_valid:
            self.receive_channel = self.read_next_bytes(2)
            self.transmit_channel = self.read_next_bytes(2)
            self.sysex_channel = self.read_next_bytes(2)
Ejemplo n.º 3
0
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)
        if self.is_valid():
            self.bank = self.read_next_bytes(2)
            self.number = self.read_next_bytes(2)
            self.unknown_data = self.read_next_bytes(2)
            self.null_len = self.read_next_bytes(4)

            self.isolated = (self.number == 0)
Ejemplo n.º 4
0
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)
        data_len = self.read_next_bytes(4)
        if data_len > 2:
            # For some reasons, data len in a bank export from J-Edit
            # is 4 when the actual size to read is 2 just like
            # for the regular StartBankDumpResponse sent by the J-Station
            print('Fixing data len %d for StartBankDumpResponse' % (data_len))
            data_len = 2

        if self.is_valid():
            self.total_len = self.read_next_bytes(2 * data_len)
Ejemplo n.º 5
0
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)

        bank_nb = self.read_next_bytes(2)
        prg_nb = self.read_next_bytes(2)

        data_len = self.read_next_bytes(4)
        if self.is_valid():
            self.program = Program(bank_nb,
                                   prg_nb,
                                   sysex_buffer=self.sysex_buffer,
                                   data_len=data_len)
            if not self.program.is_valid:
                self.has_error = True
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)
        data_len = self.read_next_bytes(4)

        if self.is_valid():
            has_changed = False
            if self.version == 2:
                has_changed = self.read_next_bytes(2)
                data_len -= 1

            self.program = Program(sysex_buffer=self.sysex_buffer,
                                   data_len=data_len,
                                   has_changed=has_changed)
            if not self.program.is_valid:
                self.has_error = True
    def parse_data_buffer(self):
        JStationSysexEvent.parse_data_buffer(self)
        data_len = self.read_next_bytes(4)

        if self.is_valid():
            if data_len == 6:
                self.stereo_mono = self.read_next_bytes(2)
                self.dry_track = self.read_next_bytes(2)
                self.digital_out_level = self.read_next_bytes(2)
                self.global_cabinet = self.read_next_bytes(2)
                self.midi_merge = self.read_next_bytes(2)
                self.midi_channel = self.read_next_bytes(2)
            else:
                print('UtilitySettingsResponse: data len error: '\
                      'got %d expected 6'%(data_len))
Ejemplo n.º 8
0
 def parse_data_buffer(self):
     JStationSysexEvent.parse_data_buffer(self)
     self.prg_nb = self.read_next_bytes(2)
Ejemplo n.º 9
0
 def parse_data_buffer(self):
     JStationSysexEvent.parse_data_buffer(self)
     self.response_on = self.read_next_bytes(2)
Ejemplo n.º 10
0
 def parse_data_buffer(self):
     JStationSysexEvent.parse_data_buffer(self)
     data_length = self.read_next_bytes(4)
     if self.is_valid:
         for index in range(0, data_length):
             self.prg_indices.append(self.read_next_bytes(2))