Project: Program a Song
Working in pairs, students should develop a program that causes the Scribbler 2 robot to play a song or melody that extends at least 30 seconds.
Some Details
-
Choice of song
- You may work with a song that you have found elsewhere (giving appropriate credit, of course), or you may create your own song.
- Creativity in identifying a song or melody is encouraged.
- Songs which have been used in examples or labs may not be used.
- Songs must contain at least 25 notes.
-
Song introduction
- Information (e.g., title and composer) about the song should appear in the opening program header AND verbally using eSpeak.
- If the song was written by someone else, the header and eSpeak should give a full citation.
-
Program structure
- Use a separate file to define the notes used in the song. For example, if the music utilizes a Western, well-tempered note pattern, the program might include scale-notes.h.
-
Music usually provides a structure for sound, and the program should
reflect this structure. For example, many songs contain several verses
with a refrain or chorus that is played after each verse. For this program,
- The program must contain at least 5 functions in addition to main.
- Some functions should specify the notes (e.g., calls to rBeep) for parts or phrases of the song. The beginning of each of these functions should include a call to eSpeak, so the workstation will speak what part of the song is being played (e.g., "phrase 1", "line 1", "chorus").
- At least one function should represent a collection of phrases or lines (e.g., "verse 1", "part 1", "entire song").
- Of course, each function should include a descriptive header, indicating what part of the music is played by that function.
- The main procedure should be reasonably short — just setting up the pieces (e.g., connecting to eSpeak and MyroC), calling one or a few procedures that handle all or parts of the song, and wrapping up (disconnecting from eSpeak and MyroC).
-
Additional Details
- One submission per collaborative group!
- Further instructions (relevant to all work in the course) are given at the course page on Detailed Coursework Instructions.
- Be sure a signed Header and Academic Honesty Certification is included at the start of your program.
- Comments are essential to clarify the structure and logic of each part of the program. For example, a comment is needed for each function, explaining what that fujnction is to do.
Project Submission
-
Turn in a printed copy of your code at the start of class when the project is due.
- Include a program listing
- Of course, the program should be logically formatted and commented.
-
Turn in a a written statement that describes how you tested your program. This should include:
- what happened when you ran your program,
- how did the result of running your program meet specifications of the project?
Deadlines
This project, as well as any labs or supplemental problems due later in the semester, is due at the start of class.
Exceptions to the deadline policy and its penalties:
-
An extension of at least one class period is automatically granted if the department's network or the printer in Darwin 25 is down for an unscheduled period of three or more hours during the week preceding the assignment.
-
Students arriving late to a class should turn in the paper form of the work as soon as they arrive in the classroom. In such cases, the assignment will be considered on time if the email submission was received before the class began.
Grading
created 24 June 2011 by Henry M. Walker revised 19 September 2011 by Henry M. Walker updated 1 September 2012, 31 December 2012, 23 January 2013, 13-15 August 2013 by Henry M. Walker updated (deadline clarified) 10 September 2013 by Henry M. Walker updated submission description 28 January 2014 by Henry M. Walker updated dates 9 June 2014 by Henry M. Walker espeak in project added 3 September 2014 by Henry M. Walker updated dates 14 January 2015 by Henry M. Walker revised and reformatted 17 May 2016 by Henry M. Walker added Additional Details section 7 September 2016 by Henry M. Walker instructions for SSU added 6 February 2022 by Henry M. Walker |
![]() ![]() |
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. |