Sending Audio Via Internet (not LAN)
Hello fellow Max users,
I have been struggling to send audio via the internet for the past few months and figured that it was about time to pull out the big guns; i.e. the all knowing peoples on the Max forum. I am in Boulder Colorado, and my collaborator is in Basel Switzerland, so this would be data over the internet, not a local area network. I am wondering if anyone out there has had any recent success sending audio to another machine over the internet using Max/MSP and/or other software, and if so, what their configuration is.
I have read on many threads here that UPD is probably the best way to go as far as protocols. Max has the jit.net.send/receive patches as part of the networking tutorial and there's always udpsend/receive. I've also explored the option of using something like JackTrip to establish a server and then just send all audio from Max out that way via the audio driver.
I think that the biggest hurdle I have at this point is that, in most cases, neither one of us will have access to the router for the network we are on (sometimes university and sometimes office networks), and thus cannot setup port forwarding and a subsequent p2p connection. I have tried using FreeLan to establish a VPN, but without success. I am currently looking into Hamachi for VPNs and also someone has suggested LoLa, though, I am not 100% sure what that package does (I have an email out to their developers).
If anyone has accomplished sending audio via the internet in the recent past, I would GREATLY appreciated suggestions. Otherwise, I'll be dumping a few hundred hours into a series of dead-ends, which is never my favorite thing to do--I want to make music instead!
Thanks in advance for your time and assistance with this.
Best,
David
UPDATE: I was able to create a virtual hub network using LogMeIn's Hamachi and can now openly communicate with other machines over the internet. This is certainly a step in the right direction. I can send MIDI and Max messages using RTP MIDI or the netsend/receive objects quite well and with approx 200 ms latency, which is totally okay for my application.
For audio, however, I am still having trouble getting clean-ish audio signal from one machine to the other. I was able to get audio sent using jit.catch and jit.net.send objects, but that uses TCP and so packet loss is very audible. I tried using the netsend~ object external by Remu but kept getting "message too long (10040) errors with a pop in the audio stream each time the error message showed up. I also tried using jit.catch --> udpsend and then on the other machine a udpreceive --> jit.release, but this only works on LAN for some reason.
I understand that I can add another layer to the equation and use jacktrip, but I would REALLY like to keep as much "in Max" as possible. Ideally, I could have a send object of some sort in Max that transferred audio via UDP.
Any ideas are appreciated!
Thanks,
David
HI David,
I have recently been playing with a workaround solution for a similar challenge using zoom. Not ideal based on your descriptions, but its ok for rough collaboration/testing. Max interfaces with Zoom using a core audio driver on MacOS.
I would be stoked to help/test any developments and I'm down the road in Denver if it helps.
Cheers,
Langdon
Hi David, just looking for an answer on the same question like yours one year ago: Did you get any solution for sending audio via internet by Max/MSP?
Best
George
Commercial systems (cost money, depending on license plan) include source connect or session link. Both are quite reliable, sometimes 'as good as next door'. You should be able to connect with Max somehow.
Hey All,
Thanks for the suggestions. George, the setup I am now using still isn't quite what I'm looking for, but works for now. I use Jack Router (https://jackaudio.org/) to take the sound from Max and send it to SoundJack (https://www.soundjack.eu/). SoundJack uses a small executable that links to the "stage" portion of their website. From there, you can configure the network side of things.
It works, but multi channel routing is a pain since you have to configure 3 different software programs.
Langdon, I haven't tried Zoom, but would be interested. Does the setup much differ from what I've just described? And I would certainly be down to test/develop the setup. My collaborator is in Switzerland, so getting rehearsal time is a huge pain because of the time difference.
I'm still looking to get this all working within Max, though, so if anyone else reading this is interested in either updating one of the old 32-bit objects or making a new one, let me know. I know that it would be a substantial challenge, but the payoff would be a game changer.
Best,
David
Hello David, do you have any progress on this? I am also trying to do something similar with yours, but I have no idea if it is possible. I posted my question here at https://cycling74.com/forums/is-it-possible-to-control-max-and-receive-msp-signal-with-an-html-web-environment
Can you please explain more about how to send an MSP audio to jackaudio and then route to soundjack? Thank you so much.
Hi UFORANGE,
Info on SoundJack can be found on their website (https://soundjack.eu/index.php). It sounds like it could be a great solution for you on the audio side of things, but not max control. For that, I've used udp send... I think. If you can't get it figured out, I can take a look around. I'm not in front of my computer right now.
I AM still trying to get this to work in Max, but it looks like the only way is by creating an external, so that will be some time off.
Best of luck!
Hi all, I'm trying to do the same using WebRTC, but without success. The most great problem is to create a Room that can output the audio signal like the Max audio driver, to have a multichannel out (in this way you can set different levels or eqs and send it also to external daws like protools or logic or cubase (using Soundflower or other virtual audio tracks). WebRTC uses js node, and this can also used by Max, but I cannot configure it to make the rooms almost work in jweb... Any ideas about it? thx.
Hi all,
Trying to get started with networked control of Max patches--thanks for this thread. David, could you explain more about how you used Hamachi and rtpMIDI to send and receive midi signals through the internet, not on a local network? Trying to clear that hurdle first before I tackle audio signals.
I'm trying to collaborate with someone about 500 miles away, and would love to be able to send midi back and forth to our various devices.
I've been experimenting with Miraweb, and it's such a clean and easy solution for working on multiple devices over LAN. Any chance anyone's found a way to access a Miraweb browser interface from a computer outside my LAN?
Thanks,
Scott
Hi Scott and Keepsound,
I basically just use LogMeIn's Hamatchi to create a "Hub-and-spoke virtual network" (see Hamatchi's documentation) so that I don't have to worry about port forwarding and things of that sort. There's a limit to 5 people that can use the network when using the software for free, but that has been sufficient for my use.
If you're on a Window's machine, you'll then want to go to Tobias Erichsen's website to grab RTPMidi (https://www.tobias-erichsen.de/software/rtpmidi.html ) He has a great step-by-step tutorial on how to set it up. Essentially, you pull the ip address from users (be sure it's their ip address from the VPN) and plug it into RTPMidi as a connection. From there, you can use udpsend/udpreceive in Max to send your midi control data to the other's.
If you're on a Mac, then RTP is built directly into the OS. You can access it through your midi preferences, but I don't know exactly where it lives since I'm on a Windows machine. Perhaps someone else can post that if they know.
I hope this helps!
And for everyone else, I'm writing an external to do what I initially posted about (audio over internet via UDP). I'm trying to use Libuv and it's a bit tricky. If anyone on here has experience doing such things, I would love some help! Otherwise, I'll just keep beating my head against the wall until something sifts out.
Hello again! Time for an update. I'm working on the external and things are coming along well enough. I'm stuck on accessing the signal vector so that I can pass it into a buffer. I've created another topic in the Dev forum. If any of you have experiencing coding externals, PLEASE hop over onto that thread and give any feedback that you might have! It can be found here:
https://cycling74.com/forums/pass-entire-signal-vector-to-buffer-t_signal-what-is-double-**ins-pointing-to
Thanks!