The formal description of musical perception