Question: Alter the code below to use a while loop rather than repeated code to play the clips 5 times in a row. 2 3

Alter the code below to use a while loop rather than repeated

Alter the code below to use a while loop rather than repeated code to play the clips 5 times in a row. 2 3 init() 4 setTempo(88) 5 6 start=1 7 clip = YG WEST COAST HIP HOP PIANO_HIGH_1 8 length dur (clip) = 9 from earsketch import * 10 # Change this section 11 insertMedia (YG WEST COAST HIP HOP PIANO_HIGH_1,1,start) 12 insertMedia (YG_WEST COAST HIP_HOP_CLAP_SNARE 1,2,start) 13 insertMedia (YG WEST COAST HIP_HOP_KICK_1,3,start) 14 insertMedia (YG_WEST COAST HIP_HOP HIHAT 3,4, start) 15 start length 16 insertMedia (YG WEST COAST HIP HOP PIANO_HIGH_1,1,start) 17 insertMedia (YG WEST COAST HIP HOP_CLAP_SNARE_1,2,start) 18 insertMedia (YG WEST COAST HIP_HOP KICK_1,3, start) 19 insertMedia (YG WEST COAST HIP HOP HIHAT 3,4, start) 20 start length 21 22 insertMedia (YG WEST COAST HIP HOP PIANO_HIGH_1,1,start) insertMedia (YG WEST COAST HIP HOP_CLAP_SNARE_1,2, start) insertMedia(YG WEST COAST HIP_HOP_KICK_1,3,start) 24 insertMedia (YG WEST COAST HIP HOP HIHAT 3,4,start) 23 25 start += length 26 27 28 insertMedia (YG WEST COAST HIP HOP PIANO_HIGH_1,1,start) insertMedia (YG WEST COAST HIP_HOP_CLAP SNARE_1,2,start) insertMedia (YG WEST COAST HIP HOP_KICK_1,3,start) 29 insertMedia (YG_WEST COAST HIP HOP HIHAT_3,4, start) 30 start length 31 insertMedia (YG WEST COAST HIP HOP_PIANO_HIGH_1,1,start) 32 insertMedia (YG WEST COAST HIP_HOP_CLAP_SNARE 1,2,start) 33 insertMedia (YG WEST COAST HIP HOP_KICK_1.3, start) 34 insertMedia (YG WEST COAST HIP HOP HIHAT_3,4,start) start = length 35 36 37 finish()

Step by Step Solution

3.29 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python program from earsketch import init setTempo88 start 1 clip YGWESTCOA... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!