def key_up_event(event, response, chan):
	channel = synth.channels[int(chan)]
	elem = minidom.Document().createElement("note")

	elem.setAttribute("start", str(Server.getTime(channel.getEnvelope().startTime)))
	elem.setAttribute("end", str(Server.getTime(time.time())))
	elem.setAttribute("note", str(channel.getNote()))
	elem.setAttribute("vol", str(channel.getVelocity()))
	elem.setAttribute("chan", str(chan))
	appendLog(elem)
	channel.noteOff()
def appendLog(event):
	event.setAttribute("eventtime", str(Server.getTime(time.time())))
	_log.append(event)