def audio_loop(audioclip, nloops=None, duration=None):
 if (duration is not None):
  nloops = (int((duration / audioclip.duration)) + 1)
  return concatenate_audioclips((nloops * [audioclip])).set_duration(duration)
 else:
  return concatenate_audioclips((nloops * [audioclip]))

def audio_loop ( audioclip , nloops = None , duration = None ) : if ( duration is not None ) : nloops = ( int ( ( duration / audioclip . duration ) ) + 1 ) return concatenate_audioclips ( ( nloops * [ audioclip ] ) ) . set_duration ( duration ) else : return concatenate_audioclips ( ( nloops * [ audioclip ] ) )
loops over an audio clip .