1 Warmup
2 Make a new song
3 Make a Soundcloud Account

Lab 5

1 Warmup

Do exercises 3, 9 and 10 from section 2.1 of HtDP 2e.

Do exercise 16 from section 2.2 of HtDP 2e.

Show me these exercises when you’re finished with them.

2 Make a new song

Find a song online (for instance, check out freemusicarchive.org).

Download it.

Change it into a WAV file using mpg123, like this:

  ~clements/bin/mpg123 myfile.mp3 -w mynewfile.wav

Note that I haven’t tried this yet, so it probably doesn’t work :).

Start DrRacket

Make sure you’re in the "Beginning Student With List Abbreviations" language.

Start your program with

(require (planet "main.rkt" ("clements" "rsound.plt" 2 5)))

Use rsound functions to extract a chunk of the sound and play it:

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

Isolate two or three sections of no more than 1 second, to use as "percussion." Write them to disk, using rs-write.

Now, alter the tiny-percussion-tracker from lab 4 to use these new samples rather than the built-in ones. Make a song of at least 10 seconds.

3 Make a Soundcloud Account

Next, you need some way to store and share the music that you create in this class. I personally recommend setting up an account with soundcloud.com, who will store and share your music and who have a nice paste-able javascript soundplayer widget that you can stick in your google sites page.

After signing up, upload the short piece of music that you created earlier on.

After it’s uploaded, get the javascript for an embeddable version of the sound, and paste it into your google sites page, using the HTML entry method. }