I wrote a guitar riff for my cat
That's sweet, why did you decide to write a guitar riff for your cat?
Cause I love my cat and it was fun to write with him next to me.
It's pretty cute that you wrote a guitar riff for your cat. While he probably doesn't really care much about it, I'm sure he enjoyed being around you while you wrote it.
My cat is sleeping.
I won't suggest that you play your guitar riff when your cat is sleeping as their sleep may get disrupted and they may act out and not like you very much in return. I suggest you play it whenever they are awake and when you both are playing with each other.