The Sound object that you are creating inside the onActivityResult is a local variable and it is overriding your global variable. Change the below lines from
pathText.setText(uri.toString()); // Here the path displays fine
Sound sound = new Sound(); // Make a Sound object
sound.setPath(uri.toString()); // set the path of the object
to
pathText.setText(uri.toString()); // Here the path displays fine
sound = new Sound(); // Make a Sound object
sound.setPath(uri.toString()); // set the path of the object
The other option is to not even bother creating the sound object as your playButtonListener should be access the text view and get the URL right there. Either approach should be good enough.
Good luck