  We study algebras of meromorphic modular forms whose poles lie on Heegner
divisors for orthogonal and unitary groups associated to root lattices. We give
a uniform construction of $147$ hyperplane arrangements on type IV symmetric
domains for which the algebras of modular forms with constrained poles are free
and therefore the Looijenga compactifications of the arrangement complements
are weighted projective spaces. We also construct $8$ free algebras of modular
forms on complex balls with poles on hyperplane arrangements. The most striking
example is the discriminant kernel of the $2U\oplus D_{11}$ lattice, which
admits a free algebra on $14$ meromorphic generators. Along the way, we
determine minimal systems of generators for non-free algebras of orthogonal
modular forms for $26$ reducible root lattices and prove the modularity of
formal Fourier--Jacobi series associated to them. By exploiting an identity
between weight one singular additive and multiplicative lifts on $2U\oplus
D_{11}$, we prove that the additive lift of any (possibly weak) theta block of
positive weight and $q$-order one is a Borcherds product; the special case of
holomorphic theta blocks of one elliptic variable is the theta block conjecture
of Gritsenko, Poor and Yuen.
