This invention describes a method for processing pressure signals derivable from locations inside or outside a human or animal body or body cavity. Different aspects of the invention relate to a method for optimal differentiating between cardiac beat- and artifact-induced pressure waves, a method for obtaining new and improved information from said pressure signals. In particular, this invention describes the use of said inventive method for processing of pressure signals for controlling an adjustable shunt valve. The method can be incorporated in a processing unit of a device for use in draining fluid from a brain or spinal fluid cavity.