A quantum critical point (QCP) is a singularity in the phase diagram arising due to quantum mechanical fluctuations. The exotic properties of some of the most enigmatic physical systems, including unconventional metals and superconductors, quantum magnets, and ultracold atomic condensates, have been related to the importance of the critical quantum and thermal fluctuations near such a point. However, direct and continuous control of these fluctuations has been difficult to realise, and complete thermodynamic and spectroscopic information is required to disentangle the effects of quantum and classical physics around a QCP. Here we achieve this control in a high-pressure, high-resolution neutron scattering experiment on the quantum dimer material TlCuCl3. By measuring the magnetic excitation spectrum across the entire quantum critical phase diagram, we illustrate the similarities between quantum and thermal melting of magnetic order.