I have constructed a Fucking Machine, not wanting to spend a lot of money and having a recently replaced 12V rechargeable drill I used that as the motor.
The Drill works great, I wired it directly to a 12V power supply as the batteries would no longer charge and that is great as you can go for a long time.
It has a switch on the top so you have high and low gears as well as a variable speed trigger which I completely removed and wired out so it was on an extension so it could be at a handy location.
The drill I mounted to a board that has 3 legs bolted to it to give it some stability and i usually weight it down with something like a chair to stop it moving around.
I used an 8mm Machine screw and two nuts to log a short arm onto the screw the length of the arm defines the stroke, at the end of the arm I have another 8mm bolt locked on sticking out the other side.
One bolt is then inserted into the drill so the arm rotates with a shaft ready to accept an arm.
I made the arm from a length of wood with 2 skate bearings countersunk into both ends I then bolted one end onto the end of the short arm in the drill, the other end is bolted to a block of wood that's screwed to the top of a drawer slide screwed onto the main board.
Onto the block of wood on the drawer slide I then screwed a length of dowel which i then attach whatever I want to use.
Using skate bearings which are readily available makes it very smooth running and the drill has plenty of power as its already geared down substantially.
Easy to make and cheap.