Chinese national music culture has a long history, and pentatonic modulation, as an important part of traditional music, plays a unique role in modern piano music composition. In this study, a national tuning recognition system was constructed based on the pitch level distribution matrix (PCDM) and temporal adaptive neural network (TANN), and Chinese piano music was spectrally analyzed using the constant Q transform (CQT). The study establishes a Chinese ethnic modal classification system covering 360 combinations by experimentally analyzing eight MIDI samples of Chinese folk songs, including four pentatonic modal and four heptatonic modal works. The experimental results show that the accuracy of the proposed algorithm in recognizing Chinese folk music modes reaches 100%, in which the pentatonic modal works such as “Jasmine Flower” are accurately recognized as G levied pentatonic modes, and the septatonic modal work “It’s a Man of Our Knowledge”, with a 15.69% partiality, is successfully recognized as Yanle G levied septatonic modes. The study proves that the modal detection method based on PCDM features has significant advantages in the analysis of Chinese folk music, and provides an effective technical support for the digitization research of traditional music.