There are a lot of music which have this joke:
The actor moves through a scene with background music playing, when the actor acknowledges the musicians in the scene for comical effect. I think by now you could call this a trope. The latest scene where I've seen this is this scene from Blazing Saddles.
But I wonder which was the first movie to come up with this trope?