In the early 2000s, Geniet and Leon [Phys. Rev. Lett. 89, 134102 (2002)0031-900710.1103/PhysRevLett.89.134102] discovered the nonlinear supratransmission (NST) in a medium with a forbidden frequency band gap. It is a process in which nonlinear structures are created by a sinusoidal harmonic boundary condition imposed at a frequency in the band gap. The present study extends this concept and shows that an optimal shape of a periodic nonsinusoidal excitation may induce (or inhibit) energy flow through the lattice below (or above) the NST threshold, demonstrating that nonlinear supratransmission is reliant not only on the driving amplitude but also on its shape. This is evidenced through numerical simulations and mathematical calculations varying the excitation signal shape in the Fermi-Pasta-Ulam case study. Setting the shape parameter to zero recovers the results of the literature in relation to the sinusoidal signal.