Indeed, an artist who samples without permission infringes on both the copyright in the sound recording and the copyright in the composition. Specifically, this duality of infringement is due to the fact that a track with samples from pre-existing sound recordings is considered a derivative work.