Generalized encoding and decoding functions for a cylindrical ambisonic sound system