We present a real-time pattern generator for dynamic walking over rough terrains. Our method automatically finds step durations, a critical issue over rough terrains where they depend on terrain topology. To achieve this level of generality, we consider a Floating-base Inverted Pendulum (FIP) model where the center of mass can translate freely and the zero-tilting moment point is allowed to leave the contact surface. This model is equivalent to a linear inverted pendulum with variable center-of-mass height, but its equations of motion remain linear. Our solution then follows three steps: (i) we characterize the FIP contact-stability condition; (ii) we compute feedforward controls by solving a nonlinear optimization over receding-horizon FIP trajectories. Despite running at 30 Hz in a model-predictive fashion, simulations show that the latter is too slow to stabilize dynamic motions. To remedy this, we (iii) linearize FIP feedback control into a constrained linear-quadratic regulator that runs at 300 Hz. We finally demonstrate our solution in simulations with a model of the HRP-4 humanoid robot, including noise and delays over state estimation and foot force control.