The preprojective algebra of a modulated graph