Method and device for generating MIDI music according to notes

The present invention provides a method and apparatus for generating music according to MIDI notes, the method comprising: an input notes of music attribute analysis; analysis of the input note notes and chords mapping; The music attribute, and the music chord mapping relationship library, a preset rule determined by the music structure, which is constituted by the chord progression music structure formula selected from the library of musical pieces matching; melody by selecting from a library of musical pieces that match the music structure and the two preset rules to give melody track to generate MIDI music. By the present invention, the input few notes automatically generates MIDI music, and music having a characteristic of the input note, a certain entertainment, music and to simplify the creation and automation.