note-freq-2

cesars/melody/note-freq-2

No description
note-freq-2
@/note-freq-2
INnumber
N0number
N1number
N2number
N3number
N4number
N5number
N6number
N7number
N8number
N9number
note-freq-2
IN
N0
N1
N2
N3
N4
N5
N6
N7
N8
N9
OUT
OUTnumber
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;
 
}