View Single Post
Old 05-14-2019, 12:15 PM   #1
Human being with feelings
Join Date: Jan 2013
Location: Düsseldorf, Germany
Posts: 36
Default Reaper C++ API - hookcommand2 wrong values

when using the api function hookcommand2 from reaper_plugin_functions.h with OSC, wrong values are returned.

This is the documentation:
// val/valhw are used for actions learned with MIDI/OSC.
// val = [0..127] and valhw = -1 for MIDI CC,
// valhw >=0 for MIDI pitch or OSC with value = (valhw|val<<7)/16383.0,
// NON_API: bool onAction(KbdSectionInfo *sec, int command, int val, int valhw, int relmode, HWND hwnd);

However, when sending float values via OSC, only values from 0 to 1 are correctly transmitted using the formula above. Integer values via OSC are returning 0 for all int parameters of the function.
Burtan is offline   Reply With Quote