Final Project – Music: Amelia Faison

Storyboard: The goal of this lab is to create a program that can play the song “row, row, row your boat”. The “play note” block will be used to execute this as well as higher order functions and abstract data types. Constructors and selectors will be utilized as well.

Logic: I created several blocks including “note, pitch and length”, “pitch from note”, “length from note”, and some variables as well including length, pitch and note. Lists were created with the inputs of the note pitch and length block that was connected to the list of notes that was previously given. Blocks were specified to track and record the beats per minute or second and this gave the coder more control over the intended sounds. Using the map block  with the ADT blocks created a reporter block that transposed or shifted a list of notes.

Steps:

  1. First, I created a play note block
  2. I placed the list within this block, after the item random option
  3. I specified this by including the information of “1 beat”
  4. I then moved onto a block called “for each”
  5. I created a “note” variable and included the list in this as well
  6. Within this block, I included a command that said “play note for 1 beat”
  7. It looked like what is pictured below.
  8. for each (note) of (list (60) (64) (67) (72) (60)) (play note (note) for (1) beats)
  9. I then created a block very similar to the one pictured above, however this block included the “map” specification
  10. I included the addition operators and typed 5 for the second space
  11. Lastly, I created a third for each block and included “keep items such that” with an operator and the list included
  12. I placed the play not block within this and specified it by included only one beat
  13. It ended up looking like what is pictured below.
  14. for each (note) of (keep items such that (() < 65) from (list (60) (64) (67) (72) (60))) (play note (note) for (1) beats)
  15. Finally, i made a reporter that said “row row row your boat”
  16. I included a reporter for this
  17. Within this reporter, I included a list with 10 blocks of “note, pitch and length”
  18. I included specific numerical values within each space
  19. These notes corresponded with the lists provided.
  20. lastly, I tested the program and the code and finished by placing the “row row row your boat” reporter into the play song block I created.

Problems: Within this lab, I encountered several issues that prevented the code from successfully completing the intended function. Some of these obstacles included an oversimplified block that did not complete its intention. I fixed this by editing the block and adding extra blocks within the edit function in order to specify the intention.

https://snap.berkeley.edu/snapsource/snap.html#present:Username=ameliafaison&ProjectName=Module%204-%20Final%20project

Leave a comment