Since I've been making music, I've also been analyzing music, especially my own. If a melody is good, I try to understand why it is good. If there is a note in it that isn't actually harmonious, but still fits in well, I try to understand why that is.
I have developed certain rules for myself that determine how I create melodies. For example, if the note of one melody goes down, the note of another melody should go up at the same time (a rule that also applies to baroque music). Of course, these rules are not hard-and-fast and can be broken, but they can be helpful as a guide. Because that way, I was able to apply the knowledge I had acquired in an old song to the new one, without the songs sounding similar.
You could say that all my life I've been looking for a kind of "formula" that automatically produces good music. So you just put something in it and good music automatically comes out. Of course, I never found this formula, and I always knew that I wouldn't find it - simply because it doesn't exist and never will. But the search for that formula has always been a driving force for my creativity, and will always remain a driving force as long as I make music.