1 of 15

EarSketch

Musical Form and Custom Functions

2 of 15

In the first 30 seconds of this hit song, how many times do two basic rhythm sections repeat?

3 of 15

What is musical form?

  • Paste and run 9.2 “A-B-A Form”
  • What lines of code are repeated to make the section A in red above?

4 of 15

What is a function/procedure?

  • Paste and run Archived EarSketch curriculum lesson 9.3 “Custom Functions”
  • Comment out line 25 and run the code
  • Why is there no music in the DAW when this line is commented out?

5 of 15

How can musical form be implemented through coding functions/procedures?

  • EarSketch curriculum 9.2 Example “A-B-A Form”
  • EarSketch curriculum 9.3 Example “Improved A-B-A Form”

6 of 15

Change the “Improved A-B-A” code to do an �A-B-A-B call to see how many measures will occur

  • EarSketch curriculum 9.3 Example “Improved A-B-A Form”

7 of 15

Most Repetitious Song Ever MiniTask�

  • The Most Repetitious Song Ever
  • Make a custom function that takes two sounds and a starting measure as arguments and creates music on two tracks. Call your function repeatedly with different sounds so that the piece lasts 48 measures.

8 of 15

Collaboration Game MiniTask Part 1

  • Collaboration Game
  • Think about how you would combine your custom function with a partner to make a song with two sections that lasts 24 measures.
  • Write your thoughts in a paragraph as a set of comments at the end of your code after the finish statement.

9 of 15

Collaboration Game MiniTask Part 2

  • Collaboration Game
  • Combine your custom function with a partner’s and play with the order of the calls to give 3 different 24 measure songs with two sections in each song that are made by functions.
  • When you have made the first run of your combined code for the 1st song, write a one paragraph explanation as a set of comments in your code of how you and your partner actually combined your function after the finish statement.

10 of 15

Collaboration Game MiniTask Part 3�

  • Collaboration Game
  • When you and your partner have completed the MiniTask and have completed all 3 songs, write a one paragraph explanation of how you and your partner agreed on the musical form of the 3 different songs.

11 of 15

Collaboration Game MiniTask Part 4

  • Review your 3 paragraphs and write your answers to each of the questions below in your final code as comments after the finish statement.
  • Did any of the following occur as part of your collaboration? Why or why not?
    • Was there a decrease in the size and complexity of tasks required of you as an individual programmer?
    • Were multiple perspectives shared in developing ideas for coming up with the 3 songs?
    • Was it easier to find and correct errors?
    • Did developing section components independently make collaboration tasks clearer than working together with one person coding and other person doing different task to support the coder?

12 of 15

Final Questions

1. Which of these is NOT an example of a musical section?

    • Intro
    • Verse
    • Drums
    • Chorus

13 of 15

Final Questions

2. Which of these options correctly defines the function myFunction() with the parameters, startMeasure and endMeasure?

    • myFunction(startMeasure, endMeasure):
    • myFunction(2, 5)
    • def myFunction():
    • def myFunction(startMeasure, endMeasure):

Python

14 of 15

Final Questions

2. Which of these options correctly defines the function myFunction() with the parameters, startMeasure and endMeasure?

    • myFunction(startMeasure, endMeasure) { }
    • myFunction(2, 5)
    • function myFunction() { }
    • function myFunction(startMeasure, endMeasure) { }

Javascript

15 of 15

Final Questions

3. What is an abstraction?

    • A bundling of ideas to form a single concept
    • A variety of sounds throughout sections
    • Parts of a song that are related, but also are distinct from each other
    • A statement that returns a value to the function call