Random Walk Melody in the Dorian Mode - A Musical Python Coding Challenge
Channel:
Subscribers:
632
Published on ● Video Link: https://www.youtube.com/watch?v=gReMDBLkwIk
This video is about a coding challenge I set for myself to write a musical random walk melody in the Dorian mode.
For the code from this video, see https://github.com/musical-python/youtube/tree/main/videos/dorian_random_walk
See here for my video on "if name equals main": https://youtu.be/L9Lk08nKKVY
Here's the bug I mentioned. On line 16 I write `choices = CHOICES_A`. But on line22 I write `if i % 8 == 0: choices = random.choice(META_CHOICES)`
And when `i = 0`, `0 % 8` does equal zero, so choices gets overwritten with a randomly chosen list from META_CHOICES. In this case it sounds like it was the third one. So line 16 isn't doing anything productive. That's the bug.