This program uses the modulus operator to create polyrhythms. Take a look at the code for each sprite to see how the patterns were created. Click "See inside" to see how this works... This program also applies a cosine function to a counter which is then mapped to the volume of the cowbell. This creates variations in the volume/dynamics of the cowbell resulting in a more musical/natural performance. The bass drum and conga sounds are performed at a constant volume. This piece sounds best when run within Scratch in Turbo Mode.
Code written by Andrew R. Brown and Alex Ruthmann