Audio Loop Station, 1st Developmental Entry

Audio Loop Station was my second choice of projects.  I do not regret at all that it was assigned to me.  I also think having only 2 persons on this team may make it more manageable, although, we may have to spend more relative time on the project to implement it, having one less member.

Over the course of the last few weeks, other than turning in our assignment, our group narrowed in on a few areas:

Determining what C++ Audio Library to Use

We eliminated the selection of Superpowered quite early, as we noticed there were not that many examples of code out there.  The name also could present a problem in searching for examples, and videos as Superpowered can apply to super-heroes and bring up too much on a google search.

We have navigated to JUCE.  JUCE is well documented and has plenty of videos and tutorials to come up to speed with it.  It has its own development environment also.  The framework is well developed, but I wonder if it is too much.  It may also be too little in terms of the functions that can be called for our Audio Loop Station.

We may also need to use some functionality from Aquila.  After reviewing some documentation, I think I know how to reverse an audio track.  https://github.com/zsiciarz/aquila/blob/master/aquila/source/WaveFileHandler.cpp

Reviewed the Physics of Audio Signal Manipulation

Reviewed the Fourier physics of Time Stretching, and Pitch Shifting.  I used Mathcad to study what may happen to a Fourier series during Time Stretching, which does not affect the pitch of a loop.  I enjoyed this exercise, as I used to design seismic instruments where the frequency range of the output is from 0.003 to 100 Hz.  Well, audio is from 20 to 20,000 Hz.  Hence, I am very much aware about frequency bandwidths, and manipulation of time-based signals.


One observation about this project is that track duration (pic above) frequency does not overlap the audio frequency.  I arbitrarily set it to 0.01 Hz to 2 Hz (100 seconds to 0.5 seconds) long.  What this means, is that we would not care for a clip that is only ¼ second long, or 0.4 seconds long.  The clip cannot be just a fading bang that is over in less than 0.5 seconds.

The non-overlapping band widths of audio frequency versus track duration makes this whole project possible.  Otherwise, chaotic meaningless audio garbage would be generated.

So how would Time Stretching be achieved?  The pic below shows an example of an audio file that is time stretched by 15%.  It is easy to see that the frequency in the beginning of the blue trace (stretched by 15%) has the same frequency as the red trace (peaks and valleys of the signals line up.  It is also pretty easy to see that end frequencies (pitch) is the same.  What does this do to Fourier transforms of the signal?

Below we show the magnitude of Fourier transforms for the above time signals.  We can see that the magnitudes at the peaks are similar, but the peaks of the longer time signal has shifted by roughly 15%.  This hint tells us how to transform an audio signal into a new time stretched, or crunched signal.

Leave a comment

Your email address will not be published. Required fields are marked *