A formal coding language for two- and three-dimensional shapes and for auditory patterns is presented. The coding allows the derivation of measures of information for both shapes and auditory patterns, as well as measures of preferred dimensionality, hierarchy, and substructural order for shapes--measures that rather successfully predict the corresponding perceptual phenomena. A theory of the origin of the units of information that are independently processed in the human perception of visual and auditory patterns is proposed.