it depends on the place you called this method and the place of the sound clip, the class within which you called the method must be at the same directory of the sound clip, if you used the file name as the parameter of this method without supplying directores like sounds/myClip.mid
ex.
package myPack.test
class Test{
...
...
...
getclass.getResource("myClip.mid"); //this call assumes that the file path is ...myPack/test/myClip.mid
}
GoodLuck