Since humanity has had music, we've also had bad music.
Bad music can come from only one source: bad musicians. Despite such personal technologies of relatively recent invention as noise-canceling headphones, bad music remains nigh unavoidable in the modern world, issuing as it constantly does from the sound systems installed in grocery stores, gyms, passing automobiles, and so on.
Against the bad musicians responsible we have less recourse than ever, or at least less than medieval Europeans did. They had the "shame flute," a non-musical instrument used to punish crimes against the art.
The contraption, which is essentially a heavy iron flute - although you probably wouldn't want to play it - was shackled to the musician's neck. The musician's fingers were then clamped to the keys, to give the impression they were playing the instrument.
Finally, just to further their humiliation, they were forced to wear the flute while being paraded around town, so the public could throw rotten food and vegetables at them.
Surely the mere prospect of such a fate made many music-minded children of the olden days think twice about slacking on their practice sessions!