While imitation may be a sincere form of flattery, courtesy is more important than flattery, and artists deserve to be paid for their creative work. If you desire to use music written by someone else, you should understand the meaning of “public domain”.
What is a copyright? Should musicians concern themselves with copyright registration? Read this blog for an overview.