Sorry, no magic bullet - if there were, computer programs would be cranking out pop hits, lounge songs no one could resist, prog-rock to knock the skinny jeans off of all the prog-rockers, and contemporary classical that would take the classical community by storm.
Even those composers such as Xenakis, already mentioned, are creative musicians who make aesthetic choices as they work. The math, as used by those composers, is just a mere premise.
Mathematicians love to think there is a very direct correlation of music and numbers. I've found it impossible to convince those with whom I've discussed the issue otherwise, so I am convinced we musicians and creative artists should leave the mathematicians to their ideal dream world while we get about the inherently intutitve, empirical, innately sloppy and painstaking business of 'making stuff up.'
A tidy formula for success in how to make successful piece of art is just never going to happen.
Best regards.