sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Robert Jeffares <jeffares.robert@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: Multi Band Processor
Date: Tue, 20 Apr 2021 09:52:51 +1200	[thread overview]
Message-ID: <3d7b0ecc-585b-aae6-d5ad-01824cb3032f@gmail.com> (raw)
In-Reply-To: <8ab46d92-0fc3-f972-250e-c22659741c3a@gmx.de>

Thanks for responding Thomas,

my system starts with a compand function to iron out the devastating 
differences in audio levels on our sources.

This is followed by a mcompand 5 band process which has a low end 
rolloff, a voice presence tweak, and a gentle high end caress to 
mitigate hiss and sibilance.

The source audio will have 20 level and eq variances in 20 minutes.

With some patience and experimentation I have something that functions 
OK and delivers acceptable audio which is an improvement on the source.

On 19/04/21 6:50 am, Dr. Thomas Tensi wrote:
> Hello Robert,
>
>
> sorry for the late answer, hope this helps nevertheless!
>
> > I spent a very long time trying to get the multi band processor shown
> > in man sox to work.
> > It seems the manual is older then the code which has changed.
>
> Hmm.  I am in currently rewriting some of the SoX code for (open-source)
> SoX-VST-Plugins for DAWs (with bit-exact identical behaviour to the
> command-line version) and as far as I can tell, the compand and mcompand
> parameters work as described in the manual.

compand will do some things that don't work in mcompand. The manual 
implies that the parameters are identical.

mcompand has to have a global compand type item at the end. This is not 
clearly explained. I have played with this and arrived at something that 
works for me.

"0,2.0 -38,-38,-28,-28,-6,-28" gain 3  highpass 22 highpass 22 sinc -n 
255 -b 16 -12000

The reason for this is not clear in the documentation. the gain highpass 
and sync all make sense.

>
> > I needed a processor that would take audio from various not so great
> > sources, adjust the dynamic range to suit a talk radio stream, and try
> > and correct the frequency balance. One source consistently has poor
> > room acoustics. Another has levels that vary wildly and a range of
> > audio frequency bandwidths.
> >
> > compand works as advertised. Perhaps not that clearly.
> > mcompand does not work as implied. It does some of what mcompand does
> > but not all.
>
> I find the transfer function definition in SoX a little bit weird, but
> it is extremely flexible.  You do not define some compression ratio or
> some compression threshold directly, but define base points of that
> function.
>
> Your functions look okay, but you could consider rounding off the
> corners of the transfer function by adding a knee value of e.g. 4dB.

I copied someone else's and then modified. It came without knee.

I have added the knee and it certainly smooths the transitions.

Thanks for that.

>
> > I would encourage comments suggestions and improvements.
>
> What you could do is factor out the common parameters and just put in
> the changed values instead; you already did that in part, but putting
> this further would make your script more modular.

At the prototype stage it was easier for me to keep each band seperate.

I found that to much difference between band parameters caused phase 
issues. It works best when each band is processed more or less the same 
and the outputs are combined in the desired ratio. I roll off the low 
end. Allow voice frequencies

>
> As far as I can see, your transfer functions, gain and initial volumes
> are very similar for all of the bands, hence the modular approach could
> be helpful.  The crossover frequencies look okay for me.
I have adjusted the crossover frequencies 'by ear' to use the filter 
slope to best advantage.
>
> I find your release times of 1.2s or even 2.0 quite extreme, but if they
> work for your sound material, that's fine.

The audio sourced from three different TV channels, typically comes 
crashing in at high level. 20db above the average level. Either a device 
or an operator cranks it down. Given the consistency it's a device. To 
even things out a fast attack and a slow release works. The noise floor 
[ hum hiss air condx passing traffic etc ] is about -32. Long release 
prevents the noise being sucked up. I am dealing with speech. Sources 
run from reverberant studios to less than ideal remote locations. Camera 
operators have the high pass filter useful for lapel mic's in circuit 
when the reporter is using a hand held ENG mic. Automatic level 
controllers [that don't] at venues used for Press Conferences or to 
deliver speeches defeat everything in the subsequent path.

I have been able to get a consistent clear result. Today there was a vox 
pop segment recorded at a bus station with several diesel buses running 
in the background. The processed version was better then the original 
broadcast audio.

The 'processor' can be run in a shell script that is invoked when an 
operator edits the source audio and sends it 'to be carted'. Our low 
budget LPFM can't afford the $7k processor, which I am not so sure could 
be tuned as sweetly as this.

I have a set of processors, one for each of our sources. The goal is to 
deliver a consistent sound to our listener but not have the processing 
so heavy as to be tiresome.

mcompand has enabled me to build a virtual device which achieves this.

I am really appreciative of all the work done in sox and associated code 
by a legion of people.

I wish I had the skill to be able to read the source code and perhaps 
write manuals.

Thanks again Thomas for your input.

>
> Hope this helps!
>
>
>     Best regards,
>
>         Thomas
>
>
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

  reply	other threads:[~2021-04-19 21:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11  3:47 Multi Band Processor Robert Jeffares
2021-04-18 18:50 ` Dr. Thomas Tensi
2021-04-19 21:52   ` Robert Jeffares [this message]
2021-04-20 13:54     ` Dr. Thomas Tensi
2021-05-02 15:14       ` SoX Plugins for DAWs Dr. Thomas Tensi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d7b0ecc-585b-aae6-d5ad-01824cb3032f@gmail.com \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).