We demonstrate a superconducting resonator with variable coupling to a measurement transmission line. The resonator coupling can be adjusted through zero to a photon emission rate 1000 times the intrinsic resonator decay rate. We demonstrate the catch and release of photons in the resonator, as well as control of nonclassical Fock states. We also demonstrate the dynamical control of the release waveform of photons from the resonator, a key functionality that will enable high-fidelity quantum state transfer between distant resonators or qubits.