A machine for the treatment of liquid and semiliquid food mixtures comprises a mixture whipping and freezing/heating tank (3), a circuit (6) for cooling and/or heating basic products of which the mixture consists, comprising a compressor (7) driven by an electric motor (18), and a mixer (4) rotating inside the tank (3) to mix the basic products. The machine also comprises a control unit (11) for the speed of rotation of the compressor (7) electric motor (18), for regulating the compressor operating speed and varying the thermal power supplied by the compressor (7) according to at least the quantity of mixture treated.