Mean motion resonances are a common feature of both our own Solar System and of extrasolar planetary systems. Bodies can be trapped in resonance when their orbital semi-major axes change, for instance when they migrate through a protoplanetary disc. We use a Hamiltonian model to thoroughly investigate the capture behaviour for first and second order resonances. Using this method, all resonances of the same order can be described by one equation, with applications to specific resonances by appropriate scaling. We focus on the limit where one body is a massless test particle and the other a massive planet. We quantify how the the probability of capture into a resonance depends on the relative migration rate of the planet and particle, and the particle's eccentricity. Resonant capture fails for high migration rates, and has decreasing probability for higher eccentricities, although for certain migration rates, capture probability peaks at a finite eccentricity. We also calculate libration amplitudes and the offset of the libration centres for captured particles, and the change in eccentricity if capture does not occur. Libration amplitudes are higher for larger initial eccentricity. The model allows for a complete description of a particle's behaviour as it successively encounters several resonances. The model is applicable to many scenarios, including (i) Planet migration through gas discs trapping other planets or planetesimals in resonances; (ii) Planet migration through a debris disc; (iii) Dust migration through PR drag. The Hamiltonian model will allow quick interpretation of the resonant properties of extrasolar planets and Kuiper Belt Objects, and will allow synthetic images of debris disc structures to be quickly generated, which will be useful for predicting and interpreting disc images made with ALMA, Darwin/TPF or similar missions. Full details can be found in Mustill & Wyatt (2011).