  We develop a systematic approach to derive narrowband (NB) and passband (PB)
composite sequences which can produce any pre-selected transition probability
with any desired accuracy. The NB composite pulses are derived by successive
cancellation of derivative terms in the propagator. The PB pulses are built by
combining two half-$\pi$ NB pulses. Both the NB and PB pulses feature vanishing
wings on both sides of the central region around the target transition
probability, and the PB pulses offer also a flat (broadband) top around the
target probability. The NB sequences are particularly suitable for sensing and
metrology applications, while the PB sequences can be very useful for qubit
control in the case of tightly spaced qubits for they ensure both selectivity
(suppressed cross talk to neighbors) and robustness (suppressed laser pointing
instability). Other possible applications include selective (NB), or both
selective and robust (PB), control of close transitions in frequency space.
