As in, the music gets translated into vibrations which the Taptic Engine then plays.
A couple of things. First, this is not likely to be a good experience on a watch for many reasons, so let's stick with iPhone. If you are asking whether there is an API which does "music gets translated into vibrations", the answer is no - there is no single way in which anyone might want to do this. Perhaps you only want the bass notes - or only the snare hits, etc. Next question is, where is "the music" coming from? Apple Music? Some existing music app? Your music app? If the answer is "your app", you could probably put together a system which did some kind of "music to haptic pattern" translation (see the CoreHaptic API documentation for how you ask a device to vibrate) and then you could synchronously send the music and the haptic requests. If you are hoping to make this happen for some other app, you won't have the tools to grab that music signal in time to lay down a sync'd haptic track with it.
Hope this helps!
-DS