This paper proposes a melody tracking algorithm based on the state-space equation of the parameters that define melody. The parameters that consist of melody pitch and harmonic amplitudes are assumed to follow two uncoupled first-order Markov processes, and the polyphonic audio is related to the parameters such that the current framed segment of the polyphonic audio is conditionally independent of other framed segments given the parameters. The transition probability of the melody pitch is defined based on a number of statistical characteristics of music that account for small and large variation in melody, and for reasons of mathematical tractability, the transition probability of harmonic amplitude is assumed to be Gaussian. To estimate and track the parameters, the sequential Monte Carlo method is utilized. Experimental results show that the performance of the proposed algorithm is better than or comparable to other well-known melody extraction algorithms in terms of the raw pitch accuracy (RPA) and the raw chroma accuracy (RCA).