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
The average number of entities completed per unit time -- the output rate -- from a process is called ____.
Sergio039 [100]

Answer:

Throughput.

Explanation:

The average number of entities completed per unit time -- the output rate -- from a process is called throughput.

Basically, throughput is a technical term used to describe the amount of data that can be transmitted or transferred from one place to another in a specific period of time. It is used to measure or determine the performance of RAM and hard drives.

8 0
2 years ago
Rachelle is writing a program that needs to calculate the cube root of a number. She is not sure how to write the code for that
Dmitriy789 [7]

The cube root is a number multiplied by itself three times to get another number

The code to use is y = x**(1/3)

<h3>How to determine the code to use</h3>

Assume the variable is x, and the cube root of x is y.

So, we have the following equation

y = x^\frac13

In Python, the code to use is y = x**(1/3)

Hence, the code that Rachelle can use in her calculation is x**(1/3)

Read more about cube roots at:

brainly.com/question/365670

3 0
1 year ago
Read 2 more answers
What are examples of templates the Input Mask Wizard offers? Check all that apply.
Vesna [10]
The answer is A B AND D mark me brainliest?
5 0
2 years ago
Read 2 more answers
Assume that you are testing the Orders database introduced in Watt (2014) - Appendix C. Discuss the problems and possible conseq
madreJ [45]

Answer:

129 \frac{2}{?} 23.4. \div 164 \times 5y1 + . \\ .00487ggh

6 0
3 years ago
application that will perform a lot of overwrites and deletes of data and requires the latest information to be available anytim
o-na [289]

Answer:

RDS.

Explanation:

A corporation has implemented a software that conducts the number of information overwriting and deleting, which allows the newest details to be accessible whenever the information is examined. As a Software Engineer, they suggest RDS database technologies.

It is an AWS supported controlled SQL DB service that also reinforces the array type DB for the purpose to contain and maintain the information.

3 0
3 years ago
Other questions:
  • Which loan type requires you to make loan payments while you’re attending school?
    10·1 answer
  • What is basic function of an operating system?
    10·2 answers
  • Attacker player X is standing still on a corner kick, as the ball is played, he jumps up with his arms flailing above his should
    8·1 answer
  • At an open or uncontrolled intersection, yield if ____.
    15·2 answers
  • 4. An advantage presented by straight-in spaces is that
    12·1 answer
  • Why is a high-quality bond typically considered a lower-risk investment than a stock
    10·2 answers
  • Write out the base sequence that is added directly after the primer. In order for Moodle to correctly grade this question, write
    11·1 answer
  • Explain one way in which programmers may get hired.
    9·1 answer
  • Explain any two features of a computer​
    15·1 answer
  • Hey everyone please let my friends answer please?????? .
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!