figure ground sequence generator, using memory