Mathematical functions for musical analysis, processing, synthesis or composition