Boil the corn in plenty of water for about 8 minutes. Drain and keep the water. Cut all the corn off the cobs. Soften the onions, garlic and mushrooms in half the butter. Add the peas and both kinds of beans. Season well, add the reserved corn water, and simmer for 15 minutes. Add the corn and milk, then mix the remaining butter with the corn meal to form a paste. Stir this into the soup bit by bit until it is thick and creamy. Taste and check the seasoning.