0

I am doing a project which requires signal processing of the audio when a wave file is provided to me. I know how to compute the amplitude using sample value of a channel using the formula

   20*log(Sample Value/Maximum attainable sample Value)

But what to Do If I have lets say 6 channels,what would I need to do with Sample values of every channel to get the amplitude for plotting the waveform.I am reading the wave file with

   AudioInputStream 

which probably gives me the sample values in frames as

   [1|2|3|4|5|6],[1|2|3|4|5|6],[3rd Frame] and so on...

where each sample is an 8 or 16 bit value.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Soul Enrapturer
  • 367
  • 2
  • 3
  • 14
  • 2
    *"compute the amplitude using sample value of a channel using the formula"* The instantaneous sample level has nothing to do with the amplitude or loudness of a sound. For that you need dB or RMS, which both require a group of samples to work with. – Andrew Thompson Dec 23 '12 at 06:17
  • Actually I know about that but I need to find out instantaneous amplitude in DB of a waveform,Someone told me that I need to sum up wave spectrum from each waveform obtained from channels using FFT,but it seems it's not a good answer as summing up spectrum may cause constructive or destructive interference which sometimes will cause an over amplified sound or sometimes turn it into silence.I don't think that waveforms obtained from channels interfere with each other- – Soul Enrapturer Dec 23 '12 at 08:15

1 Answers1

0

I got the answer: Since channels are meant for multiple speaker systems,the audio which we receive may be affected by constructive or destructive interference of signals coming from other speakers.So it is essential to convert each channel to a waveform and then adding up the spectra of channels to obtain a spectrum,now using this spectrum I'll have to make a waveform which will provide me with correct value of the audio signals amplitude at an instantaneous time.

Soul Enrapturer
  • 367
  • 2
  • 3
  • 14