Assignments


Assignment #1: Flash ‘n Click

  • Extend the metronome (“Flasher” from lecture 1) with sound output. You can use [readsf~] to trigger a sample on every beat.
  • Allow the user to choose among 3 sounds/samples. Don’t forget to save the sound files in the same folder as your patch.
  • Have a look at the [vradio] or [hradio] object in order to provide the user with an easy way to choose among the samples. Open the help file of [vradio] to see how this can be done…

 

Assignment #2: Keyboard

Turn your keyboard into a musical instrument: Search for at least 5 sound samples you like. Pressing the Q,W,E,R,T,Y keys on your keyboard should trigger the playback of the sound samples. Releasing the key should stop the playback of the sample. You can use the [keyname] object in combination with [select q w e r t y] to see if the corresponding keys are pressed or released.

Make sure the user can adjust the volume of the keyboard.


 

Assignment #3: Audio Minesweeper

Note: The Amazing Maze example from the lecture will help you with this.

Your second assignment is to build a audio minesweeper game. It is a variation of the traditional game. The objective of the game is to find aout where mines lie without detonating a mine. We imagine a minefield of 10*10 just like the one we used in  Amazing Maze:

The player should be able to move through this field just like in Amazing Maze.

Now, place 5 mines in this field (this is just for educational purposes and due to the variation of the original game. With this we do not mean to ratify the use mines in the real world.) You can do this like placing the walls in the Amazing Maze example. We imagine something like this:

When the player moves onto a mine, an explosion sound is played back and the player is reset to the position 0.

Now, you have to help the player avoid the mines and help him/her to conclude where they are without hitting them. We use audio feedback for this as well. Play an alarm sound, whenever the player moves to a field which is one-step-close to a mine.

You consequently should play alarm sounds on the orange fields and explosions on the red ones:

Now, add a step counter which counts the steps needed until the player is sure about the position of all mines.

Have someone else in the course play your game and play his/hers. See who needs less steps to detect the correct position of all 5mines. It is helpful to draw an empty 10*10 field on a sheet of paper in order to make notes on where you are and where you suspect mines. Make sure you can reset the game (reset the player position and the stepcounter) and  start playing again.

 

Challenge (optional): Adapt the patch so that the mines are placed randomly at the beginning of each game. The alarm sounds should still be played on the surrounding fields.