Playing sound in JavaFX when button is pressed, window pops up
It's generally more standard to hide as many fields of your class as possible. I'd recommend making  file, sound and player in Sound as well as path and sound in MusicPane private.

Additionally you're not using file in Sound, so you can remove it. Furthermore your class' bodies are not indented by one level (contrary to usual conventions).

Aside from that there's not much to say about Sound the only thing that may be improved is using Paths.get instead of new File when you create your sound.

The MusicPane has a bit more to talk about. For one I don't quite understand why you're not using an fxml to specify the components. Additionally conventional wisdom suggests to use composition over inheritance. Instead of subclassing Pane into a MusicPane, you should use the Pane as a Member of the "GUI" you expose to your program.

This allows you to better share behaviour between components you create by subclassing Components instead of Pane.

The comments in the code aren't really useful... // if this button is pressed, it plays the sound can be completely removed, especially when you rename the button to play.
//first stop a playing sound, then start the sound  can be completely removed. It adds no information whatsoever to the code.
//Slider to adjust the volume becomes completely superfluous as soon as you rename slider to volumeSlider.