Question
using python 3. I always rate my answers. please only serious programers. Please include main function as instructed The set of musical notes is A,
using python 3. I always rate my answers. please only serious programers. Please include main function as instructed
The set of musical notes is A, A#/Bb, B, C, C#/Db, D, D#/Eb, E, F, F#/Gb, G, G#/Ab. All notes start with a letter and may be followed by either # (sharp) or b (flat). A# and Bb are two names for the same note. The distance between two consecutive notes is a half-step. A sequence of 12 half-steps is called an octave. As you can see in the picture, if you move a full octave, you will return to the same note but at a higher or lower pitch.
A chromatic scale includes all the notes in an octave, either with sharps or flats but not both. So A A# B C C# D D# E F F# G G# is a sharp chromatic scale and A Bb B C Db D Eb E F Gb G Ab is a flat chromatic scale.
A piece of music is written in a specific key (a set of notes in a scale). However, a musician may wish to transpose the piece to a different key by uniformly raising or lowering its notes. This is done to either change its pitch or to convert to a set of notes that is more easily played. As an example, the sequence C D E could be transposed down 3 half-steps to become A B C# or A B Db. Similarly, it could be transposed up by 1 half-step to become C# D# F or Db Eb F.
A chord is a group of notes played together. Its lowest note is called its root. The name of a chord is derived from its root note, for example, F#.
The purpose of this assignment is to write a program that will take a set of chords, allow the user to indicate how many half-steps to transpose and display the resulting chords.
Divide the program into three functions:
main
Declare a string that that represents a set of chords (just the roots at this point)
Get input for the number of half-steps
Display the the transposed chords
a function with one parameter, a string of chords.
Return a list of chords from the given string. (In this assignment, the function is only one or two lines, but will be expanded in the future.)
a transpose function with two parameters, a string of chords, and the number of half-steps.
Determine whether the original chords use either a sharp or flat scale and make the corresponding chromatic scale.
Construct the set of transposed chords.
Return a string of transposed chords.
Use string and list methods and operations in your solution.
Examples: transposing "Eb D C F Bb G" 1 half-step down (-1) should produce the string, "D Db B E A Gb"; transposing "D# D C F A# G" 11 half-steps up (+11) should produce the string, "D C# B E A F#"
Octave Octave C# D# Db Eb F# G# A# Gb Ab Bb C# D# Db Eb F# G# A# Gb Ab Bb 1110 Higher C DE FG A BC DEFG AB 220Hz 440Hz Middle C Octave Octave C# D# Db Eb F# G# A# Gb Ab Bb C# D# Db Eb F# G# A# Gb Ab Bb 1110 Higher C DE FG A BC DEFG AB 220Hz 440Hz Middle CStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started