327 Digital Sound Project
327 Digital Sound Project
Digital Sound
Project Description:
This three part project that lasted half the semester utilized the C coding language to
generate text files containing sound samples. These text files could then be converted into wave
files using a provided executable to enable us to listen to the generated sound. The three parts of
this project were to first generate sine waves and dtmf dial tones based on user input. Then, using
some new knowledge of structs from class we modified the first part to work using a sound struct
and it could output to a file. The third and final part of the project we added lots of different
functionality to be able to generate triangle, square, and sawtooth waves. We added functions to
filter, add reverb, echo, mix, and modulate sounds that we generated. Taking in a song text file
that used a specified format we could create songs using these various functions. A sample song
is included below that I wrote and generated using my program.
My Contribution:
I built this project from the ground up based on our project specifications which were
function prototypes and text descriptions of the functions, their parameters, and their output.
Using my previous knowledge of C and what we learned in class covering the C language I was
able to implement all three parts of the project and miss very minimal points. I occasionally got
help from our professor or TA to brainstorm how to effectively implement parts of the project
like the linked list for the last part that needed to have arbitrary node data based on the type of
input being parsed from the input file.
Knowledge Gained:
This project was really good for me to solidify my skills with the C programming
language. What challenged me the most was the dynamic memory allocation and deallocation
with my linked list and a dynamically sized array. These were things I’d never had to do in C
before, so it was really good to learn how to properly use malloc, calloc, realloc, and free. I also
got much better at working with structs and understanding how to create makefiles.
Supporting Documents:
A wave file is linked below that I wrote the infile for which was processed by my code to
output all the necessary sound samples to create the notes for the song. The text file linked is the
infile. The outfile is not linked as it is just thousands of lines of floating point numbers.