note-freq

cesars/melody/note-freq

No description
note-freq
@/note-freq
INnumber
note-freq
OUT
IN
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 {
};

Number notes[10] = {30000,622.25,739.99,830.61,880,932.33,987.77,1174.66,1479.98,30000};
/*
        RES=622.25,
        FAS=739.99,
        SOL=783.99,
        SOLS=830.61,
        LA=880,
        SI=987.77,
        RE2=1174.66,
        FAS2=1479.98,
        PAU=30000; */

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    int note = getValue<input_IN>(ctx);
    if (note >= 10)
        return;
    emitValue<output_OUT>(ctx, notes[note]);
}