The Aĥaronim write that it is forbidden to hold dances from 17 Tamuz through 9 Av (MA 551:10). This prohibition includes playing and listening to instrumental music. Thus, one may not hold or attend dance classes, concerts, or sing-alongs during the Three Weeks. One may hold or attend an aerobics class, whose main purpose is exercise, until the beginning of Av, but one should lower the music so that it is clear that the purpose is exercise, not celebration.
A Jew who makes a living playing music may play at non-Jewish events until the end of Tamuz. Even though he plays joyous music there, it does not make him so happy, because he is preoccupied with his work. From the beginning of Av, however, he should not play music at all (BHL 551:2).
Since the reason music is prohibited is that it brings people joy, music teachers may continue giving lessons until the week of Tisha Be-Av, because neither the teacher nor the students experience joy through music lessons. In addition, canceling the lessons will cause the teacher financial loss, and the students will have to expend extra effort afterward to return to their normal learning pace, possibly even requiring extra classes. It is best to learn sad melodies during the Three Weeks (Tzitz Eliezer 16:19). If the teacher and students usually take a break from their lessons at some point in any event, it is preferable, if possible, to schedule the break for the Three Weeks.