I guessed this should belong to the Songwriting forum, but yeah, I only see people posting lyrics there.

This is the thing. As I finally got my amp home now, I can play normally, inventing riffs, melodies, whatever. I always wanted to start writing songs. But I guess I hit some kind of a barrier... I shall call it a scale barrier.

I think I'm too obsessive on the key the song should be in (in this particular case, Dm). I know the Dm scale very good obviously, so I'm always trying to find something in it. If I step out of the scale, I can't remove the feeling that I'm doing something very wrong (even though that's the chromatic scale).

Like, learning songs of some bands (eg. Bodom...) shows me that even though the play a lot in a scale, they do move out of it sometimes making it... Chromatic?

I often find something sounding pretty fair, to then realize that 1 or 2 notes is out of the scale (eg. when doing some form starting on 1 note, then doing exactly the same form on another note which results on out-of-scaleness). Even though it sounds good, IT'S KILLING ME BECAUSE IT'S OUT OF THE SCALE. I obviously need to get over it. I try to move it to the scale, but no, it looses that niceness it had.

Like, here's an example.

A-|--13 15 13 16 15 13----12 14 12 15 14 12----10 12 10 13 12 10

(D standard tuning)

Or something like that, can continue with random shredshit. It doesn't really sound bad, but it's killing me!

Make me thing this is good.
Quote by YouTube user
Hey it's Alek from Chillin in Bodom and ears a lick for bitch who can't play dicks.

Listen to more jazz, you'll see how awesome being non-diatonic can be

Seriously, the thing about theory is it's descriptive, at no point does it tell you what you can and can't do; leaving the scale is not a bad thing at all.

However, if you really can't get past the idea that straying from the scale is bad then I don't think anyone is going to have much luck telling you otherwise, you're going to have to get past this on your own.

Also quick note: non-diatonic (i.e. not in a scale) is not the same thing as chromatic.
R.I.P. My Signature. Lost to us in the great Signature Massacre of 2014.

Quote by Master Foo
“A man who mistakes secrets for knowledge is like a man who, seeking light, hugs a candle so closely that he smothers it and burns his hand.”

I will first ask how long you've been playing. It seems like your problem stems from inexperience. Try experimenting with many different scales and studying a little bit of theory (chord structure, modes, progressions, etc.). Also, venture out of playing patterns and avoid falling into the same playing tendencies. Finally, just keep listening to different kinds of music and your ear will become accustomed to new sounds. Jazz is particularly good for exposure to outside of the box sounds. Hope this helps a bit.
Don't focus on keys and shit, just play what sounds good and don't try making it proper because then tons of scales will be missed out on.