This is a very good question! The answer you’ll usually get is: “the rule is that there is no rule” … or some boring stuff about hitting chord tones on downbeats, which usually leads to uninspiring stuff.
So… I got no answer but I just made up some random exercises:
-
Take a melody that you like, and find a cool way to modify it (change rhythm, tonality, add/remove notes, whatever!)
-
generate a completely random chord progression, and create a simple melody that goes well above it. You can start with steady 8th notes and go from there.
-
generate a random arrangement of 5 or 6 notes (with dice, picking up pieces of paper, whatever!), then supply rhythm, underlying chords, build variations etc.
-
generate a random rhythm and then put notes on it
-
take a famous melody and play it backwards, then find a way to modify it to make it nice
-
copy the rhythm of a famous melody, change all the notes and harmony. IF the original was happy try to make it sad, etc.
Now some words from someone who (unlike me) can actually do this