I wouldn't worry about it too much. As long as you write honestly, in your own voice and are true to that and not actually trying to rip off somebody else, then no problem.
I have to disagree I'm afraid. As I said earlier, accidental plagiarism can be a really annoying distraction for some listeners - and it's presumably the effect on the listeners that the writer should be concerned about.
I gave a further example in the
"Somebody stole my tune" thread recently. I was listening to "Sounds of the 70s" on Radio 2 and a song came on that I hadn't heard before, but which was strikingly reminiscent of the former "Grandstand" TV theme tune, to the extent that the first couple of bars of the refrain were an exact copy rhythmically, harmonically and melodically. As a consequence I spent most of the next few minutes not listening to the song but thinking about Bob Wilson and Football Focus. (And it wasn't just me - I spoke to a friend who writes songs later in the day. She'd heard it too and had the same reaction.) I'm quite sure that the songwriter didn't intend this reaction.
I've noticed that TV theme tunes seem to be particularly prone to accidental plagiarism, maybe because they can become
so familiar that people erroneously believe that they're in the public domain. In my view they should be avoided at all costs because for many listeners they create such a strong association with the TV programme. As an example, here's "Gala Performance" by Laurie Johnson:
https://www.youtube.com/watch?v=a8SZdTCEjZwDid anyone
not instantly think of a certain well-known title? And yet the tune wasn't even written for the programme - it was just a piece of library music that happened to fit the words in the title.
Now imagine if a songwriter had accidentally included that same sequence of notes in a song, but with different lyrics - say "You Are My Joy". Don't you think that most people would be thinking about a certain red book instead?
(Having said that, I must confess that the opening phrase of one of my recent songs echoes the first six notes of the 1970 US TV series "Quincy M.E.". I'm hoping the rest is sufficiently different that most people don't notice.)
What would be
really useful in my opinion would be a website where you could input a few notes of a melody and see if anyone else has used it. Denys Parsons did something similar with his book "A Directory of Tunes and Musical Themes" back in 1975, but I don't know if anything like that exists on the internet today. It ought to.