In this project, you will use the Snap!
play note block to create
music while you review abstract data types and higher order functions.
playscripts. Run each script a few times.
play noteblock are musical pitches. Higher values create higher notes. You can input any integer from 0 and 127. The number 60 represents middle C.
Pitch is the amount of highness or lowness of a musical note; the pitch value goes
the first input slot of the
play note block.
The length of a note is the amount of time that the note plays (the number of
the length value goes in the second slot of
noteADT to manage the pitch and length of each note in a song.
for eachtogether with your selectors to build a block that takes a list of notes as input and plays each pitch for the specified number length of time.
play songblock, and debug any problems.
map + 5does to the sounds you hear:
maptogether with your ADT blocks to create a reporter that transposes (shifts) a list of notes. It should take a list of notes and a number indicating how much to transpose (shift) the song as input, and it should report the adjusted song. For example:
transposeblock with several different shift numbers so that you can hear the impact of
keep < 65does to the sounds you hear: