Exemplo n.º 1
0
	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)
Exemplo n.º 2
0
	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]))
Exemplo n.º 3
0
	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))
Exemplo n.º 4
0
	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]))
Exemplo n.º 5
0
	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))
Exemplo n.º 6
0
	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))
Exemplo n.º 7
0
	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))
Exemplo n.º 8
0
	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)
Exemplo n.º 9
0
	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))		
Exemplo n.º 10
0
	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)
Exemplo n.º 11
0
	def write(self, file, data):
		write_VLV(data.dt, file)
		event = MidiEventFactory.get(data.event.value)
		event.write(file, data.event)