Text this: Uma teoria formal de funções tonais generalizadas