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
Which is the correct expansion of the term Internet?
dem82 [27]

Answer:

international network is the answer

6 0
3 years ago
Read 2 more answers
If a user would like to modify margins to specific settings, users would need to select the _____ option.
RSB [31]
If a user would like to modify margins to specific settings, users would need to select the <span><u>Custom Margins</u> </span>option.
4 0
3 years ago
What is the purpose of saving code snippets?
Brrunno [24]

Answer:

A stores code for later re-use

Explanation:

To find - What is the purpose of saving code snippets?

Solution -

Code Snippet" is used to describe a small portion of re-usable source code, machine code, or text.

They allow a programmer to avoid typing repetitive code during the course of routine programming.

So,

The correct option is - A stores code for later re-use

4 0
3 years ago
Assuming that s and t are Strings, which of the following code fragments are such that the value returned by s.indexOf( t ) befo
KengaRu [80]

Answer:

What programming language is this

Explanation:

5 0
2 years ago
When two files are linked together, the __________ file receives the data from another workbook.?
Ket [755]
When two files are linked together, the <u>d</u><span><u>estination </u></span>file receives the data from another workbook.

If i'm not wrong.

3 0
3 years ago
Other questions:
  • Description A data retrieval tool that finds specified data within a database A collection of records All of the fields for a si
    7·1 answer
  • House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers.
    11·1 answer
  • What is gender bias?
    9·1 answer
  • which of these tools stick to the edge of an image, thus making it easy to select the shape of an image
    6·1 answer
  • What is considered appropriate dress for men and women in the workplace? Select all that apply.
    6·2 answers
  • The Self-Quiz gives you an opportunity to self-assess your knowledge of what you have learned so far.
    13·1 answer
  • Help fast fast anyone
    10·1 answer
  • GIVING OUT BRAINLIEST AND I AM ALSO WARNING EVERYONE TO NOT ANSWER A BUNCH OF rubbish just to get the points!
    7·2 answers
  • Is it possible to code your own game and if so then where should I go to learn and how to publish it?
    12·2 answers
  • Do you think EA sports should add more tape jobs to the game? (Game is nhl22)
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!