Most opioids are pretty detrimental to music perception. They put up this sort of disconnective barrier between you and the music. As a musician this can be problematic.
Certain opioids are less problematic, most notably is kratom, which is least disruptive in this regard. I have even been able to write some decent music on it.
Also, morphine and heroin in particular have the interesting quality of improving singing ability, which seems to result from a combination of diaphragm relaxation and the generally disinhibition and anxiolysis from being high on opioids. I don't really feel comfortable singing much, probably too tense, but for some reason I feel the urge to do it sometimes particularly with morphine and heroin. Also it seems to improve the vocal quality; I have a very deep voice but opioids, particularly heroin, drop it down even further, which gives it a nice rich sound.
Perhaps thats why all these rock star lead singers were such big dope fiends.
The worst opioids for music are ones with less selectively for mu opioid receptor over the kappa opioid receptor. For example, I find oxycodone less music friendly than morphine, at least for making music.