Mozart had a dice game to create minuets.
(http://sunsite.univie.ac.at/Mozart/dice/)
(http://en.wikipedia.org/wiki/Musikalisches_W%C3%BCrfelspiel)
Your question is tricky because you haven't mentioned anything about time signatures or length of time for each note, nor how many octaves you want to work with.
A regular piano has 88 keys.
So, 88 notes with a 32 note length sequence (with fixed times etc) means 88 ^ 32 or 1.6728057e+62.