Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # velocity in beats per minute
- bpm = 108
- # printing crap just for control
- print "Your song has a velocity of ", bpm, "beats per minute."
- # beats per measure
- measure = 4
- print "at ", measure, "beats per measure"
- # how many different sections
- section = 3
- print "Your song has", section, "different sections."
- # how many measures long are different sections
- section_length1 = 4
- section_length2 = 16
- section_length3 = 4
- # how often are sections played in total
- rep1 = 1
- rep2 = 4
- rep3 = 3
- print "The first part is ", section_length1, "measures long and played ", rep1, "times in total."
- print "The second part is ", section_length2, "measures long and played ", rep2, "times in total."
- print "The third part is ", section_length3, "measures long and played ", rep3, "times in total."
- # number of measures in total
- measures_total = section_length1 * rep1 + section_length2 * rep2 + section_length3 * rep3
- print "That is a total length of ", measures_total, "measures."
- # beats in total
- beats_total = measures_total * measure
- print "That is an impressive total of ", beats_total, "beats!"
- # length in minutes - divide beats in total by bpm
- length = beats_total / bpm
- seconds = beats_total % bpm * 60 / bpm
- print "Your song is approximately ", length, "minutes and ", seconds, "seconds long."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement