Python music serializer