"I composed music over the last twelve years, but almost quit for many reasons. So now I just play songs on my guitar". Why doesn't the past tense sound correct with "over the last twelve years"? Is it correct ? I would use the present perfect without a second thought.
"I composed music over the last twelve years, but almost quit for many reasons"
You are right about past simple sounding awkward here. "over the last 12 years" means the 12 years up to now, which means present perfect or past continuous (was composing) can sound more natural (past simple in the first part is okay, but would perhaps be better with "for the last 12 years").
Further, you indicate that the action of composing is not completed: you have almost quit, but you never actually quit, which contradicts the use of past simple.
(It is possible to use this construction [with minor changes], but this requires a very specific circumstance - if you are a recently retired composer, for example).
"I have composed music over the last 12 years, although I almost quit (once/a number of times/two years ago) for many reasons"
sounds perfectly natural, but means that, as of the present moment, you still do compose music. (Note the time markers; without one, the "when" aspect of quitting is left in the air).
What you perhaps want to say with past simple is
"I composed music for (the last) twelve years (but quit for many reasons). Now I just play songs on my guitar".
Here, the action of composing, which lasted for 12 years at some point in the past, is completed.
I guess that it might be something like this:
I composed music over the last twelve years, but almost quit for many reasons.
Earlier this year, it hit me, "Why shouldn't I just quit and start doing what I really want to do?"
So I quit.
Now I just play songs on my guitar.
(The two italicized lines are what I inserted to make the context clear.)