This paper describes numerical and experimental results of beamforming algorithms for generation of directional sound. The intended application is a sound source for cars with the objective to warn vulnerable road users while minimising noise pollution. Nowadays, sensors exist which are able to reveal the position of the vulnerable road users, which information can be used by the warning signal generator. Based on this information, the signal generator is designed to generate the specified warning signal at the location of the vulnerable road user while the acoustic response at other locations is minimised. The directional sound beam was realised with an array of controlled acoustic moving coil sources. The paper compares different methods to generate the sound beam and investigates their effectiveness for this application by simulation and experimental results. The robustness under realistic conditions in simulations and in initial real-time experiments on a car are discussed.