Digital source base class and an arbitrary digital source class, with all tests.