Simple Osc Example From Within Renoise

A simple OSC script that works out of the box.
Simply enable the OSC server and then run the script and push the buttons.
The script is fairly small enough to see the basic concept of sending an OSC message to the Renoise OSC server to respond to.
1386 com.vvoois.osc_example_1.xrnx

thanks will check it out

btw you cant drag n drop your script so it installs

EDIT:got it working with the how to manual install xrnx

wow this works really great,i will see if i can maybe add some more stuff to this

i have slowly starting to read the docs and doing some trial and error stuff to this

but one small thing im having problems "adding"buttons to the GUI of this

when i add say a button,and save it doesent show up in the GUI at all??

yeah i figured it out.

was wondering first im having some problems adding button to Vv code snippet
what im looking into is adding buttons to (if its possible,still have to read all the documentation)loop curent pattern and stop looping current pattern

can anyone point me in the right direction??

Seems i need to fix a few things with the package…
Yes it ws TCP at first but changed it to UDP to remove some hassle. (As UDP is the default anyway)
Will fix this asap.
Fixed. I knew i had an archive with only the files and uploaded, i noticed i forgot to change the file-reference in the post…
Had to delete the other one anyway with the text-bug.

thanks bantai,thats excactly what i wanted to do,i looked at your example and i tried doing exactly as you have done,when i tried adding to the GUI,but i kept getting messages like this one

*** main.lua:74: ‘}’ expected (to close ‘{’ at line 42) near ‘if’

Ok, but that’s simply a message and not “a message like this one”.

As you improve as a coder you are expected to read the message. It’s just english telling you there’s a mistake. Fix it.

It says: In a file named main.lua, near line 74, it expects a bracket.

So your cut and paste job probably looks like:

  
 vb:button {  
 vb:button {  
 }  
  

When it should look like

  
 vb:button {  
 }  
 vb:button {  
 }  
  

Or something…

thanks conner

will look into it

Cool man. Persistence is the key.

that works great.

so if i want to add block_move_forward and backward is it something like this

local o_message = OscMessage(
“/renoise/transport/loop/block_move_backwards”,{
{tag=value}
}
)

send_osc_message(o_message)
end

function set_block_loop(enabled)(i still need to check what this should be replaced with)
if client == nil then
connect_to_server()
end

local value = “F”
if (enabled) then
value = “T”
end

and the same for forwards?

i have more time to look into this in the weekend

The message is “/renoise/transport/loop/block_move_backwards”,{{tag=value}} where value is what it supposed to be.
block_move only expects one parameter and only expects it as a tag True or False. This makes matters confusing specially with this boolean functionality in OSC, because people expect that booleans should be tagged differently and then True or False should then be submitted as a specified parameter with the tag.

Here is an example where more parameter expressions are send because more parameters are expected:

  
 o_message = OscMessage(  
 "/renoise/trigger/note_on",{  
 {tag="i",value=instrument_number},  
 {tag="i",value=track_number},  
 {tag="i",value=note_value},  
 {tag="i",value=velocity}  
 }  
 )  
  

tag = “i” stands for: The next parameter will be an integer value.
f stands for a floating point figure
s stands for string
b stands for a an OSC blob. (I thought a message within a message)

You can find all these tag values in a table on this page:
http://opensoundcontrol.org/spec-1_0

Together with that info, it should at least not be too hard to understand working with OSC from within Renoise.
Concocting OSC phrases in other tools like PD works a tat different though (Even though the principle is the same).

now i have some time looking into this again

so is this code more correct?

local value = “F”
if (enabled) then
value = “T”
end

local o_message = OscMessage(
“/renoise/transport/loop/block_move_backwards”,{{tag=value}}
}
)
o_message = OscMessage(
“/renoise/trigger/note_on”,{
{tag=“i”,value=instrument_number},
{tag=“i”,value=track_number},
{tag=“i”,value=note_value},
{tag=“i”,value=velocity}
}

or something like that?

This is why I didn’t start developing tools.

I might when I get more coding experience, however.

What I need is really simply example how to using OSC / maybe work on duplex I can control knobs / sliders from DSP effects / mixer etc…

[quote=“vV”]
A simple OSC script that works out of the box.
Simply enable the OSC server and then run the script and push the buttons.
The script is fairly small enough to see the basic concept of sending an OSC message to the Renoise OSC server to respond to.
1386 com.vvoois.osc_example_1.xrnx

Hi vV,

Not sure why, but the only thing this script seems to do is give a message that says:

/transport/loop/block with 1 arguments (REJECTED)

in my preferences osc panel.

Any ideas why this might be? All ports, protocols, etc seem to be correct.

From which OSC client application are you originating the code, from within an extra Renoise session or did you ported my example to another OSC client side application like PD?

When I originate the above code from within another Renoise session I don’t get this error and if i make any changes to the OSC message where things might go wrong, i already get a Lua error on the client side, so the server does not even gets a chance to receive anything.
I thought from certain other OSC client-apps, you need to send 0 or 1 to set a boolean bit instead of “F” or “T”.

Nah, just doing it from within renoise natively.
All I’ve done is download your tool and run it.

Although, all the osc stuff I had working before, doesn’t seem to work since I upgraded to 2.6 proper (as opposed to the beta releases)
I don’t know what would’ve changed…

Only idea I have is if you were editting the GlobalOscActions.lua from the program directory?

Could be.
I am only working with an out-of-the-box Renoise configuration.

pretty sure I haven’t, but I’ll double check.
Might reinstall renoise.