I wrote a simple sampler for the seed:
Use this as a starting point and start simple! Then slowly add the functionality you want.