You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

399 lines
18KB

  1. ///////////////////////////////////////////////////
  2. //
  3. // Mixer VCV Module
  4. // Strum 2017
  5. //
  6. ///////////////////////////////////////////////////
  7. #include "dBiz.hpp"
  8. #include "dsp/digital.hpp"
  9. #include "dsp/vumeter.hpp"
  10. namespace rack_plugin_dBiz {
  11. ///////////////////////////////////////////////////
  12. struct PerfMixer : Module {
  13. enum ParamIds
  14. {
  15. MIX_PARAM,
  16. AUX_R1_PARAM,
  17. AUX_R2_PARAM,
  18. AUX_S1_PARAM = AUX_R2_PARAM + 8,
  19. AUX_S2_PARAM = AUX_S1_PARAM + 8,
  20. VOL_PARAM = AUX_S2_PARAM + 8,
  21. PAN_PARAM = VOL_PARAM + 8,
  22. AUX_1_PARAM = PAN_PARAM + 8,
  23. AUX_2_PARAM = AUX_1_PARAM + 8,
  24. MUTE_PARAM = AUX_2_PARAM + 8,
  25. NUM_PARAMS = MUTE_PARAM + 8
  26. };
  27. enum InputIds
  28. {
  29. MIX_IN_L_INPUT,
  30. MIX_IN_R_INPUT,
  31. CH_L_INPUT = 8,
  32. CH_R_INPUT = CH_L_INPUT + 8,
  33. CH_VOL_INPUT = CH_R_INPUT + 8,
  34. CH_PAN_INPUT = CH_VOL_INPUT + 8,
  35. CH_MUTE_INPUT = CH_PAN_INPUT + 8,
  36. AUX_1_INPUT = CH_MUTE_INPUT + 8,
  37. AUX_2_INPUT = CH_MUTE_INPUT + 8,
  38. RETURN_1_L_INPUT = CH_MUTE_INPUT + 16,
  39. RETURN_1_R_INPUT = RETURN_1_L_INPUT + 16,
  40. RETURN_2_L_INPUT = RETURN_1_R_INPUT + 16,
  41. RETURN_2_R_INPUT = RETURN_2_L_INPUT + 16,
  42. NUM_INPUTS
  43. };
  44. enum OutputIds {
  45. MIX_OUTPUT_L,
  46. MIX_OUTPUT_R,
  47. SEND_1_L_OUTPUT,
  48. SEND_1_R_OUTPUT,
  49. SEND_2_L_OUTPUT,
  50. SEND_2_R_OUTPUT,
  51. NUM_OUTPUTS
  52. };
  53. enum LightIds
  54. {
  55. PAN_L_LIGHT,
  56. PAN_R_LIGHT = PAN_L_LIGHT + 8,
  57. MUTE_LIGHT = PAN_R_LIGHT + 8,
  58. METERL_LIGHT=MUTE_LIGHT+8,
  59. METERR_LIGHT=METERL_LIGHT+(12*8),
  60. NUM_LIGHTS=METERR_LIGHT+(12*8)
  61. };
  62. SchmittTrigger mute_triggers[8];
  63. bool mute_states[8] = {1, 1, 1, 1, 1, 1, 1, 1};
  64. float ch_l_ins[8];
  65. float ch_r_ins[8];
  66. float channel_outs_l[8];
  67. float channel_outs_r[8];
  68. float channel_s1_L[8];
  69. float channel_s1_R[8];
  70. float channel_s2_L[8];
  71. float channel_s2_R[8];
  72. float left_sum = 0.0;
  73. float right_sum = 0.0;
  74. float mix_in_l =0.0f;
  75. float mix_in_r = 0.0f;
  76. float send_1_L_sum = 0.0;
  77. float send_1_R_sum = 0.0;
  78. float send_2_R_sum = 0.0;
  79. float send_2_L_sum = 0.0;
  80. PerfMixer() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS,NUM_LIGHTS) {}
  81. void step() override;
  82. json_t *toJson() override
  83. {
  84. json_t *rootJ = json_object();
  85. // mute states
  86. json_t *mute_statesJ = json_array();
  87. for (int i = 0; i < 8; i++)
  88. {
  89. json_t *mute_stateJ = json_integer((int)mute_states[i]);
  90. json_array_append_new(mute_statesJ, mute_stateJ);
  91. }
  92. json_object_set_new(rootJ, "mutes", mute_statesJ);
  93. return rootJ;
  94. }
  95. void fromJson(json_t *rootJ) override
  96. {
  97. // mute states
  98. json_t *mute_statesJ = json_object_get(rootJ, "mutes");
  99. if (mute_statesJ)
  100. {
  101. for (int i = 0; i < 8; i++)
  102. {
  103. json_t *mute_stateJ = json_array_get(mute_statesJ, i);
  104. if (mute_stateJ)
  105. mute_states[i] = !!json_integer_value(mute_stateJ);
  106. }
  107. }
  108. }
  109. };
  110. ///////////////////////////////////////////////////////////////////
  111. void PerfMixer::step()
  112. {
  113. send_1_L_sum = 0.0;
  114. send_1_R_sum = 0.0;
  115. send_2_L_sum = 0.0;
  116. send_2_R_sum = 0.0;
  117. left_sum = 0.0;
  118. right_sum = 0.0;
  119. VUMeter vuBarsL[8]={};
  120. VUMeter vuBarsR[8] = {};
  121. mix_in_l=inputs[MIX_IN_L_INPUT].value;
  122. mix_in_r=inputs[MIX_IN_R_INPUT].value;
  123. float pan_cv[8]={};
  124. float pan_pos[8]={};
  125. for (int i = 0; i < 8; i++)
  126. {
  127. }
  128. // mute triggers
  129. for (int i = 0 ; i < 8; i++)
  130. {
  131. if (mute_triggers[i].process(params[MUTE_PARAM + i].value))
  132. {
  133. mute_states[i] = !mute_states[i];
  134. }
  135. lights[MUTE_LIGHT + i].value = mute_states[i] ? 1.0 : 0.0;
  136. }
  137. for (int i = 0 ; i < 8 ; i++)
  138. {
  139. pan_cv[i] = inputs[CH_PAN_INPUT + i].value / 5;
  140. pan_pos[i] = pan_cv[i] + params[PAN_PARAM + i].value;
  141. if (pan_pos[i] < 0)
  142. pan_pos[i] = 0;
  143. if (pan_pos[i] > 1)
  144. pan_pos[i] = 1;
  145. lights[PAN_L_LIGHT+i].value=1-pan_pos[i];
  146. lights[PAN_R_LIGHT+i].value=pan_pos[i];
  147. ch_l_ins[i] = inputs[CH_L_INPUT + i].value * params[VOL_PARAM + i].value * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  148. ch_r_ins[i] = inputs[CH_R_INPUT + i].value * params[VOL_PARAM + i].value * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  149. if (!mute_states[i] || inputs[CH_MUTE_INPUT + i].value > 0.0)
  150. {
  151. ch_l_ins[i] = 0.0;
  152. ch_r_ins[i] = 0.0;
  153. lights[MUTE_LIGHT + i].value = 0.0;
  154. }
  155. if(!inputs[CH_R_INPUT+i].value)
  156. {
  157. channel_outs_l[i] = ch_l_ins[i] * (1 - pan_pos[i]) * 3;
  158. channel_outs_r[i] = ch_l_ins[i] * pan_pos[i] * 3;
  159. }
  160. else
  161. {
  162. channel_outs_l[i] = ch_l_ins[i] * 2;
  163. channel_outs_r[i] = ch_r_ins[i] * 2;
  164. }
  165. channel_s1_L[i] = channel_outs_l[i] * params[AUX_1_PARAM + i].value * clamp(inputs[AUX_1_INPUT + i].normalize(5.0f) / 5.0f, 0.0f, 1.0f) * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  166. channel_s2_L[i] = channel_outs_l[i] * params[AUX_2_PARAM + i].value * clamp(inputs[AUX_2_INPUT + i].normalize(5.0f)/5.0f,0.0f,1.0f) * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  167. channel_s1_R[i] = channel_outs_r[i] * params[AUX_1_PARAM + i].value * clamp(inputs[AUX_1_INPUT + i].normalize(5.0f)/5.0f,0.0f,1.0f) * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  168. channel_s2_R[i] = channel_outs_r[i] * params[AUX_2_PARAM + i].value * clamp(inputs[AUX_2_INPUT + i].normalize(5.0f)/5.0f,0.0f,1.0f) * clamp(inputs[CH_VOL_INPUT + i].normalize(10.0f) / 10.0f, 0.0f, 1.0f);
  169. vuBarsL[i].dBInterval = 3;
  170. vuBarsR[i].dBInterval = 3;
  171. vuBarsL[i].setValue(channel_outs_l[i] / 10.0);
  172. vuBarsR[i].setValue(channel_outs_r[i] / 10.0);
  173. for (int l = 0; l < 12; l++)
  174. {
  175. lights[METERL_LIGHT + l + (i * 11)].setBrightnessSmooth(vuBarsL[i].getBrightness(l));
  176. lights[METERR_LIGHT + l + (i * 11)].setBrightnessSmooth(vuBarsR[i].getBrightness(l));
  177. }
  178. send_1_L_sum += channel_s1_L[i];
  179. send_1_R_sum += channel_s1_R[i];
  180. send_2_L_sum += channel_s2_L[i];
  181. send_2_R_sum += channel_s2_R[i];
  182. left_sum += channel_outs_l[i];
  183. right_sum += channel_outs_r[i];
  184. }
  185. // get returns
  186. float return_1_l = inputs[RETURN_1_L_INPUT].value * params[AUX_R1_PARAM].value;
  187. float return_1_r = inputs[RETURN_1_R_INPUT].value * params[AUX_R1_PARAM].value;
  188. float return_2_l = inputs[RETURN_2_L_INPUT].value * params[AUX_R2_PARAM].value;
  189. float return_2_r = inputs[RETURN_2_R_INPUT].value * params[AUX_R2_PARAM].value;
  190. float mix_l = (left_sum + return_1_l + return_2_l) * params[MIX_PARAM].value*0.5;
  191. float mix_r = (right_sum + return_1_r + return_2_r) * params[MIX_PARAM].value*0.5;
  192. float send_1_L_mix = (send_1_L_sum) * params[AUX_S1_PARAM].value;
  193. float send_1_R_mix = (send_1_R_sum) * params[AUX_S1_PARAM].value;
  194. float send_2_L_mix = (send_2_L_sum) * params[AUX_S2_PARAM].value;
  195. float send_2_R_mix = (send_2_R_sum) * params[AUX_S2_PARAM].value;
  196. outputs[MIX_OUTPUT_L].value = mix_l+mix_in_l;
  197. outputs[MIX_OUTPUT_R].value = mix_r+mix_in_r;
  198. outputs[SEND_1_L_OUTPUT].value = 3 * send_1_L_mix;
  199. outputs[SEND_1_R_OUTPUT].value = 3 * send_1_R_mix;
  200. outputs[SEND_2_L_OUTPUT].value = 3 * send_2_L_mix;
  201. outputs[SEND_2_R_OUTPUT].value = 3 * send_2_R_mix;
  202. }
  203. template <typename BASE>
  204. struct MuteLight : BASE
  205. {
  206. MuteLight()
  207. {
  208. this->box.size = Vec(15.0, 15.0);
  209. }
  210. };
  211. template <typename BASE>
  212. struct MeterLight : BASE
  213. {
  214. MeterLight()
  215. {
  216. this->box.size = Vec(4, 4);
  217. this->bgColor = nvgRGBAf(0.0, 0.0, 0.0, 0.1);
  218. }
  219. };
  220. struct PerfMixerWidget : ModuleWidget
  221. {
  222. PerfMixerWidget(PerfMixer *module) : ModuleWidget(module)
  223. {
  224. box.size = Vec(15*25, 380);
  225. {
  226. SVGPanel *panel = new SVGPanel();
  227. panel->box.size = box.size;
  228. panel->setBackground(SVG::load(assetPlugin(plugin,"res/PerfMixer.svg")));
  229. addChild(panel);
  230. }
  231. int column_1 = 70;
  232. int lb=5;
  233. int right_column = 310;
  234. int top=50;
  235. int top_row = 60;
  236. int row_spacing = 28;
  237. int row_in = 40;
  238. int column_spacing = 30;
  239. addParam(ParamWidget::create<LRoundWhy>(Vec(right_column + 5, 10), module, PerfMixer::MIX_PARAM, 0.0, 1.0, 0.5)); // master volume
  240. addParam(ParamWidget::create<MicroBlu>(Vec(right_column+7.5, 225 ), module, PerfMixer::AUX_R1_PARAM, 0.0, 1.0, 0.0));
  241. addParam(ParamWidget::create<MicroBlu>(Vec(right_column+7.5, 285 ), module, PerfMixer::AUX_R2_PARAM, 0.0, 1.0, 0.0));
  242. addParam(ParamWidget::create<MicroBlu>(Vec(right_column+7.5, 102.5 ), module, PerfMixer::AUX_S1_PARAM, 0.0, 1.0, 0.0));
  243. addParam(ParamWidget::create<MicroBlu>(Vec(right_column+7.5, 160 ), module, PerfMixer::AUX_S2_PARAM, 0.0, 1.0, 0.0));
  244. // channel strips
  245. for (int i = 0 ; i < 8 ; i++)
  246. {
  247. addInput(Port::create<PJ301MLPort>(Vec(5,7), Port::INPUT, module, PerfMixer::MIX_IN_L_INPUT));
  248. addInput(Port::create<PJ301MRPort>(Vec(30,7), Port::INPUT, module, PerfMixer::MIX_IN_R_INPUT));
  249. addParam(ParamWidget::create<MicroBlu>(Vec(column_1 + column_spacing * i, 75), module, PerfMixer::AUX_1_PARAM + i, 0.0, 1.0, 0.0));
  250. addParam(ParamWidget::create<MicroBlu>(Vec(column_1 + column_spacing * i, 105), module, PerfMixer::AUX_2_PARAM + i, 0.0, 1.0, 0.0));
  251. addInput(Port::create<PJ301MCPort>(Vec(column_1 + column_spacing * i, 15), Port::INPUT, module, PerfMixer::AUX_1_INPUT + i));
  252. addInput(Port::create<PJ301MCPort>(Vec(column_1 + column_spacing * i, 40), Port::INPUT, module, PerfMixer::AUX_2_INPUT + i));
  253. addInput(Port::create<PJ301MIPort>(Vec(lb, top + row_in * i), Port::INPUT, module, PerfMixer::CH_L_INPUT + i));
  254. addInput(Port::create<PJ301MIPort>(Vec(lb + 25, top + row_in * i), Port::INPUT, module, PerfMixer::CH_R_INPUT + i));
  255. addParam(ParamWidget::create<LEDSliderBlue>(Vec(column_1 + column_spacing * i-5, top_row + row_spacing * 2 - 20 + top), module, PerfMixer::VOL_PARAM + i, 0.0, 1.0, 0.0));
  256. addInput(Port::create<PJ301MCPort>(Vec(column_1 + column_spacing * i - 1, top_row + row_spacing * 6 - 45 + top), Port::INPUT, module, PerfMixer::CH_VOL_INPUT + i));
  257. /////////////////////////////////////////////////////
  258. addChild(ModuleLightWidget::create<MeterLight<OrangeLight>>(Vec(column_1 + column_spacing * i + 1 , top_row + row_spacing * 6 + top-15),module,PerfMixer::PAN_L_LIGHT+i));
  259. addChild(ModuleLightWidget::create<MeterLight<OrangeLight>>(Vec(column_1 + column_spacing * i + 20 , top_row + row_spacing * 6 + top-15),module,PerfMixer::PAN_R_LIGHT+i));
  260. addParam(ParamWidget::create<Trimpot>(Vec(column_1 + column_spacing * i +3, top_row + row_spacing * 6 + top-10), module, PerfMixer::PAN_PARAM + i, 0.0, 1.0, 0.5));
  261. addInput(Port::create<PJ301MOrPort>(Vec(column_1 + column_spacing * i - 1, top_row + row_spacing * 6 + top+10), Port::INPUT, module, PerfMixer::CH_PAN_INPUT + i));
  262. ////////////////////////////////////////////////////////
  263. addParam(ParamWidget::create<LEDButton>(Vec(column_1 + column_spacing * i + 3 , top_row + row_spacing * 7+ 10.5 + top+3), module, PerfMixer::MUTE_PARAM + i, 0.0, 1.0, 0.0));
  264. addChild(GrayModuleLightWidget::create<MuteLight<BlueLight>>(Vec(column_1 + column_spacing * i + 4.5 , top_row + row_spacing * 7 +12 + top+3), module, PerfMixer::MUTE_LIGHT + i));
  265. addInput(Port::create<PJ301MCPort>(Vec(column_1 + column_spacing * i-1, top_row + row_spacing * 8 + top+5), Port::INPUT, module, PerfMixer::CH_MUTE_INPUT + i));
  266. //addChild(GrayModuleLightWidget::create<MeterLight<RedLight>>(Vec(column_1 +19 + column_spacing * i, top_row + row_spacing * 2 - 30 + top), module, PerfMixer::METER_LIGHT + 0+(11*i)));
  267. addChild(ModuleLightWidget::create<MeterLight<RedLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5), module, PerfMixer::METERL_LIGHT + 1 + (11 * i)));
  268. addChild(ModuleLightWidget::create<MeterLight<RedLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 2), module, PerfMixer::METERL_LIGHT + 2 + (11 * i)));
  269. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 3), module, PerfMixer::METERL_LIGHT + 3 + (11 * i)));
  270. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 4), module, PerfMixer::METERL_LIGHT + 4 + (11 * i)));
  271. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 5), module, PerfMixer::METERL_LIGHT + 5 + (11 * i)));
  272. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 6), module, PerfMixer::METERL_LIGHT + 6 + (11 * i)));
  273. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 7), module, PerfMixer::METERL_LIGHT + 7 + (11 * i)));
  274. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 8), module, PerfMixer::METERL_LIGHT + 8 + (11 * i)));
  275. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 9), module, PerfMixer::METERL_LIGHT + 9 + (11 * i)));
  276. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 10), module, PerfMixer::METERL_LIGHT + 10 + (11 * i)));
  277. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 19 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 11), module, PerfMixer::METERL_LIGHT + 11 + (11 * i)));
  278. addChild(ModuleLightWidget::create<MeterLight<RedLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5), module, PerfMixer::METERR_LIGHT + 1 + (11 * i)));
  279. addChild(ModuleLightWidget::create<MeterLight<RedLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 2), module, PerfMixer::METERR_LIGHT + 2 + (11 * i)));
  280. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 3), module, PerfMixer::METERR_LIGHT + 3 + (11 * i)));
  281. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 4), module, PerfMixer::METERR_LIGHT + 4 + (11 * i)));
  282. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 5), module, PerfMixer::METERR_LIGHT + 5 + (11 * i)));
  283. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 6), module, PerfMixer::METERR_LIGHT + 6 + (11 * i)));
  284. addChild(ModuleLightWidget::create<MeterLight<BlueLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 7), module, PerfMixer::METERR_LIGHT + 7 + (11 * i)));
  285. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 8), module, PerfMixer::METERR_LIGHT + 8 + (11 * i)));
  286. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 9), module, PerfMixer::METERR_LIGHT + 9 + (11 * i)));
  287. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 10), module, PerfMixer::METERR_LIGHT + 10 + (11 * i)));
  288. addChild(ModuleLightWidget::create<MeterLight<GreenLight>>(Vec(column_1 + 24 + column_spacing * i-5, top_row + row_spacing * 2 - 27 + top + 7.5 * 11), module, PerfMixer::METERR_LIGHT + 11 + (11 * i)));
  289. }
  290. //Screw
  291. addChild(Widget::create<ScrewSilver>(Vec(15, 0)));
  292. addChild(Widget::create<ScrewSilver>(Vec(box.size.x-30, 0)));
  293. addChild(Widget::create<ScrewSilver>(Vec(15, 365)));
  294. addChild(Widget::create<ScrewSilver>(Vec(box.size.x-30, 365)));
  295. // outputs
  296. addOutput(Port::create<PJ301MLPort>(Vec(right_column +5 , 60), Port::OUTPUT, module, PerfMixer::MIX_OUTPUT_L));
  297. addOutput(Port::create<PJ301MRPort>(Vec(right_column +30 , 60 ), Port::OUTPUT, module, PerfMixer::MIX_OUTPUT_R));
  298. addOutput(Port::create<PJ301MLPort>(Vec(right_column + 35, 100 ), Port::OUTPUT, module, PerfMixer::SEND_1_L_OUTPUT));
  299. addOutput(Port::create<PJ301MRPort>(Vec(right_column + 35, 125 ), Port::OUTPUT, module, PerfMixer::SEND_1_R_OUTPUT));
  300. addOutput(Port::create<PJ301MLPort>(Vec(right_column + 35, 160 ), Port::OUTPUT, module, PerfMixer::SEND_2_L_OUTPUT));
  301. addOutput(Port::create<PJ301MRPort>(Vec(right_column + 35, 185 ), Port::OUTPUT, module, PerfMixer::SEND_2_R_OUTPUT));
  302. addInput(Port::create<PJ301MLPort>(Vec(right_column + 35, 225 ), Port::INPUT, module, PerfMixer::RETURN_1_L_INPUT));
  303. addInput(Port::create<PJ301MRPort>(Vec(right_column + 35, 250 ), Port::INPUT, module, PerfMixer::RETURN_1_R_INPUT));
  304. addInput(Port::create<PJ301MLPort>(Vec(right_column + 35, 285 ), Port::INPUT, module, PerfMixer::RETURN_2_L_INPUT));
  305. addInput(Port::create<PJ301MRPort>(Vec(right_column + 35, 310 ), Port::INPUT, module, PerfMixer::RETURN_2_R_INPUT));
  306. }
  307. };
  308. } // namespace rack_plugin_dBiz
  309. using namespace rack_plugin_dBiz;
  310. RACK_PLUGIN_MODEL_INIT(dBiz, PerfMixer) {
  311. Model *modelPerfMixer = Model::create<PerfMixer, PerfMixerWidget>("dBiz", "PerfMixer", "PerfMixer", MIXER_TAG);
  312. return modelPerfMixer;
  313. }