NSSlider and system volume

I writing an app and I would like to control system volume with a slider,
and Im completly stumped, if anyone can help it would be great

thanx