A melody isn’t just a melody. A riff isn’t just a riff. A bassline isn’t just a bassline. With the right knowledge, each one is a gateway.
A gateway to more ideas, so you can finish songs instead of getting stuck.
A gateway to better ideas, so you can make more interesting songs. More emotionally powerful songs. Songs that, at every point, are tuned to provide just the right levels of novelty and coherence. Never boring, never chaotic.
Variables
If an idea is a gateway, how do you open it and walk through? First, stop seeing an idea as a single, complete thing. Like a machine with many parts, every musical idea consists of many choices - each of which can be changed.
Here are ten such choices: pitch, rhythm, register, articulation, harmony, dynamics, timbre, key, tempo, and meter.
That makes ten musical directions you can travel in. Ten new ideas, just a step away. Pick one and you'll be standing on a new idea, with ten different ideas surrounding you. Just two steps away, hundreds of ideas are in reach. Three steps, thousands.
(In three steps, for instance, you could turn a slow, high-pitched piano melody into a fast, low-pitched guitar riff.)
Working with notes
Above all, you'll work with notes. You'll add and remove them. Make them longer and shorter. Move them up, down, left, and right. By different amounts. Individually and in groups.
These operations are difficult to do in your head. They’re easier with a music notation program like Dorico, where you can see every note and you’ve got total control over each one.
Indeed, it can be a revelation to work visually. To think in terms of notes and contours, not fingers, fretboards, or gut feel. You can see the shape of a melody - the peaks and valleys, the steepness of its rises and falls. You can see the busy spots and the open spaces. You can see how to split an idea and rearrange its parts. You can end up creating things that would never occur to you otherwise.
By the way, if you can use a program like Ableton, you can use a music notation program. You don't need to sightread music. (I can't.) Instead, Dorico plays the music for you while you compose, and, when you want to record, it automatically generates easy-to-customize tabs for what you've written. (I use the free version.)
High-level variables
When exploring variations of an idea, you can do more than change low-level variables like pitch. You can also change things like intensity, emotion, and genre. This usually involves changing several low-level variables at once.
For instance, to turn a classical symphony into a rock song, you'd need to change the instruments, add a drum part, and maybe transpose all the notes to make them playable on guitar and bass.
Check out David Bruce's video on variation, and Nahre Sol's series on sounding like different composers.
Starting small
Two promising bars. A motive. That's all you need to start. Empowered by the tools of variation, you can extend and improve a tiny idea until it's a complete and compelling melody, or even an entire song.
My starting ideas usually come from messing around on piano, guitar, or bass. If I find something I like, I record it as a voice memo on my phone. If I still like it later, I transcribe it into Dorico and start developing it.
For more on motives, check out the first chapter of Alan Belkin's book, Musical Composition: Craft and Art.
Building melodies, riffs, and other parts
Usually, a small idea is improved and extended to form part of a song, not the entire thing. Different ideas are used for each melody, riff, bassline, beat, etc.
Then again, the same idea can be played by each instrument - all at once, or at different times. Or it can be reformulated - as a flowing melody, a badass guitar riff, or a funky bassline.
Once you have melodies, riffs, and other parts, you can combine them in different ways. A vocal melody can appear alone or with the entire band. In some genres, actually, the individual melodies, riffs, and other parts stay the same throughout the entire song. Things only change when various parts are turned on or off.
Small ideas become parts. Parts become songs.
Conclusion
Mess with a guitar. Find a couple good bars. Transcribe them into Dorico. Develop an 8-bar melody. Then a riff and a bassline. Play with all the variables.
Like food, a musical idea can be reinvigorated with a dash of spice.
Like a Lego creation, it can be broken down into tiny pieces and endlessly recombined.
Like a spoken word, it can be voiced in any of a thousand emotions, from mild curiosity to titanic anger.