using a sample window to register sound values