23 halp__enum(
"Mode", List, List, Average, Sum, Min, Max);
126 void operator()(ossia::impulse)
const noexcept { }
127 void operator()(
int)
const noexcept
130 for(
const auto& val : self.current_values)
132 res = func.map(res,
float(*val.template target<int>()));
134 res = func.reduce(res);
135 self.outputs.output.value = res;
137 void operator()(
float)
const noexcept
140 for(
const auto& val : self.current_values)
142 res = func.map(res, *val.template target<float>());
144 res = func.reduce(res);
145 self.outputs.output.value = res;
147 void operator()(
bool)
const noexcept
150 for(
const auto& val : self.current_values)
152 res = func.map(res, (*val.template target<bool>() ? 1.f : 0.f));
154 res = func.reduce(res);
155 self.outputs.output.value = res;
157 void operator()(
const std::string&)
const noexcept { }
158 void operator()(ossia::vec2f)
const noexcept
161 for(
const auto& val : self.current_values)
163 const auto& in = *val.template target<ossia::vec2f>();
164 res[0] = func.map(res[0], in[0]);
165 res[1] = func.map(res[1], in[1]);
167 res[0] = func.reduce(res[0]);
168 res[1] = func.reduce(res[1]);
169 self.outputs.output.value = res;
171 void operator()(ossia::vec3f)
const noexcept
174 for(
const auto& val : self.current_values)
176 const auto& in = *val.template target<ossia::vec3f>();
177 res[0] = func.map(res[0], in[0]);
178 res[1] = func.map(res[1], in[1]);
179 res[2] = func.map(res[2], in[2]);
181 res[0] = func.reduce(res[0]);
182 res[1] = func.reduce(res[1]);
183 res[2] = func.reduce(res[2]);
184 self.outputs.output.value = res;
186 void operator()(ossia::vec4f)
const noexcept
189 for(
const auto& val : self.current_values)
191 const auto& in = *val.template target<ossia::vec4f>();
192 res[0] = func.map(res[0], in[0]);
193 res[1] = func.map(res[1], in[1]);
194 res[2] = func.map(res[2], in[2]);
195 res[3] = func.map(res[3], in[3]);
197 res[0] = func.reduce(res[0]);
198 res[1] = func.reduce(res[1]);
199 res[2] = func.reduce(res[2]);
200 res[3] = func.reduce(res[3]);
201 self.outputs.output.value = res;
203 void operator()(
const std::vector<ossia::value>& v)
const noexcept
205 boost::container::small_vector<float, 250> res;
206 const int N = v.size();
208 for(
const auto& val : self.current_values)
210 const auto& in = *val.template target<std::vector<ossia::value>>();
211 for(
int i = 0; i < N; i++)
213 res[i] = func.map(res[i], ossia::convert<float>(in[i]));
217 std::vector<ossia::value> rres;
218 for(
int i = 0; i < N; i++)
219 rres[i] = (
float)func.reduce(res[i]);
221 self.outputs.output.value = std::move(rres);
224 operator()(
const std::vector<std::pair<std::string, ossia::value>>& v)
const noexcept
227 void operator()()
const noexcept { }