In loop quantum gravity the classical point of departure is the Einstein-Hilbert action modified by the addition of the so-called Holst term. Classically, this term does not affect the equations of motion, but it induces a well-known quantization ambiguity in the quantum theory, parametrized by the BarberoImmirzi parameter. Recently, it has been suggested to promote the Barbero-Immirzi parameter to a field. The resulting theory, obtainable starting from the usual Holst action, is general relativity coupled to a pseudoscalar field. However, this theory turns out to have an unconventional kinetic term for the BarberoImmirzi field and a rather unnatural coupling with fermions. The main goal of this work is twofold: First, to propose a further generalization of the Holst action, which yields a theory of gravity and matter with a more natural coupling to the Barbero-Immirzi field; second, to study the possible implications for cosmology correlated to the existence of this new pseudoscalar field.