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.

45 lines
1.0KB

  1. require_relative '../module'
  2. module DHE
  3. class Tapers < DHE::Module
  4. def initialize
  5. super(name: 'TAPERS', hp: 9, foreground: [30, 100, 30], background: [30, 100, 97])
  6. left = @width / 5.0 + 1.0 / 3.0
  7. right = @width - left
  8. center = @width / 2.0
  9. y = 24.0
  10. delta_y = 16.0
  11. panel_buffer = 4.0
  12. separator_offset = 10.0
  13. 2.times do |i|
  14. connector(left: left, right: right, y: y)
  15. cv_port(x: left, y: y)
  16. attenuverter(x: center, y: y)
  17. medium_knob(x: right, y: y, label: 'LEVEL')
  18. y += delta_y
  19. connector(left: left, right: right, y: y)
  20. cv_port(x: left, y: y)
  21. attenuverter(x: center, y: y)
  22. medium_knob(x: right, y: y, label: 'CURVE')
  23. y += delta_y
  24. shape_toggle(x: left, y: y)
  25. polarity_toggle(x: center, y: y)
  26. output_port(x: right, y: y)
  27. separator(y: y + separator_offset) if i == 0
  28. y += delta_y + panel_buffer
  29. end
  30. end
  31. end
  32. end
  33. MODULE_TO_FILENAME[DHE::Tapers.new] = __FILE__