Michael J. Wilson Music 256a Fall 2010 Homework #3 ---------------------------------------------------------------------- IDEAS / COMMENTS: I was able to auto-detect sampling rate this time. I hard-capped it at 48000 since if Alsa is used it can pick a very high sampling rate if we just look for the highest. The audio transformations are handled by a separate class. It contains a mutex to control access to data shared between the audio and display threads. It can fill up a buffer for transformation independently of the audio buffer size, which lets us pick whatever frame size we want when starting Jack or similar systems. I implemented a class to handle the waterfall plot data. It's basically a circular list of vectors holding waterfall data with all the indexing hidden from the outside. I also implemented a few options to change the spectral view in realtime, such as window changes, scaling changes, zooming in on the lower part of the frequency band, and switching between a linear and dB scale. Finally, I implemented some rudimentary pitch estimation. I used a thresholded unbiased autocorrelation to find periodic structures in the sound. It doesn't work very well, unfortunately. I really enjoyed looking at different sound files encoded in different formats and seeing how their spectra were changed. I found the concept of this assignment very satisfying. ---------------------------------------------------------------------- DIFFICULTIES: Due to external factors I didn't have as much time to work on this assignment as I would have liked to. I initially had a hard time getting the magnitude spectrum to display correctly. Once I worked out the proper scaling and translation parameters it started to look good. I am disappointed in how poor the pitch detection turned out, but given how I am doing it I don't think that was necessarily unexpected. I am planning to use pitch detection as a key part of my final project so I will be studying this in more detail in the coming weeks. The code is also not very optimized; there are occasional xruns noted by qjackctl. ---------------------------------------------------------------------- COLLABORATORS: I didn't have any direct collaborators on this project. I used the chuck_fft code and referred to the source code of sndpeek as I was writing this program.