Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import random
  2. import time
  3.  
  4. bd_pattern = ["one", "two", "m0rk"]
  5. crash_or_fill = ["crash", "fill"]
  6. type_of_fill = ["boom", "shakalaka", "ugly shot", "m0rk"]
  7.  
  8. def random_int(pattern):
  9. return random.randrange(len(pattern))
  10.  
  11. def do_drums():
  12. print ("Bass Drum Pattern: {}".format(bd_pattern[random_int(bd_pattern)]))
  13. print ("Crash/Fill note: {}".format(crash_or_fill[random_int(crash_or_fill)]))
  14. print ("Crash/Fill Type: {}".format(type_of_fill[random_int(type_of_fill)]))
  15. print('------------------')
  16.  
  17. if __name__ == "__main__":
  18. starttime=time.time()
  19. while True:
  20. do_drums()
  21. time.sleep(32 - ((time.time() - starttime) % 32))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement