Noise generation by flows is modeled using a pressure wavepacket to excite the acoustic medium via a boundary condition of the homogeneous wave equation. The pressure wavepacket is a generic representation of the flow unsteadiness, and is characterized by a space envelope of pseudo-Gaussian shape and by a subsonic phase velocity. The space modulation yields energy in the supersonic range of the wavenumber spectrum, which is directly responsible for sound radiation and directivity. The influence of the envelope's shape on the noise emission is studied analytically and numerically, using an acoustic efficiency defined as the ratio of the acoustic power generated by the wavepacket to that involved in the modeled flow. The methodology is also extended to the case of acoustic propagation in a uniformly moving medium, broadening possibilities toward practical flows where organized structures play a major role, such as co-flow around cruising jet, cavity, and turbulent boundary layer flows. The results of the acoustic efficiency show significant sound pressure levels, especially for asymmetric wavepackets radiating in a moving medium.