I believe that I watched this movie in the mid-90s, but I think it was black and white. What I remember is that a man and a boy were trying to escape from somewhere. The man got the idea to make a spray that could eliminate all sounds in the area. I think that he got the idea from a spray of odor remover. When the man and boy try to escape they go into a room with a bunch of kids playing instruments and use the spray: the kids are banging cymbals and drums, and playing their various instruments, but there is no sound. The man and boy eventually escape.
I believe this movie is The 5,000 Fingers of Dr. T (1953) which is the only feature film written by Dr. Seuss.
The young protagonist must take piano lessons, which he hates, and dreams a surreal dream of escape. The noise removing spray is part of the boy's dream.