An ambulatory medical device (10) according to the invention comprises a function module (18) adapted to provide the intended functionality of the device, a controller module (24) adapted to control the device, and a sound generation module (11) with an acoustic transducer (16) adapted to produce an acoustic signal (56) and a signal generator (26) adapted to drive the acoustic transducer with a certain frequency, wherein the signal generation module (11) is arranged within a housing of the device. A tuning module (28, 30) is adapted to vary the frequency used by the signal generator to drive the acoustic transducer, and to determine one or more frequencies that correspond to a high sound level of the acoustic signal (56) outside of the housing of the device.