Old 07-03-2013, 06:55 AM   #1
tater01
Human being with feelings
 
Join Date: May 2013
Posts: 16
Default OSC and Reaper Actions

Hi everyone!

I need to know if anyone out there knows how to map a button in TouchOSC to a reaper action.

I know I can learn one using the actions dialog, but I want to hardcode the text in the .ReaperOSC file and hardcode the text in the button in TouchOSC.

So, say I want to map "split items at edit cursor" action ID #40757.

What text do I add to the .ReaperOSC file, and what command do I give the button in TouchOSC?
tater01 is offline   Reply With Quote
Old 07-03-2013, 01:19 PM   #2
tater01
Human being with feelings
 
Join Date: May 2013
Posts: 16
Cool I Figured It Out!

For anyone else that wants to know how to get actions to work from TouchOSC.

You have to put

ACTION i/action t/action/@

in the .ReaperOSC file.

Then

/action/40757

in the button.

Replace 40757 with whatever action from the action list you want.
tater01 is offline   Reply With Quote
Old 07-05-2013, 12:03 AM   #3
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,789
Default

Thanks. I'll keep that in mind for when I get a tablet.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview - Faderport16CSI
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 07-05-2013, 07:43 AM   #4
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by tater01 View Post
For anyone else that wants to know how to get actions to work from TouchOSC.

You have to put

ACTION i/action t/action/@

in the .ReaperOSC file.

Then

/action/40757

in the button.

Replace 40757 with whatever action from the action list you want.
However, do beware custom actions, as their numbers can change, and we have no way to look up the appropriate number programmatically (as we can do with ReaScript). A (clumsy) workaround is to place the action on a toolbar, and use the action to trigger the toolbar button.

Btw, when you're sending

/action/40757

then you should only need the second part:

ACTION t/action/@

But it doesn't hurt to have both (actions do not send feedback via OSC, so there is no danger of redundant network traffic), so I'd just leave it as it is.

Quote:
Originally Posted by airon View Post
Thanks. I'll keep that in mind for when I get a tablet.
No need to remember, it's all mentioned explicitly in the Default.ReaperOSC file. All you need to remember, is to read it when you need it.
Quote:
Originally Posted by Default.ReaperOSC
[...]

# Example: ACTION i/action t/action/@
# The device sends /action 40757 or /action/40757 to trigger the REAPER action
# "split items at edit cursor". See the REAPER actions window for a complete list
# of action command ID numbers.

[...]

ACTION i/action t/action/@

[...]
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 10-14-2020, 05:36 AM   #5
axe2494
Human being with feelings
 
Join Date: Mar 2020
Posts: 26
Default

Hello,

I created a new topic for this (maybe it wasn't necessary, https://forum.cockos.com/showthread.php?t=243441) because I am struggling to create an ACTION button in touchosc.

So in fact from what I am reading in this old post EACH BUTTON description (with the command ID) has to be put in a .reaperosc file and NOT ONLY in the touchosc editor corresponding button ???

Sorry I know very little nearly nothing about programming and this all OSC and touchOSC thing seems so complicated...

Anyway, all the best,

Alexandre
axe2494 is offline   Reply With Quote
Old Yesterday, 01:54 PM   #6
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 730
Default

Not quite as positive as that - Reaper only loads one reaperosc file, so any bindings have to be in the one you load. So you define one (that's "one", just a single one, not multiple) OSC string that you bind to "ACTION" and then use the single (just one) argument that you send over OSC as the action argument.

I don't think you can do anything more complex than that with it.

If you've not already come across it, I've got a different approach but it's still highly inflexible and impractical. That's just what we've got to work with. Potentially you could bind strings with multiple parameters and parse them out but...
https://forum.cockos.com/showthread.php?t=202734
__________________
Quote:
Originally Posted by Tony Williams
...Playing fast around the drums is one thing. But to play with people for others, to listen to, that's something else. That's a whole other world.
pljones is offline   Reply With Quote
Old Today, 04:22 AM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 9,650
Default

Definitively worth a Feature request !


OTOH there additionally is the more "dynamic" binding of actions to OSC messages in the menu where you also can bind them to Midi messages (e.g. CC). Here with Midi, the binding is defined by Midi Channel and CC #, and the CC value can be obtained by a script that is fired due to the message arriving via the Control Path and once having been a Midi message, translated by MidiToReaControlPath of by checking the "control" option in the Midi driver setting.
With OSC messages, they only can be bound to an action, and hence start a script, but any parameters seemingly are lost.
Also worth mentioning in that FR.

-Michael
mschnell is offline   Reply With Quote
Reply

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 09:37 AM.


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