Multiplying/adding/subtracting from an audio file’s waveform?

Hey /r/csharp, I'm a high school senior working on a project for my calculus class (after APs) and I wanted to create a program that multiplies/adds/subtracts from a waveform of popular songs, and teach about how computers store audio and convert it to analog signal.

Unfortunately, it's more of a daunting task than I thought. My original plan was to load the WAV file into a byte array and do some math there with another byte array, but I realized there are still headers/metadata stored, and writing the final bytes to a file just creates a corrupt file. Right now I'm using NAudio to load the WAV but it's still just giving the whole WAV file when I read it from a WaveFileReader.

What's the simplest way to do this? I don't need actual code, just a methodology to get it done. Thanks.

by sciguymjm via /r/csharp

Leave a Reply