Update of cocktail party. Added wave detection and debug messages