Device attached to a loudspeaker