Change default stereo panner to equal power balance
The stereo-width panner is not generally useful. In order to change the azimuth, width has to be reduced, which usually leads to comb-filter artifacts. Equal power stereo, also matches the default mono to stereo panner better than the stereo-width panner. Last but not least, control surfaces only have an azimuth control knob, without an easy way to reduce width, this leaves the panner insensitive.
This commit is contained in:
parent
dbd4b9d07d
commit
a7a781971e
@ -29,6 +29,7 @@
|
|||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
#include "pbd/file_utils.h"
|
#include "pbd/file_utils.h"
|
||||||
|
#include "pbd/stateful.h"
|
||||||
#include "pbd/stl_delete.h"
|
#include "pbd/stl_delete.h"
|
||||||
|
|
||||||
#include "ardour/debug.h"
|
#include "ardour/debug.h"
|
||||||
@ -68,13 +69,13 @@ PannerManager::instance ()
|
|||||||
static bool panner_filter (const string& str, void */*arg*/)
|
static bool panner_filter (const string& str, void */*arg*/)
|
||||||
{
|
{
|
||||||
#ifdef COMPILER_MSVC
|
#ifdef COMPILER_MSVC
|
||||||
/**
|
/**
|
||||||
* Different build targets (Debug / Release etc) use different versions
|
* Different build targets (Debug / Release etc) use different versions
|
||||||
* of the 'C' runtime (which can't be 'mixed & matched'). Therefore, in
|
* of the 'C' runtime (which can't be 'mixed & matched'). Therefore, in
|
||||||
* case the supplied search path contains multiple version(s) of a given
|
* case the supplied search path contains multiple version(s) of a given
|
||||||
* panner module, only select the one(s) which match the current build
|
* panner module, only select the one(s) which match the current build
|
||||||
* target (otherwise, all hell will break loose !!)
|
* target (otherwise, all hell will break loose !!)
|
||||||
*/
|
*/
|
||||||
#if defined (_DEBUG)
|
#if defined (_DEBUG)
|
||||||
return str.length() > 12 && (str.find ("panner_") == 0) && (str.find ("D.dll") == (str.length() - 5));
|
return str.length() > 12 && (str.find ("panner_") == 0) && (str.find ("D.dll") == (str.length() - 5));
|
||||||
#elif defined (RDC_BUILD)
|
#elif defined (RDC_BUILD)
|
||||||
@ -170,27 +171,34 @@ PannerInfo*
|
|||||||
PannerManager::select_panner (ChanCount in, ChanCount out, std::string const uri)
|
PannerManager::select_panner (ChanCount in, ChanCount out, std::string const uri)
|
||||||
{
|
{
|
||||||
PannerInfo* rv = NULL;
|
PannerInfo* rv = NULL;
|
||||||
PanPluginDescriptor* d;
|
|
||||||
int32_t nin = in.n_audio();
|
int32_t nin = in.n_audio();
|
||||||
int32_t nout = out.n_audio();
|
int32_t nout = out.n_audio();
|
||||||
uint32_t priority = 0;
|
uint32_t priority = 0;
|
||||||
|
|
||||||
/* look for user-preference -- check if channels match */
|
/* look for user-preference -- check if channels match */
|
||||||
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
d = &(*p)->descriptor;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
if (d->panner_uri != uri) continue;
|
if (d.panner_uri != uri) continue;
|
||||||
if (d->in != nin && d->in != -1) continue;
|
if (d.in != nin && d.in != -1) continue;
|
||||||
if (d->out != nout && d->out != -1) continue;
|
if (d.out != nout && d.out != -1) continue;
|
||||||
return *p;
|
return *p;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* look for exact match first */
|
/* look for exact match first */
|
||||||
|
|
||||||
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
d = &(*p)->descriptor;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
|
|
||||||
if (d->in == nin && d->out == nout && d->priority > priority) {
|
/* backward compat */
|
||||||
priority = d->priority;
|
if (Stateful::loading_state_version < 6000 && d.panner_uri == "http://ardour.org/plugin/panner_2in2out") {
|
||||||
|
if (d.in == nin && d.out == nout) {
|
||||||
|
priority = 9999;
|
||||||
|
rv = *p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (d.in == nin && d.out == nout && d.priority > priority) {
|
||||||
|
priority = d.priority;
|
||||||
rv = *p;
|
rv = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,38 +206,45 @@ PannerManager::select_panner (ChanCount in, ChanCount out, std::string const uri
|
|||||||
|
|
||||||
/* no exact match, look for good fit on inputs and variable on outputs */
|
/* no exact match, look for good fit on inputs and variable on outputs */
|
||||||
|
|
||||||
|
#if 0
|
||||||
priority = 0;
|
priority = 0;
|
||||||
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
/* unused, so far Ardour only features 4 panners:
|
||||||
d = &(*p)->descriptor;
|
* in = 1 ; out = 2 // Mono to Stereo
|
||||||
|
* in = 2 ; out = 2 // Equal Power Stereo
|
||||||
|
* in = 2 ; out = 2 // Stereo Balance
|
||||||
|
* in = -1 ; out = -1 // VBAP
|
||||||
|
*/
|
||||||
|
|
||||||
if (d->in == nin && d->out == -1 && d->priority > priority) {
|
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
priority = d->priority;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
|
|
||||||
|
if (d.in == nin && d.out == -1 && d.priority > priority) {
|
||||||
|
priority = d.priority;
|
||||||
rv = *p;
|
rv = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rv) { return rv; }
|
if (rv) { return rv; }
|
||||||
|
|
||||||
/* no exact match, look for good fit on outputs and variable on inputs */
|
/* no exact match, look for good fit on outputs and variable on inputs */
|
||||||
|
|
||||||
priority = 0;
|
priority = 0;
|
||||||
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
d = &(*p)->descriptor;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
|
|
||||||
if (d->in == -1 && d->out == nout && d->priority > priority) {
|
if (d.in == -1 && d.out == nout && d.priority > priority) {
|
||||||
priority = d->priority;
|
priority = d.priority;
|
||||||
rv = *p;
|
rv = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rv) { return rv; }
|
if (rv) { return rv; }
|
||||||
|
#endif
|
||||||
|
|
||||||
/* no exact match, look for variable fit on inputs and outputs */
|
/* no exact match, look for variable fit on inputs and outputs */
|
||||||
|
|
||||||
priority = 0;
|
priority = 0;
|
||||||
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
d = &(*p)->descriptor;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
|
|
||||||
if (d->in == -1 && d->out == -1 && d->priority > priority) {
|
if (d.in == -1 && d.out == -1 && d.priority > priority) {
|
||||||
priority = d->priority;
|
priority = d.priority;
|
||||||
rv = *p;
|
rv = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,11 +280,11 @@ PannerManager::get_available_panners(uint32_t const a_in, uint32_t const a_out)
|
|||||||
|
|
||||||
/* get available panners for current configuration. */
|
/* get available panners for current configuration. */
|
||||||
for (list<PannerInfo*>::const_iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
for (list<PannerInfo*>::const_iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
|
||||||
PanPluginDescriptor* d = &(*p)->descriptor;
|
PanPluginDescriptor const& d ((*p)->descriptor);
|
||||||
if (d->in != -1 && d->in != in) continue;
|
if (d.in != -1 && d.in != in) continue;
|
||||||
if (d->out != -1 && d->out != out) continue;
|
if (d.out != -1 && d.out != out) continue;
|
||||||
if (d->in == -1 && d->out == -1 && out <= 2) continue;
|
if (d.in == -1 && d.out == -1 && out <= 2) continue;
|
||||||
panner_list.insert(std::pair<std::string,std::string>(d->panner_uri,d->name));
|
panner_list.insert(std::pair<std::string,std::string>(d.panner_uri,d.name));
|
||||||
}
|
}
|
||||||
return panner_list;
|
return panner_list;
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,11 @@
|
|||||||
|
|
||||||
#include "pbd/cartesian.h"
|
#include "pbd/cartesian.h"
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
|
#include "pbd/enumwriter.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/failed_constructor.h"
|
#include "pbd/failed_constructor.h"
|
||||||
|
#include "pbd/stateful.h"
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
#include "pbd/enumwriter.h"
|
|
||||||
|
|
||||||
#include "evoral/Curve.h"
|
#include "evoral/Curve.h"
|
||||||
|
|
||||||
@ -126,6 +127,9 @@ PannerShell::configure_io (ChanCount in, ChanCount out)
|
|||||||
fatal << _("No panner found: check that panners are being discovered correctly during startup.") << endmsg;
|
fatal << _("No panner found: check that panners are being discovered correctly during startup.") << endmsg;
|
||||||
abort(); /*NOTREACHED*/
|
abort(); /*NOTREACHED*/
|
||||||
}
|
}
|
||||||
|
if (Stateful::loading_state_version < 6000 && pi->descriptor.in == 2) {
|
||||||
|
_user_selected_panner_uri = pi->descriptor.panner_uri;
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::Panning, string_compose (_("select panner: %1\n"), pi->descriptor.name.c_str()));
|
DEBUG_TRACE (DEBUG::Panning, string_compose (_("select panner: %1\n"), pi->descriptor.name.c_str()));
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ static PanPluginDescriptor _descriptor = {
|
|||||||
"http://ardour.org/plugin/panner_1in2out",
|
"http://ardour.org/plugin/panner_1in2out",
|
||||||
"http://ardour.org/plugin/panner_1in2out#ui",
|
"http://ardour.org/plugin/panner_1in2out#ui",
|
||||||
1, 2,
|
1, 2,
|
||||||
10000,
|
20,
|
||||||
Panner1in2out::factory
|
Panner1in2out::factory
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ static PanPluginDescriptor _descriptor = {
|
|||||||
"http://ardour.org/plugin/panner_2in2out",
|
"http://ardour.org/plugin/panner_2in2out",
|
||||||
"http://ardour.org/plugin/panner_2in2out#ui",
|
"http://ardour.org/plugin/panner_2in2out#ui",
|
||||||
2, 2,
|
2, 2,
|
||||||
10000,
|
20,
|
||||||
Panner2in2out::factory
|
Panner2in2out::factory
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ static PanPluginDescriptor _descriptor = {
|
|||||||
"http://ardour.org/plugin/panner_balance",
|
"http://ardour.org/plugin/panner_balance",
|
||||||
"http://ardour.org/plugin/panner_balance#ui",
|
"http://ardour.org/plugin/panner_balance#ui",
|
||||||
2, 2,
|
2, 2,
|
||||||
2000,
|
25,
|
||||||
Pannerbalance::factory
|
Pannerbalance::factory
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ static PanPluginDescriptor _descriptor = {
|
|||||||
"http://ardour.org/plugin/panner_vbap",
|
"http://ardour.org/plugin/panner_vbap",
|
||||||
"http://ardour.org/plugin/panner_vbap#ui",
|
"http://ardour.org/plugin/panner_vbap#ui",
|
||||||
-1, -1,
|
-1, -1,
|
||||||
1000,
|
10,
|
||||||
VBAPanner::factory
|
VBAPanner::factory
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user