The Court of Justice of the European Union has established sampling rules
Sampling may constitute an infringement of the rights of the producer of the audio recording if carried out without his permission. Such was the conclusion of the Court of Justice in a preliminary ruling in a dispute involving electronic music pioneers Kraftwerk, which has been raging before the German courts for 20 years, concerning a two-second sample from the song Metall auf Metall. Although the sampling technique itself falls within the freedom of the arts protected by the EU Charter of Fundamental Rights, according to the Court, a sample can be used to create a new work without the producer's consent only if it is not recognisable in that work. Otherwise, it is a partial reproduction of that audio recording, and as such, falls within the exclusive right granted to the producer of the recording.
(Judgment of the Court of Justice dated 29 July 2019. Case C-476/17)