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.