One of the audio projects I'm working on is going to need to deal with RIFF/WAV data (PCM 16byte, mono, ≈44k sample rate). Most of what I've found so far has been on creating live wave forms, rather than writing to files and I'm looking for some specific issues to these.
What I've got is a 2-dimensional matrix of frequencies. I want to convert this to RIFF/WAV data frame by frame since the frequencies are arbitrary and usually not related to that surrounding it. So what's the best way to 'paint' a WAV data sample/frame by sample/frame and not lose the sound I'm working with?
Secondly, some of these frames will thus contain multiple frequencies (so say A440 and 2400 both at the same time for the duration of the frame): how is this calculated? Are there any essays on this? The closest I found was something saying to take all the frequencies that were present and use the average of them all (so for (440 + 2400)/2) but this to me doesn't seem like it would produce a multiple tone, just a solid tone at 1420. Maybe I'm lacking some knowledge on acoustic math here but that would be a single distinct sound rather than two concurrent. So what should I even look up to try and find more info on how to do this? I've looked up polyphony but that usually results in other questions by other people that haven't been answered.
Thanks everyone! And I look forward to being a contributing (as well as quereying) member
