[PD] how to do a sampler without scratch