Crystal Frameworks, Matrix-valued Functions and Rigidity Operators