I'm not sure of the type of machine you have with no model number posted but if you have a direct drive washer, they have three balancing springs inside the cabinet. Perhaps one of them broke or fell off causing the banging of the tub. Take the cabinet off and check it out.
JP
April 2005