Send line break through OSC to text block?

Post your questions here and we'll all try to help.
Post Reply
farstriderfm
Met Resolume in a bar the other day
Posts: 2
Joined: Tue May 30, 2023 21:52

Send line break through OSC to text block?

Post by farstriderfm »

Hi,

I'm sending OSC data to Avenue through a node.js program which allows users to input text and it shows up in the text field of the text block or text animator. I can send this data and it works just fine, but I want to add a feature where the text goes to a new line if the message is too long.

Is this possible? And if so, what's the input? (Something like \n ??)

Thanks in advance.

Online
Zoltán
Team Resolume
Posts: 7088
Joined: Thu Jan 09, 2014 13:08
Location: Székesfehérvár, Hungary

Re: Send line break through OSC to text block?

Post by Zoltán »

Try sending a line feed (0A hex)
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu

farstriderfm
Met Resolume in a bar the other day
Posts: 2
Joined: Tue May 30, 2023 21:52

Re: Send line break through OSC to text block?

Post by farstriderfm »

Zoltán wrote: Wed Jun 28, 2023 12:40 Try sending a line feed (0A hex)
Thank you for your suggestion. Sending 0x0a was just displaying the ASCII value (the number 10) but I sent a "\n" as a string and that worked. I hope this helps someone else!

elijahnelson
Met Resolume in a bar the other day
Posts: 1
Joined: Sat Aug 12, 2023 04:36

Re: Send line break through OSC to text block?

Post by elijahnelson »

Here's an example of how you might format your OSC message:

javascript
const osc = require('osc');

const udpPort = new osc.UDPPort({
localAddress: '127.0.0.1',
localPort: 12345, // Your OSC port
remoteAddress: '127.0.0.1', // Avenue's address
remotePort: 1234 // Avenue's OSC port
});

udpPort.open();

// Sending the OSC message with a newline character
const textMessage = "Hello,\nThis is a new line!";
udpPort.send({
address: '/text',
args: [
{
type: 's',
value: textMessage
}
]
},mapquest driving directions '127.0.0.1', 1234);
In this example, the textMessage variable contains the text you want to send with a newline character \n in between "Hello," and "This is a new line!". When Avenue receives this OSC message, it should interpret the newline character and display the text on two separate lines.

Remember to replace the relevant port numbers and addresses with the actual values you're using for your setup.

tshirtzesty
Met Resolume in a bar the other day
Posts: 1
Joined: Tue Aug 29, 2023 08:04

Re: Send line break through OSC to text block?

Post by tshirtzesty »

I imagine something could be scripted, but the API does not appear to provide OSC-related functionality. ExecProcess is a command-line OSC tool, so I'm assuming you could create something with itmini crossword.

Or, you could do something insane by transmitting your text encoded in midi to some midi (oh text events) -> OSCII-bot??? Upon further consideration, that might work... That is likely the best approach.

istvan1987
Met Resolume in a bar the other day
Posts: 1
Joined: Thu Oct 12, 2023 11:43

Re: Send line break through OSC to text block?

Post by istvan1987 »

tshirtzesty wrote: Tue Aug 29, 2023 08:06 I imagine something could be scripted, but the API does not appear to provide OSC-related functionality. ExecProcess is a command-line OSC tool, so I'm assuming you could create something with it baba vanga predictions 2024.

Or, you could do something insane by transmitting your text encoded in midi to some midi (oh text events) -> OSCII-bot??? Upon further consideration, that might work... That is likely the best approach.
Unfortunately, this does not work! It might have been working back in August when you posted this, but not now (or I am doing something wrong) :(

Online
Zoltán
Team Resolume
Posts: 7088
Joined: Thu Jan 09, 2014 13:08
Location: Székesfehérvár, Hungary

Re: Send line break through OSC to text block?

Post by Zoltán »

How are you sending OSC, which application?
Software developer, Sound Engineer,
Control Your show with ”Enter” - multiple Resolume servers at once - SMPTE/MTC column launch
try for free: http://programs.palffyzoltan.hu

Post Reply