Prev Previous Post   Next Post Next
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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 04:38 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.