def write(self, file, data): write_VLV(data.dt, file) if data.event.value == 0xF0 and data.event.data[-1] == 0xF7: temp = NormalSysExEvent() temp.write(file, data.event) elif data.event.value == 0xF7: temp = AuthSysExEvent() temp.write(file, data.event)
def write(self, file, event): file.write(struct.pack('>B', event.value)) write_VLV(event.length, file) for i in xrange(event.length): file.write(struct.pack('>B', event.data[i]))
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) file.write(struct.pack('>bB', event.key, event.scale))
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) for i in xrange(event.length): file.write(struct.pack('>B', event.data[i]))
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) file.write(struct.pack('>BBBBB', ((event.framep & 0x03) << 5 | (event.hour & 0x1F)), event.min, event.sec, event.fr, event.subfr))
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) file.write(struct.pack('>BBBB', event.numer, event.denom, event.metro, event._32nds))
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) file.write(struct.pack('>' + ('B' * event.length), (event.MPQN >> 16) & 0xFF, (event.MPQN >> 8) & 0xFF, event.MPQN & 0xFF))
def write(self, file, event): file.write(struct.pack('>B', event.type)) #pas de not before car il doit y avoir qu'un seul EoT par trackchunk write_VLV(event.length, file)
def write(self, file, event): if not event.before: file.write(struct.pack('>B', event.type)) write_VLV(event.length, file) file.write(struct.pack('>BB', event.MSB_number, event.LSB_number))
def write(self, file, data): write_VLV(data.dt, file) file.write(struct.pack('>B', data.value)) event = MetaEventFactory.get(data.event.type) event.write(file, data.event)
def write(self, file, data): write_VLV(data.dt, file) event = MidiEventFactory.get(data.event.value) event.write(file, data.event)