There is a Samuel Barber DAIN baptised at Edale 29 May 1768, son of John and Sarah DAIN, and buried 4 Jun 1771.
There is also a Samuel Barber DAIN baptised at Edale on 10 Jul 1799 at Edale, son of Ralph and Ellen.
(On FreeReg)
Modified to add:
Ralph DAIN (weaver, bachelor of Edale) married Ellen YATES (spinster of Chapel en le Frith) on 29 May 1796 at Chapel en le Frith by license.
A couple of possibilities for John and Sarah, most likely John DAIN (skinner, bachelor of Chapel en le Frith) married Sarah LOMAS (spinster of Hope), on 06 Dec 1762 at Chapel en le Frith.
There is a marriage between a Phillip BARBER (husbandman) and Mary DAIN both otp on 7 Apr 1777 at Chapel en le Frith.
In the 1841 census mentioned above the Samuel WRIGHT is a farmer and the next property on the census has James BARBER, farmer, and his family. Whilst the families may be related through marriage, it may well be a few generations earlier.