Composers Desktop Project Forum

General Category => General Board => Topic started by: p8rpp on September 18, 2019, 09:11:00 AM

Title: normalize level in the spectral domain?
Post by: p8rpp on September 18, 2019, 09:11:00 AM
Hi all,

i sometimes find myself in the situation where I'd like to normalize an .ana audiofile in the spectral domain to its maximum level. Is this somehow possible without having to convert it to a .wav time domain file?

Thanks for all ideas!
Title: Re: normalize level in the spectral domain?
Post by: p8rpp on September 18, 2019, 09:41:31 AM
I am replying to myself here as I found an older post by Richard explaining the intricacies in
http://unstablesound.net/cdpforum/index.php?topic=102.msg422#msg422
which answers my question.
Title: Re: normalize level in the spectral domain?
Post by: p8rpp on September 18, 2019, 09:44:17 AM
BUT...

i am wondering if I can save computation time by
1. pvoc synthesizing an .ana file to .wav
2. running only a peak level analysis (HOW?)
3. and changing the gain of the original .ana file in the spectral domain
avoiding another pvoc anal run.

Any ideas? Thanks!
Title: Re: normalize level in the spectral domain?
Post by: joehuergo on September 18, 2019, 03:09:49 PM
"sndinfo maxsamp" returns relevant information for this, I believe
Title: Re: normalize level in the spectral domain?
Post by: p8rpp on September 18, 2019, 03:25:26 PM
Thanks Joe,
great, indeed it does and on Unix I can parse it like
  sndinfo infile.wav | grep "max possible gain" | cut -d " " -f 4
which leaves only the question how to raise gain in the spectral domain.
Title: Re: normalize level in the spectral domain?
Post by: p8rpp on September 18, 2019, 03:26:41 PM
Stupid me, it is
  spec gain infile.ana outfile.ana gainfactor
sorry for the noise.