Waves

Welcome. Previously, I wrote a post about how bipolar junction transistors can be used to implement digital logic. Since writing that post, I discovered the rabbit hole of audio electronics - specifically guitar effects pedals - and along with it a broader understanding of the role of the transistor.

While the content in my previous post isn’t necessarily wrong (provides a working understanding of an important role BJT’s play in the digital world), it reflects the limited perspective I had on these devices at the time.

I set out to write an update covering transistors as amplifiers, but found that I wanted to include a brief primer on sound and audio signals. I put together some python scripts to generate some .wav files and plots, and ultimately that evolved into this program:

screenshot

The source code and precompiled binaries are available at the Wave Playground Repository.

Features and use

This program allows the user to specify waves by entering values for frequency, duration, amplitude, and shape.

The sum of all the waves the user has entered is plotted and played as audio. An additional plot displays the frequency content of the generated wave.

What was used

I wrote the progenitor scripts for this program in python so I stuck with python to try and salvage some of that effort. The wave generation is done with numpy and scipy, and all the plotting with matplotlib. The GUI is built with PyQt, and the executibles are built via github action with pyinstaller.

These last two - PyQt and PyInstaller - were both new to me. Both were easy enough to get a working understanding of and fit the scope of the project pretty well. There isn’t anything particularly wrong about packaging a python application as a standalone executable, but in hindsight, if an executable is the end goal there are probably better choices.