Music composition, in its most basic sense, is sound and silence organized over time. Producers are creating music just as much as the traditional songwriter, if not more. If you created an original piece of music and it is to be released to Spotify, Apple Music, etc., then you will generate publishing royalties. If you understand your ownership of that release, then you can register your percentage of publishing ownership and collect recurring royalties for the rest of your life.
But don’t get too comfortable with that one, here’s perhaps the most well-known melody of the bunch: the first two unique notes of Beethoven’s 5th Symphony. The most classic-est of classic major thirds.