to do, say or write sth that is suitable / not suitable for a particular occasion
hit / strike the right / wrong note
to do, say or write sth that is suitable / not suitable for a particular occasion
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition