
A sawtooth wave raises from a minimum value to a maximum value in a straight line, hence the jagged shape. Triangle waves are like square waves but with lower average amplitudes. It is recognizable by its constant frequencies, the horizontal lines. This waveform is square-shaped and it goes down and up at fixed intervals. Also decibels is not simply a measure of amplitude there will be a description of decibels later below. The gain is how loud (how big the amplitude) the samples are going to be before any post-processing sound effects are done (as opposed to volume which is the dB of the final sound).ĭon't worry about the output properties just yet. Since this is a sine wave, it will oscillate the sine wave for that long. duration: The length of the sound in seconds.To draw a comparison, CD audio has a sample rate of 44100 Hz and DVD audio has a sample rate or 96000 Hz or 192000 Hz. fs: sampling frequency aka sample rate which is the number of samples (data points) in the waveform per second.Lets review the keyword arguments used here: Each sample in the sound is a single amplitude.Įnter fullscreen mode Exit fullscreen mode

I won't go into detail about the mathematical properties of the sine function, but its two most important parameters are the frequency, which is how short each wave is (low frequencies are longer), and the amplitude, which is how tall it is. I know you might be thinking what kind of waveforms album songs are made of, but that is complicated territory since there are many instruments and post-processing effects at play. It makes sense to start with explaining the composition of the simplest types of wave forms.

I still might cover audioop in some other post but only because I'm curious.īy the way, scipy.signal has many, many more audio manipulator functions than audioop, but it will not be covered in this post either. So I was looking for python libraries that could do this and zignal came up on the first page of results (spoiler alert: it doesn't but it's still interesting). This post was originally going to be about the audioop python module but I was disappointed with its lack of equalization functions and nearly everything else related to audio.
#Python equalizer audio series#
We will then work our way up more advanced sound libraries and hopefully, you will finish reading this blog series knowing more about the different python audio modules than before. I will start by covering the features of a simple signal processing module that is designed for readability of the source code, zignal. Along the way, you will learn quite a bit about sound theory! It looks like I'll cover one library or most of one library per post. As much as I would like to grab all the python audio libraries, figure them out and place them here, I simply can't look at all those libraries, so I will cover as many as I can. This post series serves to scratch my developer itch.

The reason why I like audio processing is that it combines applied math and signals with cool music tones. I really, really want to find out what these audio signals are made of.
