OSC has arrived.
-
I'm working on a project at the moment that requires OSC support so I figured it was time to add proper OSC support to HISE. With the latest commit you get:
- send / receive OSC messages using scripting callbacks
- automatically pipe OSC messages in and out of global cables to access them within scriptnode.
- OSC logger floating tile for debugging OSC input.
The entire OSC management is done by the
GlobalRoutingManager
object which also contains the documentation of every aspect:https://docs.hise.audio/scripting/scripting-api/globalroutingmanager/index.html
I'm pretty new to OSC but it definitely increases the fun with playing around in scriptnode when you can use the compass of your iPhone as modulation input...
I tried to stick as closely to the standard as possible, but let me know if there is an issue with any OSC source (also you will need to resave all HISE projucer files because it includes a new JUCE module that wasn't included before).
-
@Christoph-Hart exciting I think, but I have no idea what it is :)
-
-
@Dan-Korneff Thanks!
-
Excellent! @Lindon Add this to your VI-Control post ;)
-
@Christoph-Hart Very cool! Looks like it may have broken compilation? I'll revert the commit for now
-
@Casey-Kolb Use xcode 13.1
-
@Casey-Kolb Make sure you resave the HISE projucer project so that it adds the new module. This looks like a linker error because it can't find the new juce_osc.cpp file.
-
@d-healey yup already doing that
-
This looks like a linker error because it can't find the new juce_osc.cpp file.
Definitely this, I checked without resaving and it gives me the same linker errors. Resave and open in Xcode then build again.
-
Can OSC be used to communicate between plugin instances?
-
Let me check...
-
So you can send OSC messages between two HISE instances, so I guess it should work between plugins too.
HISE 1:
const var rm = Engine.getGlobalRoutingManager(); rm.connectToOSC({ "SourcePort": 6666, "TargetPort": 6667, "Domain": "/interhise" }, 0); rm.sendOSCMessage("/funky", "Hallo"); rm.addOSCCallback("/funky", function(id, value) { Console.print(value); });
HISE 2:
const var rm = Engine.getGlobalRoutingManager(); rm.connectToOSC({ "SourcePort": 6667, // Note how the source port and target port are "TargetPort": 6666, // reversed here to allow bidirectional communication "Domain": "/interhise" }, 0); // Compile the other script and it will show up here rm.addOSCCallback("/funky", function(id, value) { Console.print(value); rm.sendOSCMessage("/funky", "Back at you"); });
-
@Christoph-Hart Ooo this opens up a lot of possibilities. I'm thinking of a real-time divisi system :)
-
Yes now that you mention it, it definitely improves the interprocess abilities. Not sure what happens if you use the same port for input / output, but if you're brave you can find it out yourself.