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.

Input.hpp 328B

1234567891011121314151617
  1. #pragma once
  2. #include "common.hpp"
  3. #include "engine/Port.hpp"
  4. namespace rack {
  5. struct Input : Port {
  6. /** Returns the value if a wire is plugged in, otherwise returns the given default value */
  7. float normalize(float normalValue, int index = 0) {
  8. return active ? getValue(index) : normalValue;
  9. }
  10. };
  11. } // namespace rack