I want to highlight something that most of the other answers suggest, for the benefit of the original poster if they're still following, or others. In learning to compose, like any creative pursuit, it's important to do "exercises" or "studies"—things that you don't actually intend to put forth as finished products, but simply to learn from the experience.
If you want to be a great writer, it's terrible advice to just sit down at the typewriter and start your Great American Novel with "Chapter 1. Once upon a time...", and expect to produce your masterwork all at once. The advice is to write a little bit every day, throwaway jottings, and that the sheer volume of output will hone your craft. There's a book called Exercises in Style in which the author retells a simple story of what he saw on the bus, but in 99 different styles or techniques, simply to broaden his range. Visual artists fill notebooks with sketches; they copy hundreds of existing paintings and try little ideas and approaches. Most of the great musical composers kept "sketchbooks" in which they would jot down ideas, and they went through training that often involved writing in the styles of earlier composers, or writing pieces within rigid rules.
As with most musical pursuits, the best advice is to "get a teacher," who will undoubtedly assign such exercises. Most of the "great" composers of the Western classical tradition (and many other traditions for that matter) had formal training. If you must teach yourself, though, assign yourself exercises to experiment with different textures, styles, and effects. Write counterpoint in all the species. Write fugues. Write "divisions on a ground." Write in four parts but allowing no more than three to be playing at any given moment. Give the melody to the viola ("you'll gain a friend for life!"). Copy the quartets of everyone from Haydn to George Crumb. Mash them up (do Mozart's theme in Debussy's style).
Along the way, not only will you find your own musical "voice," you'll probably acquire lots of ideas and fragments, even brand-new ones, just by being stimulated by these restrictions.