Skip to content

Instantly share code, notes, and snippets.

@efuquen
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efuquen/4274b15e24f464fa6162 to your computer and use it in GitHub Desktop.
Save efuquen/4274b15e24f464fa6162 to your computer and use it in GitHub Desktop.
ScriptEd Music Assignment 3-17-2015

Fork This: http://codepen.io/efuquen/pen/RNqxEV

##Part 1

  1. Play a D note for 1 beat, a F note for 1 beat, and a A note for 2 beats.
  2. Use a while loop to play the notes from the exercise 1 three times. Like so: D, F, A, D, F, A, D, F, A
  3. Use a while loop to play the same note 3 times for 1 beat.

##Part 2

  1. Use a while loop to play every note in the 'notes' array in order, C to B, 1 beat per note.
  2. Rewrite exercise 1 as a for loop.
  3. Write a for loop that places every note in 'notes' in order, but have each note play 1 extra beat longer on each iteration. Like so: C 1 beat, D 2 beats, E 3 beats, F 4 beats, G 5 beats, A 6 beats, B 7 beats.
  4. Use a for loop to play the notes in reverse order, from B to C (B, A, G, F, E, D, C), 1 beat per note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment