To use the node in your project you should have the cesars/melody library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.
C++ implementation
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto ch = getValue<input_IN>(ctx);
if (ch == 0)
emitValue<output_OUT>(ctx, getValue<input_N0>(ctx));
else if (ch == 1)
emitValue<output_OUT>(ctx, getValue<input_N1>(ctx));
else if (ch == 2)
emitValue<output_OUT>(ctx, getValue<input_N2>(ctx));
else if (ch == 3)
emitValue<output_OUT>(ctx, getValue<input_N3>(ctx));
else if (ch == 4)
emitValue<output_OUT>(ctx, getValue<input_N4>(ctx));
else if (ch == 5)
emitValue<output_OUT>(ctx, getValue<input_N5>(ctx));
else if (ch == 6)
emitValue<output_OUT>(ctx, getValue<input_N6>(ctx));
else if (ch == 7)
emitValue<output_OUT>(ctx, getValue<input_N7>(ctx));
else if (ch == 8)
emitValue<output_OUT>(ctx, getValue<input_N8>(ctx));
else if (ch == 9)
emitValue<output_OUT>(ctx, getValue<input_N9>(ctx));
else if(ch >= 10)
return;
}