Meditating with music is inadvisable:
AN8.41:8.1: ‘As long as they live, the perfected ones give up dancing, singing, music, and seeing shows; and beautifying and adorning themselves with garlands, fragrance, and makeup.
However, if the mind needs a focus, it may be helpful to consider the third opportunity for freedom:
AN5.26:4.1: Furthermore, it may be that neither the Teacher nor … the mendicant teaches Dhamma. But the mendicant recites the teaching in detail as they learned and memorized it. That mendicant feels inspired by the meaning and the teaching in that Dhamma, no matter how they recite it in detail as they learned and memorized it. Feeling inspired, joy springs up. Being joyful, rapture springs up. When the mind is full of rapture, the body becomes tranquil. When the body is tranquil, one feels bliss. And when blissful, the mind becomes immersed in samādhi. This is the third opportunity for freedom. …
And how does one recite the teaching? Well, an easy way to do that is to simply listen to a sutta repeatedly until it flows off the tongue on its own. Sutta recordings can be found on the internet. For example, voice.suttacentral.net has 4000 suttas in various languages (Pali, English, etc.).
Ultimately, one should ideally be content simply focusing on the breath.
MN10:4.2: It’s when a mendicant—gone to a wilderness, or to the root of a tree, or to an empty hut—sits down cross-legged, with their body straight, and focuses their mindfulness right there. Just mindful, they breathe in. Mindful, they breathe out.
In the above, "right there" is an instruction to be aware of what is happening at that moment without any grasping attachment. The breath is observed right there in the moment, in the body as it enters and exits. More detailed instruction is found in studying MN10. However, in general, using music to mask agitation is inadvisable. Rather, attend to the breath and the mind will necessarily relax from agitation. The "music" of the breath itself should suffice.