1 Sound operators

Lab 3: A Simple Rhythm

On the board of the lab is shown a simple two-measure rhythm. First, make sure you can bang out the rhythm on your desk or your binder or whatever.

Next, start up DrRacket and make sure you’re in the "Beginning Student With List Abbreviations" language.

Start your program with

  (require rsound)
  (require rsound/rsound-utils)

The name "ding" should now be bound to a short 1-second tone. Try playing it, make sure it works.

Next, use the functions we already know about to clip the tone to the right lengths and assemble it into the rhythm specified.

Next, update your code so that there’s one definition that controls the tempo (speed). Make sure that changing this number speeds up the rhythm or slows it down, appropriately.

When you get this working, *grab me and demo it*. In order to recieve credit for the lab, I want to hear it play and see your code.

Finally, chop a short segment from a music file, and see how it sounds.

1 Sound operators

Here are the sound operators we know about:

  read-rsound : string -> rsound
  write-rsound : rsound string -> (void)
  play-rsound : rsound -> (void)
  rsound-clip : rsound number number -> rsound
  rsound-append* : (listof rsound) -> rsound