25class ScalingFilter1D :
public Plugin{
34 void begin(uint8_t mode = INCREMENTAL);
45 inline void set_ratio(ControlParameter output_distance, ControlParameter input_distance){
46 set_ratio(output_distance / input_distance);
52 void enroll(
RPC *rpc,
const String& instance_name);
54 ControlParameter ratio = 1.0;
70 DecimalPosition input_position;
71 DecimalPosition output_position;
72 uint8_t mode = INCREMENTAL;
83class ScalingFilter2D :
public Plugin{
92 void begin(uint8_t mode = INCREMENTAL);
103 inline void set_ratio(ControlParameter output_distance, ControlParameter input_distance){
104 set_ratio(output_distance / input_distance);
110 void enroll(
RPC *rpc,
const String& instance_name);
137 DecimalPosition input_1_position;
138 DecimalPosition input_2_position;
139 DecimalPosition output_1_position;
140 DecimalPosition output_2_position;
141 uint8_t mode = INCREMENTAL;
BlockPorts provide a unified interface for mapping inputs and outputs of different StepDance componen...
Definition core.hpp:148
RPC class for handling remote procedure calls over serial streams.
Definition rpc.hpp:35
void begin(uint8_t mode=INCREMENTAL)
Initializes the ScalingFilter1D with the specified mode.
BlockPort input
Input BlockPort. Map upstream components to the input.
Definition filters.hpp:63
void set_ratio(ControlParameter output_distance, ControlParameter input_distance)
Sets the scaling ratio using output and input distances.
Definition filters.hpp:45
BlockPort output
Output BlockPort. Map downstream components to the output.
Definition filters.hpp:67
void set_ratio(ControlParameter ratio)
Sets the scaling ratio between output and input.
void set_ratio(ControlParameter ratio)
Sets the scaling ratio between output and input.
void set_ratio(ControlParameter output_distance, ControlParameter input_distance)
Sets the scaling ratio using output and input distances.
Definition filters.hpp:103
BlockPort input_1
First input BlockPort. Map upstream components to this input.
Definition filters.hpp:121
ControlParameter ratio
ControlParameter scaling output relative to input (output/input). Can be set by calling set_ratio().
Definition filters.hpp:115
void begin(uint8_t mode=INCREMENTAL)
Initializes the ScalingFilter2D with the specified mode. Must be called to set up the filter.
BlockPort output_1
First output BlockPort corresponding to the scaled input_1. Map downstream components to this output.
Definition filters.hpp:129
BlockPort output_2
Second output BlockPort corresponding to the scaled input_2. Map downstream components to this output...
Definition filters.hpp:133
BlockPort input_2
Second input BlockPort. Map upstream components to this input.
Definition filters.hpp:125