SPEAKER 1: Let's take a look at bday.
In this problem, here are the things that you're going to need to do.
First, we'll give you the sheet music for the song Happy Birthday.
And using your understanding of sheet music
and what each of the lines and spaces between the lines mean
and how long each note lasts, you'll figure out what notes are being played
and how long they're going to last.
And finally, you're going to write down the ASCII representation of those notes
in a file called bday.txt.
We'll show you in a moment a format whereby
you can represent notes and their occidentals
and their octave and their length all in a text-based format.
So let's take a look at that format now.
Here's some ways that we would represent notes as ASCII text.
If I had a line that looked like C4@1/8 the interpretation of this
is the note is C, it's in the fourth octave,
and everything after the at sign is how long that it lasts,
and one-eighth means it's an eighth note.
So that's C4@1/8.
If we want to represent a note with occidentals,
we could include that in this text-based representation as well.
For example, C#4@1/8 means this is the note C#, also on the fourth octave,
and it's also an eighth note.
And finally, if we wanted to represent a flat note, for example,
we might do C flat four, where the flat is just represented by the lowercase b
ASCII character--
Cb4@1/4 which would be C flat in the fourth octave, but this time a quarter
note instead of an eighth note where a quarter note if you recall,
is twice as long as an eighth note is.
And using this representation, we have the ability
to represent sheet music just using the characters
that we have on our keyboard.
And so a sequence of notes might look something like this.
Right here, we have it D in the fourth octave which
is going to be an eighth note, followed by F sharp in the fourth octave which
is going to be a quarter note, followed by A in the fourth octave which is also
a quarter note.
And that blank line just means that we're going
to rest for an eighth note length.
In other words, there's going to be no sound for a period of time
equal to one eighth note.
And then following that blank line, we have
D in the fifth octave being played for the length of one eighth note.
And so using this representation, we have the ability
to represent songs using just text.
So your task now doesn't actually require you to write any code,
but all you'll need to do is take a look at the sheet music for Happy Birthday,
figure out what notes are being played, and then turn that into that text-based
representation of notes where each note gets its own--
that's the note, followed by an occidental if it has it,
followed by an octave number, followed by the at sign, followed
by the length of that note where one over eight is an eighth note,
one over four is a quarter note, and one over two is a half note for instance.
Put all of that in a file called bday.txt, and you're done.
And that's bday.