An attempt to create a functional model of musical harmony