Typos In Globaloscactions .Lua And Snippets/Osc.Lua

Thanks. Updated the file in the XRNX repository.

Btw: “COPY” was correct. This was just a problem in some of the older betas which got fixed in the meanwhile.
If there’s a Osc file in the preferences script folder, then this one is used, overriding the one form the Renoise.exe resource folder. So you don’t need to move the file.

Man I’m glad that was a bug.
that drove me crazy.
I pondered the reasoning of it, much longer than I should have.

I have tortioseSVN now so I’ve been updating and I’m sure I will look through more of them.

Fixed some spelling, capitalization and re-worded a couple spots.
Long descriptions got capitalization, short explanations as well as headings didn’t.

Thanks. Updated and fixed some more typos. Will also go through all other docs again.

I’ll start putting these all in this thread, so you don’t need to keep moving them around to here. :)
Maybe a suggestion to just change the name to “Typos”.

Renoise.Midi.API.lua

fixed a few spellings, replaced a word or two, removed a couple duplicates and noticed something I can’t make out.
Line 124, Column 4 “alse”

“false” maybe?

Seems like it could mean that.

Problem with example in Snippets\Osc.lua

a variable wasn’t being declared:

there is a bug somewhere in this portion of the file:

  
-- create some handy shortcuts  
local OscMessage = renoise.Osc.Message  
local OscBundle = renoise.Osc.Bundle  
local app = renoise.app()  
  
-------------------------------------------------------------------------------  
---- Osc server (receive Osc from one or more clients)  
  
-- open a socket connection to the server  
local server, socket_error = renoise.Socket.create_server(  
 "localhost", 8008, renoise.Socket.PROTOCOL_UDP)  
  
if (socket_error) then   
 app:show_warning(("Failed to start the " ..   
 "OSC server. Error: '%s'"):format(socket_error))  
 return  
end  
  
server:run {  
 socket_message = function(socket, data)  
 -- decode the data to Osc  
 local message_or_bundle, osc_error = renoise.Osc.from_binary_data(data)  
  
 -- show what we've got  
 if (message_or_bundle) then  
 if (type(message_or_bundle) == "Message") then  
 print(("Got OSC message: '%s'"):format(tostring(message_or_bundle)))  
  
 elseif (type(message_or_bundle) == "Bundle") then  
 print(("Got OSC bundle: '%s'"):format(tostring(message_or_bundle)))  
  
 else  
 -- never will get in here  
 end  
  
 else  
 print(("Got invalid OSC data, or data which is not " ..   
 "OSC data at all. Error: '%s'"):format(osc_error))  
 end  
  
 socket:send(("%s:%d: Thank you so much for the OSC message. " ..  
 "Here's one in return:"):format(socket.peer_address, socket.peer_port))  
  
 socket:send(OscMessage("/flowers"))  
 end   
}  
  
-- shut off the server at any time with:  
-- server:close()  
  
  

the output:

Got OSC message: '/test/message\0\0\0,i\0\0\0\0\0\0'  
*** std::logic_error: 'socket_client: trying to send messages from a disconnected client.'  
*** stack traceback:  
*** [C]: in function 'send'  
*** TestPad7.lua:41: in function <20><br>
<br>```

<br>
<br>
It turns out this is what is breaking it:<br>
<br>

```lua<br><br>
    socket:send(("%s:%d: Thank you so much for the OSC message. " ..<br>
      "Here's one in return:"):format(socket.peer_address, socket.peer_port))<br>
      <br>
    socket:send(OscMessage("/flowers"))<br>```

<br>
<br>
lines 43-50 don't have a client to use to send anything.<br>
<br>
also you may notice the "local app = renoise.app()" at the top, I attached that to the typo thread.</20>

I meant to post this in the bugs section.

what happened to the typo thread where I last uploaded the snippet?
I just looked at the changes and it hasn’t been changed.

ah moved from the bugs section = this is no longer important.

okay.

Fixed in the XRNX trunk. Thanks. Should have been “renoise.app()” instead of “app”.

This is a s important as before. Just want to keep stuff with code and scripts in this forum here.

okay.

hey I was just testing this with pd:

-- /transport/loop/sequence  
  
add_global_action {   
 pattern = "/transport/loop/sequence",   
 description = "Disable or set a new sequence loop range",  
  
 arguments = { argument("start", "number"), argument("end", "number") },  
 handler = function(rstart, rend)  
 local start_pos = song().transport.loop_start  
 start_pos.line = 1; start_pos.sequence = clamp_value(rstart, 1,   
 song().transport.song_length.sequence)  
  
 local end_pos = song().transport.loop_end  
 end_pos.line = 1; end_pos.sequence = clamp_value(rend + 1, 1,   
 song().transport.song_length.sequence + 1)  
  
 song().transport.loop_range = {start_pos, end_pos}  
 end  
}  

something about it refuses to loop the end pattern.

having 4 patterns
sending this:
send /renoise/transport/loop/sequence 0 4
will be rejected as it should, since there is no pattern 5.

if I send this:
send /renoise/transport/loop/sequence 0 3

the loop will select 3 patterns but not the end or 4th pattern.

since 0-3 is 4 digits.

should be
“send /renoise/transport/loop/sequence 1 5”

but 5 currently is rejected due to a small bug. Will be fixed in B4.

okay, gotcha, thanks.

is it a bad idea if the globalmidiactions and globaloscactions lua files had version numbers mentioned in them so you can tell if your local copy is outdated.

Hey Syflom, use SVN and just checkout the latest everyday, if you make any changes to it, copy it to your prefs/scripts directory.
Are you using OSX? if so there is a bug, I can explain.

Hello,
Im trying to edit this globaloscactions, but I cant find it. (im on osx) I found the scripts folder, but there is not this file inside. should I just put it there?
and while im at it, is it possible to get some information about how to add more osc addresses? (for controlling vst for example?)

thank you
Ofer

On OSX, it’s in the app bundle.

  
/Applications/Renoise.app/Contents/Resources/Scripts/GlobalOscActions.lua  
  

But, don’t edit it directly. Instead, copy it to :

  
/Users/dac514/Library/Preferences/Renoise/V2.6.0/scripts/  
  

Replace dac514 with your username.

Most importantly, read “How to Enable the Scripting Developer Tools in Renoise” from this page. The built in editor will point to the directories you need.

Hello
Im sorry to nag… but there is no globalOscActions.lua in the app bundle, there is not even a scripts folder… should get it from this page and create a scripts folder? or just put in /users/dac514/Library/Preferences/Renoise/V2.6.0/scripts/ ?
(I allready have scripting enabled in renoise)

A real quick test would be to just turn the OSC Server on in the OSC Prefs Panel, if it doesn’t give you any flak, then you have the GlobalOscActions.lua file somewhere.

Maybe just search for GlobalOscActions.lua with Finder.

Also when you find everything, only edit GlobalOscActions.lua in the users tree.

2nd Thought, first just try opening renoise and going to Help, from there toward the bottom there will be a listing that says “Show the Preferences folder”
That should put you where you want to be.