J. Frantz’s Status Reports

April 12

This Week’s Accomplishments:

This week, I spent a lot of time working on my C++ code, to be loaded onto our microcontroller. I have completed most, but not all of the real-time pitch-shifting algorithm, with quite a few roadblocks. The first was that I found great difficulty in importing a library for computing the Direct Fourier Transform. In order to minimize the difficulty of interacting with a new interface, I wrote my own DFT code myself, following the Cooley-Tukey radix-2 algorithm. I also wrote code for the Inverse Direct Fourier Transform, which was a simple edit of the DFT code.

Here is my current DFT code, with some print debugging commented out:

I have not yet optimized my code for quickness or implemented garbage collection, which will be necessary for programming in C++. However, I have tested my code and found that for a few test inputs, my output matches that of the Python function “numpy.fft.fft”.

I have found some difficulty in converting my previous Python algorithm not just into C++ but into a real-time operation. This is still in-progress. I will need to test my code’s performance to ascertain what amount of latency is safe.

I have used the micro-USB cable I ordered to connect our microcontroller to my laptop. Next week, I aim to start by learning how to use the Daisy Library to receive input samples and send output samples. I will then implement the “delay” functionality, which is comparatively simple.

We are somewhat behind our original schedule and a little pressed for time. Nevertheless, we are confident in our ability to complete our project in the next week. I will spend a lot of time completing and testing my code within the next few days.

March 29

This Week’s Accomplishments:

This week, I began programming in C++. I first created functions to extract samples from a .wav file and create a new .wav file using a list of samples. This allows us to easily test our algorithms using imported sound files. Then, I began reworking the pitch-shifting algorithm in C++. I am modifying it so it completes the task in chunks, which is vital for outputting data in real time with minimal latency. I tried importing the FFT library “shy_fft,” but it doesn’t seem to work properly. After a lot of troubleshooting, I switched to “FFTW.”

Additionally, I ordered a micro-USB cable with data transmission for connecting our microcontroller to a computer.

Status:

Our schedule is on track, but time is getting tight. We will stay diligent to complete our project satisfactorily.

Next Week:

Next week, I will continue rewriting the phase vocoder algorithm for real-time use in C++. I will test the FFTW import to ensure that it works properly. When I am done, I will start writing the delay algorithm.

March 22

This Week’s Accomplishments:

This week, I have written the phase vocoder algorithm in Python. It successfully shifts our test tone by a given number of semitones up or down. There are currently some harmonics introduced in the process that I will need to debug, but the output is coherent. I also tested the input levels coming out of a guitar using an oscilloscope. I noticed that there is a significant amount of noise above the threshold of human hearing. So, we decided that we can use a simple RC filter to remove the noise before the signal gets input into the Daisy Seed. This should avoid any issues with aliasing. We also completed part of the Ethics Assignment this week.

Status:

Now that the phase vocoder pitch shifter works, progress is back on track.

Next Week:

Next week, I will start rewriting the phase vocoder algorithm in C++. Notably, for real-time input, I will need to use a circular buffer to store the signal while each batch is being operated upon. I will determine if I need to write a fast Fourier transform algorithm or if we can import a (or use an already-imported) library.

March 15

This Week’s Accomplishments:

This week, I completed the time-stretching portion of the pitch-shifting algorithm. I have started the phase vocoder portion as well, which is vital to keeping the sound coherent. I also completed Steps 1-3 of the Ethics Assignment. I discussed next steps with my team.

Status:

My progress is still slightly behind schedule, but since this week was scheduled as slack time, I have caught up a bit. The pitch shifter is unsurprisingly difficult, and I will need to focus significantly on the circular buffer used in making this a real-time operation.

Next Week:

Next week, I will complete and test the phase vocoder algorithm in Python, and I plan to begin the process of rewriting it in C++. My team and I will also test some of our materials with an oscilloscope in the lab. I will bring my guitar and some cables in provide input signals for this testing.

March 8

This Week’s Accomplishments:

This week, I continued to make progress on the pitch-shifting algorithm. I retrieved the Daisy Seed microcontroller, and verified that it connected with my computer so I could load a program onto it. I also began teaching myself how to program in C++, as the Daisy Seed uses that language to be programmed.

Status:

My progress is slightly behind schedule since I haven’t finished programming the phase vocoder algorithm, but it is moving along steadily.

Next Week:

Next week, I will reconvene with the team after spring break. I plan to continue programming the phase vocoder pitch-shifting algorithm, and I will research how to rewrite it in C++, a language I am a beginner in. For example, I will determine if I need to write my own direct Fourier transform algorithm or if I could import one.

February 22

This Week’s Accomplishments:

This week, I researched and began to program the pitch-shifting algorithm. The bucket size will be an important trade-off, as both pitch accuracy and low latency are important considerations for our users. I have been largely busy with other responsibilities this week, but I have not been idle for this project.

Status:

Our progress is on schedule.

Next Week:

Next week, I will meet and discuss with my team. We will continue to research and order components. I plan to finish programming the phase vocoder pitch-shifting algorithm, as I continue to await the arrival of the Daisy Seed.

February 15

This Week’s Accomplishments:

This week, I fell ill, but I was still able to make some progress. I created a block diagram for the our pedal’s internal design, including the procedure the microcontroller will follow. I also ordered some parts (the Daisy Seed and the input/output sockets) that are integral to our pedal’s design. My group and I met and heavily solidified and revised our pedal’s features and external controls. Finally, I contributed slides to our team’s Design Presentation.

Status:

Our progress is mostly on schedule, although I wasn’t able to complete some of the tasks for this week. Still, we are following a good pace, and I will complete the aforementioned tasks next week.

Next Week:

Next week, I will continue to research and order components (including a 9V DC input port), I plan to program the phase vocoder pitch-shifting algorithm, and I will begin to test the components if they arrive early enough.

February 8

This Week’s Accomplishments:

This week, I presented my team’s Proposal Presentation. I discussed some design details with my teammates and course staff, including proposing the Daisy Seed microcontroller as our mechanism for completing the audio-to-digital conversion, programming the digital effects, and completing the digital-to-audio conversion. I researched the Daisy Seed and the quarter-inch cable input/output sockets. I discussed plans with my team to subdivide work for our Design Presentation: I plan to focus heavily on our Quantitative Design Requirements and the Block Diagram.

Status:

Our progress is on schedule.

Next Week:

Next week, I plan to program the algorithm for pitch-shifting in a test file, using a phase vocoder. I will discuss with my team which voltage the pedal should operate at. In addition, I plan to order some parts (the Daisy Seed, the input/output sockets, and the DC power adapter) for the pedal, and when the Daisy Seed comes in, I plan to acquire it and begin learning how to operate it.