ello, I’m trying to send an OSC message to the cvOSCcv module from a microcontroller over the same wifi network. The connection seems to be working fine with MaxMSP udpreceive, I’m able to send float messages to it. But with vcv rack 2 I’m not sure how to get the cvOSCcv module to pick it up. I tried setting the IP to 127.0.0.1 and also tried the IPv4 of my machine, the message is formatted “/ch/1” " value" value being 0. to 1.
I am realising the IP address may only be relevant for outgoing messages from VCV rack, for incoming I would assume it is not used, or should stay at the default 127.0.0.1 so my issue is maybe related to message syntax, but I don’t know, I couldn’t tell from the documentation in the manual.
For further debugging, I tried sending OSC internally (on same machine) from max msp to vcv rack 2 cvOSCcv module, targeting 127.0.0.1 with In Port 7375:
sending value 0.5, the message is formatted “/ch/1 0.5”
cvOSCcv received a trigger message, but VAL stays at 0
I then tried sending OSC from cvOSCcv to max msp, the message is received and formatted the same, “/ch/1 0.5”
So it seems that when formatting my message in the same way, only a trigger is received, and I’m not sure why nothing is received when trying to send osc from a device on same network.
Thank you for the help everyone, I figured out it was an issue on my end with how I was packing the message in max msp, the formatting “/ch/1 0.5” is right and the original issue was that I was sending it the wrong way trying to pack it into a message. I ended up using a prepend node and the signal comes through perfectly now.
Now I will move on to trying to figure out whats up in my code with the microcontroller over wifi.
I will email trowasoft as I have exhausted my approaches. I formatted my osc message exactly as I had in max msp, but cvOSCcv isn’t picking anything up. I even tried formatting it as char *, max msp still picked it up, but nothing in vcv rack.
Maybe its related to the nature of the connection, I’ve only ever seen examples of people using cvOSCcv on a local machine, but it could just as easily be something related to the way my code is set up.
I’m using VS code with platformIO (C++) to program my microcontroller (M5Stick C plus), the code is along the lines of:
#include <M5StickCPlus.h>
#include <WiFi.h>
#include <OSCMessage.h>
#include <WiFiUdp.h>
#include "M5StickWifi.h"
OSCMessage msg("/ch/1");
float temp = 0.5;
WiFiUDP udp;
void setup() {
M5.begin();
connectToWifi("****" , "****");
udp.begin(localPort);
}
void loop() {
char array[10];
dtostrf(temp, 4 , 6, array);
msg.add(array); //can also ignore these 3 lines and write msg.add(temp) instead, I did this to check if it was string/char issue
udp.beginPacket( "*.*.*.*", 7375); //* target machine ip running vcv rack
msg.send(udp);
udp.endPacket();
msg.empty();
M5.Lcd.printf("sentMessage %2.2f\n" , temp);
M5.Lcd.fillScreen(BLACK);
delay(10);
}
with this code I get perfect formatted message in max msp “/ch/1 0.5”