Describe how the magnetic effect of a current is used in relays and loudspeakers and give examples of their application