I’ve had several requests for this so I’ve posted the source code here.  Again, big thanks to Richard Zadorozny for these samples.