Highly doubt that most of them thought about math when composing, it just comes naturally. lol
Although the golden ratio in particular is questionable, they obviously thought about math when composing.
Is not the humble credit card made on the golden ratio?