1. Melodic Ostinato: This is a repeating melodic phrase, usually short and catchy. It serves as a foundation for the music, providing a sense of rhythmic drive and harmonic structure. Think of the iconic "I've got rhythm" melody in the Gershwin song "I Got Rhythm."
2. Rhythmic Ostinato: This is a repeating rhythmic pattern, often played by a single instrument or group of instruments. It acts as a rhythmic backbone, driving the music forward and creating a sense of groove. Examples include the bassline in "Walk This Way" by Aerosmith and the rhythmic pattern in the "Blue Danube Waltz" by Strauss.
It's important to note that these two types of ostinato can sometimes overlap, especially in complex musical pieces. There might be a melodic ostinato that also incorporates a distinct rhythmic pattern.