  We propose and experimentally demonstrate a device for generating light with
arbitrary classical photon-number distribution. We use programmable
acousto-optical modulation to control the intensity of light within the dynamic
range of more than 30 dB and inter-level transitions faster than 500 ns. We
propose a universal method that allows high-fidelity generation of user-defined
photon statistics. Extremely high precision <0.001 can be reached for lower
photon numbers, and faithful tail behavior can be reached for very high photon
numbers. We demonstrate arbitrary statistics generation for up to 500 photons.
The proposed device can produce any classical light statistics with given
parameters including Poissonian, super-Poissonian, thermal, and heavy-tailed
distributions like log-normal. The presented method can be used to simulate
communication channels, calibrate the response of photon-number-resolving
detectors, or probe physical phenomena sensitive to photon statistics.
