I got a Raspberry Pi 2 for Christmas... 2 years ago. And, I've not touched it since. 🙈
I had aspirations to code then, but lost interest and willpower. Just kept saying, I'll get to that eventually.
Well, guess what? It's 2019 🥳, eventually is here, and I'm going to get somewhat serious! I'm going to learn to code something for my pi in Python. 🐍
But... I could probably use a hand here. I'm new to programming and don't exactly know where to start, just know that I need to start. I chose Python because I have a friend that lives nearby who codes regularly and suggested it. I figured we could do a bit of paired work and perhaps that'd help with learning.
I also stumbled upon this recent helpful discussion here:
... that seems to scratch my itch for some basic "just getting started" with coding in Python information.
I'm wondering is this the right way to go about it? If I plan on learning to code, do I just pick a lang and go for it? Should I backstep a bit and look at the fundamentals more? I guess I can just start flipping through these resources and Googling things when I get confused, right? Is there any one perfect place to begin?
My ultimate goal is to code a white noise machine for my pi. I've been using this really awesome site for years and would love to recreate something like this.
Demo several ways of making sound from Numpy arrays in Python, white noise
Soothing Sounds Generator
An acoustically pleasing Python code, targeted initially for Raspberry Pi, but should run almost anywhere.
Uses lightweight, pure Python
SoundDevice
to generate sounds.
Optionally, other sound playback Python packages can be used.
I have used the outputs of this program written to SD cards, played on media players in multiple locations for a few years.
pip install -e .
Usage
The noise color option is one of
white pink blue violet brown
the examples will use pink noise.
Play sound from speakers
python soothing.py pink
save sound to disk
generate raw sound file: python soothing.py pink -o pink.raw
convert raw to lossless FLAC (playable in almost all media players, computer, phone etc.)
One of the reasons I'm writing this post is so that I actually commit to creating something. If I can code my pi into a rain-making noise machine, I'll be pretty dang happy and will definitely take you all along for the ride.
Any words of wisdom, advice, or recommendations—feel free to leave them in the comments.
Now, please don't let me drop the ball on this resolution again! 🤞