From Bulbapedia, the community-driven Pokémon encyclopedia.
The player constantly moves forward and has jump over obstacles or hit
enimies to get notes in order to finish the stage. If the player loses all their hearts or fall down a pit they lose and have to restart the stage.
The notes collected in a stage are used to bloom a flower at the end of each stage. If not enough notes are collected the flower won't bloom and the player
recieves a So So... ranking on that stage, if a certain amount of notes are collected the flower will bloom into a silver flower and the player recieves a Good ranking, if even more are collected the flower will bloom into a golden flower and reward the player with a Great ranking.