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.

82 lines
2.1KB

  1. /******************************************************************************
  2. * Copyright 2017-2018 Valerio Orlandini / Sonus Dept. <sonusdept@gmail.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *****************************************************************************/
  17. #include "sonusmodular.hpp"
  18. namespace rack_plugin_SonusModular {
  19. struct Yabp : Module
  20. {
  21. enum ParamIds
  22. {
  23. NUM_PARAMS
  24. };
  25. enum InputIds
  26. {
  27. NUM_INPUTS
  28. };
  29. enum OutputIds
  30. {
  31. NUM_OUTPUTS
  32. };
  33. enum LightIds
  34. {
  35. NUM_LIGHTS
  36. };
  37. Yabp() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {}
  38. void step() override;
  39. };
  40. void Yabp::step()
  41. {
  42. }
  43. struct YabpWidget : ModuleWidget
  44. {
  45. YabpWidget(Yabp *module);
  46. };
  47. YabpWidget::YabpWidget(Yabp *module) : ModuleWidget(module)
  48. {
  49. box.size = Vec(15 * 10, 380);
  50. {
  51. SVGPanel *panel = new SVGPanel();
  52. panel->box.size = box.size;
  53. panel->setBackground(SVG::load(assetPlugin(plugin, "res/yabp.svg")));
  54. addChild(panel);
  55. }
  56. addChild(Widget::create<SonusScrew>(Vec(0, 0)));
  57. addChild(Widget::create<SonusScrew>(Vec(box.size.x - 15, 0)));
  58. addChild(Widget::create<SonusScrew>(Vec(0, 365)));
  59. addChild(Widget::create<SonusScrew>(Vec(box.size.x - 15, 365)));
  60. }
  61. } // namespace rack_plugin_SonusModular
  62. using namespace rack_plugin_SonusModular;
  63. RACK_PLUGIN_MODEL_INIT(SonusModular, Yabp) {
  64. Model *modelYabp = Model::create<Yabp, YabpWidget>("Sonus Modular", "Yabp", "Yabp | Blank Panel", BLANK_TAG);
  65. return modelYabp;
  66. }