This paper describes a novel pitch spelling algorithm which can deal with polyphonic MIDI data and generate systematic and readable score notations. In the proposed algorithm, all the spelling processes are executed using a measure as a unit, except the global key analysis. Our spelling process includes two stages: diatonic spelling and chromatic spelling. Key analysis is the main concern in the diatonic spelling. We use solmization result to get the key candidates and apply the proposed Semicircle Key Modulation (SKM) model to further decide the key analysis result. In the chromatic spelling, we use general rules of notating chromatic notes and variance evaluation to decided notes which need accidentals under a specific key. The algorithm was tested under two movements of Beethoven’s Sonatas and three Chopin’s Waltzes, and reached an overall 98.65% (misspelled 110 of 8139 notes) correct rate.