The primary function of a sampler is to faithfully reproduce any existing sound, whether it's a cello, spoken words, or a passing streetcar. The sound should then be playable at various pitches on a keyboard or controllable via MIDI. When it comes to instrumental sounds, the sound should also maintain its natural qualities across a wide range of pitches without compromising its dynamic attributes such as timbre, velocity, and articulation.
The quality of a sampler is determined by the quality of its essential components. In the case of hardware samplers, this includes the A/D converters and their maximum possible resolutions, such as 44.1, 48, 96, or 192 kHz at 16, 24, or 32 bits. Higher resolutions are naturally better, but they also require more storage space. Older hardware samplers typically offered a maximum of 44.1 kHz and 16 bits to strike a reasonable balance between sound quality and expensive storage space.
In the case of more advanced software samplers, the quality and available resolutions depend on the computer audio interface being used. In general, there's a trend toward higher resolutions as they provide finer and more natural sound. However, music genres like Hip-Hop, House, and Techno often benefit from the "grit" of lower-quality converters and intentionally chosen 12-bit resolutions. This is why older machines like EMU's SP-12 series remain popular in these circles.
In the early days of sampling, digital storage was expensive, leading to the development of techniques to save space. Unlike complete musical phrases, samples were usually limited to short time intervals. With one or more samples of an instrument, you could simulate an entire instrument through digital transposition and looping. This allowed the recorded sound of an original instrument or any other sound to be played as a melody across the keyboard. However, due to today's storage solutions and the shift from hardware samplers to software samplers, utilizing all available computing power, this storage problem is no longer a significant concern. It only really exists in portable keyboards that rely on sampling sounds.
In addition to faithfully reproducing sounds, samplers also handle various administrative tasks. They must be able to store multiple sounds in their memory and switch between them at the press of a button, or even provide multiple sounds simultaneously. These sounds must be permanently archivable, allowing musicians to compile a library of instruments and access them at any time.