  We describe a technique for generating pulses of light with controllable
photon numbers, propagation direction, timing, and pulse shapes. The technique
is based on preparation of an atomic ensemble in a state with a desired number
of atomic spin excitations, which is later converted into a photon pulse.
Spatio-temporal control over the pulses is obtained by exploiting long-lived
coherent memory for photon states and electromagnetically induced transparency
(EIT) in an optically dense atomic medium. Using photon counting experiments we
observe generation and shaping of few-photon sub-Poissonian light pulses. We
discuss prospects for controlled generation of high-purity n-photon Fock states
using this technique.
