Write a program to create a drum machine with the versatility to compose rhythmic beats from difference cultures and musical traditions,
given below. The types of beats are represented with letters. The letter X represents a base drum, the letter x represents a snare drum,
r represents a musical rest where no instrument is played.
- NorteƱo/Polka (Found in Mexican music): XxXxXxXx
- Waltz (Also, found in Mexican music): XxxXxx
- Salsa (Beat is called Clave): XrrXrrXrrrXrXrrr
- Blues: XrXxrX
- Hip-hop: XrrXxrrrrXXrxrrr
- Gospel: XrxrXXxr
- For the last beat, find and add a popular rhythm to your drum machine, not already represented here.
The sound manager class has the following methods to help you with the assignment:
- playBass() which plays a bass drum sound.
- playSnare() which plays a snare drum sound.
- waitQuarter() which adds a wait time of a quarter of a second between the beats.
- waitHalf() which adds a wait time of half a second between the beats.
- waitSecond() which adds a wait time of one second between the beats.
- wait(int milliseconds) which adds a wait time of the specified milliseconds between the beats.