25 #define BSE_TYPE_BALANCE BSE_CXX_DECLARED_CLASS_TYPE (Bse, Balance)
26 #define BSE_IS_BALANCE(o) (::Bse::CxxBase::instance_is_a (o, BSE_TYPE_BALANCE))
51 BSE_CXX_DECLARE_CLASS (Balance);
53 template<
bool>
static inline const unsigned char* inlined_pixstream();
55 static inline const unsigned char* pixstream () {
return inlined_pixstream<true>(); }
57 static inline const char* options () {
return ""; }
58 static inline const char* category () {
static const char *c = NULL;
59 return c ? c : c = sfi_category_concat (
"/Modules", (
"/Spatial/Balance")); }
60 static inline const char* i18n_category () {
static const char *c = NULL;
61 return c ? c : c = sfi_category_concat (
"/Modules", _(
"/Spatial/Balance")); }
62 static inline const char* blurb () {
return _(
"BseBalance is a stereo panning module with two audio and two control inputs, each of which can be seperately level adjusted. The resulting output balance is controlled by a balance adjustment and the sum of the control inputs. To avoid aliasing artefacts for rapid balance changes, the control signal is preprocessed by a simple lowpass filter with adjustable cutoff frequency."); }
63 static inline const char* authors () {
return "Tim Janik"; }
64 static inline const char* license () {
return _(
"GNU Lesser General Public License"); }
65 static inline const char* type_name () {
return "BseBalance"; }
82 enum BalancePropertyID {
96 typedef BalancePropertyID IDType;
107 alevel1 (p->alevel1),
108 alevel2 (p->alevel2),
109 abalance (p->abalance),
110 clevel1 (p->clevel1),
111 clevel2 (p->clevel2),
112 cbalance (p->cbalance),
113 ostrength (p->ostrength),
114 lowpass (p->lowpass),
115 obalance (p->obalance)
120 typedef void AutoUpdateCategory;
132 void get_property (BalancePropertyID prop_id, ::
Bse::Value &value, GParamSpec *pspec)
136 sfi_value_set_real (&value, alevel1);
139 sfi_value_set_real (&value, alevel2);
142 sfi_value_set_real (&value, abalance);
145 sfi_value_set_real (&value, clevel1);
148 sfi_value_set_real (&value, clevel2);
151 sfi_value_set_real (&value, cbalance);
154 sfi_value_set_real (&value, ostrength);
157 sfi_value_set_real (&value, lowpass);
160 sfi_value_set_real (&value, obalance);
164 void set_property (BalancePropertyID prop_id, const ::Bse::Value &value, GParamSpec *pspec)
168 alevel1 = sfi_value_get_real (&value);
171 alevel2 = sfi_value_get_real (&value);
174 abalance = sfi_value_get_real (&value);
177 clevel1 = sfi_value_get_real (&value);
180 clevel2 = sfi_value_get_real (&value);
183 cbalance = sfi_value_get_real (&value);
186 ostrength = sfi_value_get_real (&value);
189 lowpass = sfi_value_get_real (&value);
192 obalance = sfi_value_get_real (&value);
195 property_changed (BalancePropertyID (prop_id));
201 virtual bool editable_property (BalancePropertyID prop_id, GParamSpec *pspec)
208 void property_updated (BalancePropertyID prop_id, guint64 tick_stamp,
double prop_value, GParamSpec *pspec)
210 bool seen_change =
false;
215 property_changed (BalancePropertyID (prop_id)))
219 static struct StaticData {
223 virtual bool property_changed (BalancePropertyID) {
return false; }
224 virtual ~BalanceBase ()
244 klass->set_accessors (::Bse::cxx_get_property_trampoline<BalanceBase, BalancePropertyID>,
245 ::Bse::cxx_set_property_trampoline<BalanceBase, BalancePropertyID>,
246 ::Bse::cxx_editable_property_trampoline<BalanceBase, BalancePropertyID>,
247 ::Bse::cxx_get_candidates_trampoline<BalanceBase, BalancePropertyID>,
249 klass->add_param (PROP_ALEVEL1, sfidl_pspec_Perc (_(
"Audio Input"),
"/opt/src/beast/plugins/bsebalance.idl",397,
"alevel1",_ (
"Input 1 [%]" ) , _ (
"Attenuate the level of audio input 1" ) , 100LL ,
":r:w:S:G:"));
250 klass->add_param (PROP_ALEVEL2, sfidl_pspec_Perc (_(
"Audio Input"),
"/opt/src/beast/plugins/bsebalance.idl",398,
"alevel2",_ (
"Input 2 [%]" ) , _ (
"Attenuate the level of audio input 2" ) , 100LL ,
":r:w:S:G:"));
251 klass->add_param (PROP_ABALANCE, sfidl_pspec_Balance (_(
"Audio Input"),
"/opt/src/beast/plugins/bsebalance.idl",399,
"abalance",_ (
"Balance" ) , _ (
"Balance audio input levels" ) , 0LL ,
":r:w:G:"));
252 klass->add_param (PROP_CLEVEL1, sfidl_pspec_Perc (_(
"Control Input"),
"/opt/src/beast/plugins/bsebalance.idl",402,
"clevel1",_ (
"Input 1 [%]" ) , _ (
"Attenuate the level of control input 1" ) , 100LL ,
":r:w:S:G:"));
253 klass->add_param (PROP_CLEVEL2, sfidl_pspec_Perc (_(
"Control Input"),
"/opt/src/beast/plugins/bsebalance.idl",403,
"clevel2",_ (
"Input 2 [%]" ) , _ (
"Attenuate the level of control input 2" ) , 100LL ,
":r:w:S:G:"));
254 klass->add_param (PROP_CBALANCE, sfidl_pspec_Balance (_(
"Control Input"),
"/opt/src/beast/plugins/bsebalance.idl",404,
"cbalance",_ (
"Balance" ) , _ (
"Balance control input levels" ) , 0LL ,
":r:w:G:"));
255 klass->add_param (PROP_OSTRENGTH, sfidl_pspec_Perc (_(
"Output Panning"),
"/opt/src/beast/plugins/bsebalance.idl",407,
"ostrength",_ (
"Control Strength" ) , _ (
"Adjust how much the control signals affect the output balance" ) , 100LL ,
":r:w:S:G:"));
256 klass->add_param (PROP_LOWPASS, sfidl_pspec_SfiReal (_(
"Output Panning"),
"/opt/src/beast/plugins/bsebalance.idl",408,
"lowpass",_ (
"Lowpass [Hz]" ) , _ (
"Lowpass filter frequency for the control signal" ) , 100LL , 100LL , 1000LL , 10LL ,
"scale:" ":r:w:S:G:"));
257 klass->add_param (PROP_OBALANCE, sfidl_pspec_Balance (_(
"Output Panning"),
"/opt/src/beast/plugins/bsebalance.idl",409,
"obalance",_ (
"Output Balance" ) , _ (
"Adjust output balance between left and right" ) , 0LL ,
":r:w:S:G:"));
258 klass->add_ichannel (
"audio_in1", _(
"Audio In1"), _(
"First audio input"), ICHANNEL_AUDIO_IN1);
259 klass->add_ichannel (
"audio_in2", _(
"Audio In2"), _(
"Second audio input"), ICHANNEL_AUDIO_IN2);
260 klass->add_ichannel (
"ctrl_in1", _(
"Ctrl In1"), _(
"First control input"), ICHANNEL_CTRL_IN1);
261 klass->add_ichannel (
"ctrl_in2", _(
"Ctrl In2"), _(
"Second control input"), ICHANNEL_CTRL_IN2);
262 klass->add_ochannel (
"left_out", _(
"Left Out"), _(
"Left audio output"), OCHANNEL_LEFT_OUT);
263 klass->add_ochannel (
"mix_out", _(
"Mix Out"), _(
"Mixed audio output"), OCHANNEL_MIX_OUT);
264 klass->add_ochannel (
"right_out", _(
"Right Out"), _(
"Right audio output"), OCHANNEL_RIGHT_OUT);
272 #define BSE_CXX_REGISTER_ALL_TYPES_FROM_BSEBALANCE_IDL() \
273 BSE_CXX_REGISTER_EFFECT (Balance); \
276 template<
bool>
const unsigned char*
277 ::Bse::BalanceBase::inlined_pixstream()
282 #pragma align 4 (local_pixstream)
285 static const guint8 local_pixstream[] __attribute__ ((__aligned__ (4))) =
287 static const guint8 local_pixstream[] =
303 "\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\212\0\0\0\0\1\0\0\0"
304 "\377\262\0\0\0\0\1\0\0\0\377\214\0\0\0\0\202\0\0\0\377\260\0\0\0\0\202"
305 "\0\0\0\377\214\0\0\0\0\203\0\0\0\377\256\0\0\0\0\203\0\0\0\377\214\0"
306 "\0\0\0\204\0\0\0\377\254\0\0\0\0\204\0\0\0\377\214\0\0\0\0\205\0\0\0"
307 "\377\252\0\0\0\0\205\0\0\0\377\214\0\0\0\0\203\0\0\0\377\1\276\32""4"
308 "\377\202\0\0\0\377\250\0\0\0\0\202\0\0\0\377\1l&\226\377\203\0\0\0\377"
309 "\214\0\0\0\0\203\0\0\0\377\2\275\32""6\377\273\33""8\377\202\0\0\0\377"
310 "\246\0\0\0\0\202\0\0\0\377\2l&\226\377j&\230\377\203\0\0\0\377\214\0"
311 "\0\0\0\203\0\0\0\377\3\273\33""8\377\272\33:\377\270\33<\377\202\0\0"
312 "\0\377\244\0\0\0\0\202\0\0\0\377\3l&\225\377k&\227\377i'\231\377\203"
313 "\0\0\0\377\214\0\0\0\0\203\0\0\0\377\4\272\33""9\377\270\33<\377\266"
314 "\33>\377\264\34@\377\202\0\0\0\377\242\0\0\0\0\202\0\0\0\377\4m&\225"
315 "\377k&\227\377i&\231\377g'\233\377\203\0\0\0\377\214\0\0\0\0\205\0\0"
316 "\0\377\3\265\34\77\377\263\34B\377\261\34D\377\202\0\0\0\377\240\0\0"
317 "\0\0\202\0\0\0\377\3m&\224\377k&\226\377j&\230\377\205\0\0\0\377\214"
318 "\0\0\0\0\207\0\0\0\377\2\260\34E\377\256\35H\377\207\0\0\0\377\224\0"
319 "\0\0\0\207\0\0\0\377\2n&\224\377l&\226\377\207\0\0\0\377\214\0\0\0\0"
320 "\220\0\0\0\377\224\0\0\0\0\220\0\0\0\377\214\0\0\0\0\203\0\0\0\377\2"
321 "\264\34@\377\262\34B\377\213\0\0\0\377\224\0\0\0\0\213\0\0\0\377\2d'"
322 "\240\377b(\242\377\203\0\0\0\377\214\0\0\0\0\203\0\0\0\377\4\263\34B"
323 "\377\261\34D\377\257\34F\377\255\35H\377\205\0\0\0\377\202\233\222+\377"
324 "\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202\233\222+\377\205\0\0\0\377"
325 "\4f'\235\377d'\237\377b'\241\377`(\243\377\203\0\0\0\377\214\0\0\0\0"
326 "\203\0\0\0\377\6\261\34D\377\260\34F\377\256\35H\377\254\35J\377\252"
327 "\35L\377\250\35N\377\203\0\0\0\377\202\233\222+\377\202\0\0\0\377\224"
328 "\0\0\0\0\202\0\0\0\377\202\233\222+\377\203\0\0\0\377\6h'\232\377f'\235"
329 "\377d'\237\377b'\241\377a(\243\377_(\245\377\203\0\0\0\377\214\0\0\0"
330 "\0\203\0\0\0\377\6\260\34E\377\256\34G\377\254\35J\377\252\35L\377\251"
331 "\35N\377\247\36P\377\203\0\0\0\377\202\233\222+\377\202\0\0\0\377\224"
332 "\0\0\0\0\202\0\0\0\377\202\233\222+\377\203\0\0\0\377\6g'\234\377e'\236"
333 "\377c'\240\377a(\243\377_(\245\377](\247\377\203\0\0\0\377\214\0\0\0"
334 "\0\214\0\0\0\377\202\233\222+\377\202\0\0\0\377\224\0\0\0\0\202\0\0\0"
335 "\377\202\233\222+\377\214\0\0\0\377\214\0\0\0\0\214\0\0\0\377\202\233"
336 "\222+\377\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202\233\222+\377\214"
337 "\0\0\0\377\214\0\0\0\0\214\0\0\0\377\202\233\222+\377\202\0\0\0\377\224"
338 "\0\0\0\0\202\0\0\0\377\202\233\222+\377\214\0\0\0\377\214\0\0\0\0\214"
339 "\0\0\0\377\202\233\222+\377\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202"
340 "\233\222+\377\214\0\0\0\377\214\0\0\0\0\203\0\0\0\377\6\251\35N\377\247"
341 "\36P\377\245\36R\377\243\36T\377\241\36V\377\240\37Y\377\203\0\0\0\377"
342 "\202\233\222+\377\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202\233\222"
343 "+\377\203\0\0\0\377\6_(\244\377^(\247\377\\(\251\377Z)\253\377X)\255"
344 "\377V)\257\377\203\0\0\0\377\214\0\0\0\0\203\0\0\0\377\6\247\35O\377"
345 "\246\36R\377\244\36T\377\242\36V\377\240\37X\377\236\37Z\377\203\0\0"
346 "\0\377\202\233\222+\377\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202\233"
347 "\222+\377\203\0\0\0\377\6^(\246\377\\(\250\377Z)\252\377Y)\255\377W)"
348 "\257\377U)\261\377\203\0\0\0\377\214\0\0\0\0\203\0\0\0\377\4\246\36Q"
349 "\377\244\36S\377\242\36U\377\240\36X\377\205\0\0\0\377\202\233\222+\377"
350 "\202\0\0\0\377\224\0\0\0\0\202\0\0\0\377\202\233\222+\377\205\0\0\0\377"
351 "\4Y)\254\377W)\256\377U)\261\377S*\263\377\203\0\0\0\377\214\0\0\0\0"
352 "\203\0\0\0\377\2\245\36S\377\243\36U\377\213\0\0\0\377\224\0\0\0\0\213"
353 "\0\0\0\377\2T*\262\377R*\264\377\203\0\0\0\377\214\0\0\0\0\220\0\0\0"
354 "\377\224\0\0\0\0\220\0\0\0\377\214\0\0\0\0\207\0\0\0\377\2\232\37_\377"
355 "\231\40a\377\207\0\0\0\377\224\0\0\0\0\207\0\0\0\377\2X)\255\377V)\257"
356 "\377\207\0\0\0\377\214\0\0\0\0\205\0\0\0\377\3\235\37\\\377\233\37^\377"
357 "\231\40`\377\202\0\0\0\377\240\0\0\0\0\202\0\0\0\377\3U)\261\377S*\263"
358 "\377Q*\265\377\205\0\0\0\377\214\0\0\0\0\203\0\0\0\377\4\237\37Z\377"
359 "\235\37\\\377\233\37^\377\231\37`\377\202\0\0\0\377\242\0\0\0\0\202\0"
360 "\0\0\377\4R*\265\377P*\267\377N*\271\377L+\273\377\203\0\0\0\377\214"
361 "\0\0\0\0\203\0\0\0\377\3\235\37[\377\234\37]\377\232\37`\377\202\0\0"
362 "\0\377\244\0\0\0\0\202\0\0\0\377\3O*\270\377M+\273\377K+\275\377\203"
363 "\0\0\0\377\214\0\0\0\0\203\0\0\0\377\2\234\37]\377\232\37_\377\202\0"
364 "\0\0\377\246\0\0\0\0\202\0\0\0\377\2K+\274\377I+\276\377\203\0\0\0\377"
365 "\214\0\0\0\0\203\0\0\0\377\1\233\37_\377\202\0\0\0\377\250\0\0\0\0\202"
366 "\0\0\0\377\1H+\300\377\203\0\0\0\377\214\0\0\0\0\205\0\0\0\377\252\0"
367 "\0\0\0\205\0\0\0\377\214\0\0\0\0\204\0\0\0\377\254\0\0\0\0\204\0\0\0"
368 "\377\214\0\0\0\0\203\0\0\0\377\256\0\0\0\0\203\0\0\0\377\214\0\0\0\0"
369 "\202\0\0\0\377\260\0\0\0\0\202\0\0\0\377\214\0\0\0\0\1\0\0\0\377\262"
370 "\0\0\0\0\1\0\0\0\377\377\0\0\0\0\377\0\0\0\0\377\0\0\0\0\220\0\0\0\0"
371 "\262\0\0\0\377\216\0\0\0\0\262\0\0\0\377\216\0\0\0\0\203\0\0\0\377\17"
372 "\205\"x\377\203#{\377\201#}\377\177#\177\377}$\201\377|$\203\377z$\205"
373 "\377x$\210\377v%\212\377t%\214\377r%\216\377q%\220\377o&\222\377m&\225"
374 "\377k&\227\377\204\0\0\0\377\206\321\253\317\377\204\0\0\0\377\15P*\267"
375 "\377N*\271\377L+\274\377J+\276\377H+\300\377F+\302\377E,\304\377C,\306"
376 "\377A,\311\377\77-\313\377=-\315\377;-\317\377:-\321\377\2029-\322\377"
377 "\203\0\0\0\377\216\0\0\0\0\203\0\0\0\377\15\203#z\377\201#|\377\200#"
378 "~\377~#\201\377|$\203\377z$\205\377x$\207\377v%\211\377u%\213\377s%\216"
379 "\377q%\220\377o&\222\377m&\224\377\204\0\0\0\377\212\321\253\317\377"
380 "\204\0\0\0\377\12J+\275\377I+\277\377G+\302\377E,\304\377C,\306\377A"
381 ",\310\377\77,\312\377>-\314\377<-\317\377:-\321\377\2039-\322\377\203"
382 "\0\0\0\377\216\0\0\0\0\203\0\0\0\377\15\202#|\377\200#~\377~#\200\377"
383 "|$\202\377{$\204\377y$\207\377w$\211\377u%\213\377s%\215\377q%\217\377"
384 "p&\221\377n&\224\377l&\226\377\204\0\0\0\377\212\321\253\317\377\204"
385 "\0\0\0\377\11I+\277\377G+\301\377E,\303\377D,\305\377B,\310\377@,\312"
386 "\377>-\314\377<-\316\377:-\320\377\2049-\322\377\203\0\0\0\377\216\0"
387 "\0\0\0\203\0\0\0\377\17\200#}\377\177#\200\377}$\202\377{$\204\377y$"
388 "\206\377w$\210\377u%\212\377t%\215\377r%\217\377p%\221\377n&\223\377"
389 "l&\225\377j&\227\377i'\232\377g'\234\377\204\0\0\0\377\206\321\253\317"
390 "\377\204\0\0\0\377\12K+\274\377I+\276\377H+\301\377F,\303\377D,\305\377"
391 "B,\307\377@,\311\377>-\314\377=-\316\377;-\320\377\2059-\322\377\203"
392 "\0\0\0\377\216\0\0\0\0\262\0\0\0\377\216\0\0\0\0\262\0\0\0\377\377\0"
393 "\0\0\0\377\0\0\0\0\377\0\0\0\0\212\0\0\0\0"};
397 return local_pixstream;
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:88
Definition: bsebalance.genidl.hh:95
Definition: bsecxxvalue.hh:13
Definition: bsebalance.genidl.hh:52
Definition: sficxx.hh:169
Definition: bsecxxmodule.hh:92
Definition: bsecxxbase.hh:14