1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dybincka [34]
3 years ago
9

Assignment 10: Create a Song of the Summer edhesive

Computers and Technology
1 answer:
Viefleur [7K]3 years ago
8 0

# python code

# script_name:Song of Summer

#

# author:Jonathan Hajzus

# description:Listener chooses 1 of 3 songs to listen to

from earsketch import *

from random import *

init()

setTempo(120)

genre = readInput("Pick a genre: Hiphop, RNB, or Rock.")

#hiphop

if genre == ("Hiphop"):

measure = []

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 1, 5)

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 7, 11)

fitMedia(CIARA_SET_DRUMBEAT_5, 3, 7, 11)

fitMedia(CIARA_SET_BASSLINE_2, 2, 7, 11)

setEffect(1, VOLUME, GAIN, 0, 4, -60, 6)

setEffect(1, VOLUME, GAIN, -60, 6, 0, 7)

fillDrum = CIARA_SET_DRUMBEAT_5

beat = "0+++0+++0-000+00"

index = randint(1,5)

if measure in range (1, 7, 1):

for index in range (index):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(7, 11)

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 10, 16)

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 18, 22)

fitMedia(CIARA_SET_DRUMBEAT_5, 3, 18, 22)

fitMedia(CIARA_SET_BASSLINE_2, 2, 18, 22)

for measure in range(11, 18, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(17, 22)

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 23, 27)

fitMedia(CIARA_SET_THEME_ATMOS_2, 1, 29, 33)

fitMedia(CIARA_SET_DRUMBEAT_5, 3, 29, 33)

fitMedia(CIARA_SET_BASSLINE_2, 2, 29, 33)

for measure in range(22, 29, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(29, 33)

elif genre == ("RNB"):

measure = []

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 1, 5)

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 7, 11)

fitMedia(CIARA_SET_DRUMBEAT_1, 3, 7, 11)

fitMedia(CIARA_SET_BASSLINE_2, 2, 7, 11)

setEffect(1, VOLUME, GAIN, 0, 4, -60, 6)

setEffect(1, VOLUME, GAIN, -60, 6, 0, 7)

fillDrum = CIARA_SET_DRUMBEAT_1

beat = "0+++0+++0-000+00"

index = randint(1,5)

if measure in range (1, 7, 1):

for index in range (index):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(7, 11)

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 10, 16)

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 18, 22)

fitMedia(CIARA_SET_DRUMBEAT_1, 3, 18, 22)

fitMedia(CIARA_SET_BASSLINE_2, 2, 18, 22)

for measure in range(11, 18, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(17, 22)

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 23, 27)

fitMedia(CIARA_SET_THEME_ATMOS_1, 1, 29, 33)

fitMedia(CIARA_SET_DRUMBEAT_1, 3, 29, 33)

fitMedia(CIARA_SET_BASSLINE_2, 2, 29, 33)

for measure in range(22, 29, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(29, 33)

elif genre == ("Rock"):

measure = []

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 1, 5)

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 7, 11)

fitMedia(RD_ROCK_POPELECTRICBASS_1, 3, 7, 11)

fitMedia(CIARA_SET_BASSLINE_2, 2, 7, 11)

setEffect(1, VOLUME, GAIN, 0, 4, -60, 6)

setEffect(1, VOLUME, GAIN, -60, 6, 0, 7)

fillDrum = RD_ROCK_POPELECTRICBASS_1

beat = "0+++0+++0-000+00"

index = randint(1,5)

if measure in range (1, 7, 1):

for index in range (index):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(7, 11)

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 10, 16)

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 18, 22)

fitMedia(RD_ROCK_POPELECTRICBASS_1, 3, 18, 22)

fitMedia(CIARA_SET_BASSLINE_2, 2, 18, 22)

for measure in range(11, 18, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(17, 22)

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 23, 27)

fitMedia(RD_ROCK_POPELECTRICLEAD_2, 1, 29, 33)

fitMedia(RD_ROCK_POPELECTRICBASS_1, 3, 29, 33)

fitMedia(CIARA_SET_BASSLINE_2, 2, 29, 33)

for measure in range(22, 29, 1):

makeBeat(fillDrum, 3, measure, beat)

def myFunction(startMeasure, endMeasure):

fitMedia(CIARA_SET_BASSLINE_1, 4, startMeasure, endMeasure)

myFunction(29, 33)

finish()

Explanation:

You might be interested in
There was an airplane crash, every single person on board died, but yet two people survived. How is this possible?
Luda [366]
Every SINGLE person. Every person on bored that were not in a relationship died. The two that are in a relationship, did not die.

With brain teasers like this, you have to think outside of the box.
6 0
3 years ago
Read 2 more answers
An equation that performs a calculation is a formula. True or false quest
Natali5045456 [20]
This is a TRUE statements
6 0
3 years ago
Mechanisms that combine memory, processing speed, and knowledge to regulate the analysis and flow of information within the info
gizmo_the_mogwai [7]

Answer:

control processes.

Explanation:

Mechanisms that combine memory, processing speed, and knowledge to regulate the analysis and flow of information within the information-processing system are referred to as executive/control processes.

3 0
3 years ago
Pls help ...
dedylja [7]

Answer:

  • You open the class, and print sleep after thread 3000
  • So A
8 0
3 years ago
Mattias's friend asked him to critique his presentation about gorillas. Mattias noticed that there weren't any images of gorilla
Deffense [45]

Answer:

c

Explanation:

7 0
3 years ago
Other questions:
  • The four basic stucture of computer are input processing output and storage true or false
    15·1 answer
  • What kind of game was pole position?
    6·2 answers
  • What percentage of business are using social media today
    14·1 answer
  • What is the name of the advanced warrior race of robots in Doctor Who?
    10·2 answers
  • Identify what a computer needs to
    14·1 answer
  • 3. Discuss microprocessor components, chips,
    15·1 answer
  • You are trying to sell a new product to a store owner. Which method of presentation
    10·1 answer
  • Dragging a mouse over text is called
    9·1 answer
  • 5. An external CSS file is saved with D. Answer the following questions. 1. Explain the purpose and advantages of using CSS.​
    7·1 answer
  • The international system of units is very important to our worldwide science community because it is easier for scientists to sh
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!