An [Formula: see text]-gram in music is defined as an ordered sequence of [Formula: see text] notes of a melodic sequence [Formula: see text]. [Formula: see text] is calculated as the average of the occurrence probability without self-matches of all [Formula: see text]-grams in [Formula: see text]. Then, [Formula: see text] is compared to the averages Shuff[Formula: see text] and Equip[Formula: see text], calculated from random sequences constructed with the same length and set of symbols in [Formula: see text] either by shuffling a given sequence or by distributing the set of symbols equiprobably. For all [Formula: see text], both [Formula: see text], [Formula: see text], and this differences increases with [Formula: see text] and the number of notes, which proves that notes in musical melodic sequences are chosen and arranged in very repetitive ways, in contrast to random music. For instance, for [Formula: see text] and for all analyzed genres we found that [Formula: see text], while [Formula: see text] and [Formula: see text]. [Formula: see text] of baroque and classical genres are larger than the romantic genre one. [Formula: see text] vs [Formula: see text] is very well fitted to stretched exponentials for all songs. This simple method can be applied to any musical genre and generalized to polyphonic sequences.