I guess my two constant creative activities are cooking food and composing music, and all of a sudden, while I was making vegan Chili today, I realized that they are quite similar.
First of all, cooking often requires a recipe. A piece of music in progress has one too: the instrumentation, form, key, and tempo of the piece. Cooking requires ingredients that work harmoniously together. So does a piece of music. Sometimes we use unusual food combinations (like sweetness and spice together--raisins and curry come to mind), and sometimes we use unusual harmonic combinations: dissonant intervals interspersed with consonant ones. Once the form is established in cooking, we have given parameters that we know will work, and we have ones that we know won't work. It is, for example, impossible to saute onions in raspberry jam.
My wastebasket has seen many examples of musical parallels to that sort of thing. If you want to have raspberries and onions in the same dish, you figure out ways of cooking the onions properly and adding the raspberries so that they do not fall apart and destroy your frying pan. If you want to have unlike elements working together in a piece of music you have to figure out a way for both (or all) of the elements to be heard. Every situation is different, and each problem needs its own unique solution.
After a lot of practice cooking you just know what ingredients work together. You can invent recipes based on classic models that taste totally different from their prototypes. It is the same with writing music. You can add an ethnic identity to a dish you are cooking with a combination of spices. You can do the same with a piece of music by incorporating harmonic or rhythmic elements and/or instruments from a particular culture, or you can combine elements from different cultures.
And then there's the question of taste...
Now it's time to get back to work.