Пример #1
0
        def _read(self):
            self.v_time = VlqBase128Be(self._io)
            self.event_header = self._io.read_u1()
            if self.event_header == 255:
                self.meta_event_body = self._root.MetaEventBody(
                    self._io, self, self._root)

            if self.event_header == 240:
                self.sysex_body = self._root.SysexEventBody(
                    self._io, self, self._root)

            _on = self.event_type
            if _on == 224:
                self.event_body = self._root.PitchBendEvent(
                    self._io, self, self._root)
            elif _on == 144:
                self.event_body = self._root.NoteOnEvent(
                    self._io, self, self._root)
            elif _on == 208:
                self.event_body = self._root.ChannelPressureEvent(
                    self._io, self, self._root)
            elif _on == 192:
                self.event_body = self._root.ProgramChangeEvent(
                    self._io, self, self._root)
            elif _on == 160:
                self.event_body = self._root.PolyphonicPressureEvent(
                    self._io, self, self._root)
            elif _on == 176:
                self.event_body = self._root.ControllerEvent(
                    self._io, self, self._root)
            elif _on == 128:
                self.event_body = self._root.NoteOffEvent(
                    self._io, self, self._root)
Пример #2
0
 def _read(self):
     self.len_header_and_len = VlqBase128Be(self._io)
     self._raw_column_serials = self._io.read_bytes((self.len_header_and_len.value - 1))
     io = KaitaiStream(BytesIO(self._raw_column_serials))
     self.column_serials = self._root.Serials(io, self, self._root)
     self.column_contents = [None] * (len(self.column_serials.entries))
     for i in range(len(self.column_serials.entries)):
         self.column_contents[i] = self._root.ColumnContent(self.column_serials.entries[i], self._io, self, self._root)
Пример #3
0
 def _read(self):
     self.len = VlqBase128Be(self._io)
     self.data = self._io.read_bytes(self.len.value)
Пример #4
0
 def _read(self):
     self.meta_type = self._root.MetaEventBody.MetaTypeEnum(
         self._io.read_u1())
     self.len = VlqBase128Be(self._io)
     self.body = self._io.read_bytes(self.len.value)
Пример #5
0
 def _read(self):
     self.code = VlqBase128Be(self._io)
Пример #6
0
 def _read(self):
     self.left_child_page = self._io.read_u4be()
     self.len_payload = VlqBase128Be(self._io)
     self._raw_payload = self._io.read_bytes(self.len_payload.value)
     io = KaitaiStream(BytesIO(self._raw_payload))
     self.payload = self._root.CellPayload(io, self, self._root)
Пример #7
0
 def _read(self):
     self.left_child_page = self._io.read_u4be()
     self.row_id = VlqBase128Be(self._io)
Пример #8
0
 def _read(self):
     self.entries = []
     i = 0
     while not self._io.is_eof():
         self.entries.append(VlqBase128Be(self._io))
         i += 1