Hi, everyone (and of course @MarcEvanstein).
As I slowly learn Python and SCAMP, I challenge myself to write code to use some of the things I’ve learned to that point.
Marc’s YT videos have been invaluable. His clear, step-by-step instructions are excellent. A 10-minute video takes me several days to complete because I like to duplicate then experiment beyond what he is teaching.
As I watched Marc’s video on fork() and how it works, I created the attached code. Every time you run it, you’ll get a different result, and you can change lots of parameters to tailor the sound any way you want.
I’ve included lots of explanations and comments, which I encourage you to read. I’m hoping it’s clear enough for you to make changes to experiment.
This is a short example of a few things I’ve learned in just 3-4 weeks with SCAMP and Python.
PlayMelody.py (8.6 KB)