How to run the server side (base station) of the remote shortwave radio system.
(Under construction) The patches have not been uploaded to github yet.
Assuming that the radio and antenna system are operating. We are using an internet connected MacBook Pro running OSx 10.9.5, with a MOTU 828 MK3 audio interface.
Install and set up LogMein Hamachi. It is free, for a limited number of computers. Set up a Hamachi server on both the server and client. It should look something like this:
We are using Soundjack VOIP. It is also free. Use the following parameters on the server side.
mic: audio interface channel that is connected to radio audio output
headphone: doesn’t matter
audio block samples: 512
network packet samples 512
UDP/IP: enter hamachi IP of client.
When Soundjack is set up on the client. Press the green start button on the right side of the user list window on the server.
If all goes well, you should hear the radio on the client. Note: The input meter under local settings should be registering audio from your radio. If not, there is a problem with the audio interface.
The Max/MSP server exchanges CAT commands via the server serial port to the radio. The command data is exchanged with a Max patch on the client using OSC (over UDP).
select the radio serial port from the menu (for example: usbmodem 14531)
initialize port settings
set toggle to poll the serial port
At this point you should be able to try the example commands, for instance to get the version or set frequency. If the commands are not working, it indicates a problem with the serial connection to the radio.
Next, check the IP address of the udpsend object. It should be the hamachi IP of the client.
Note: After some experimentation with various audio interfaces and sample rates, I found it difficult to get clear audio on higher sample rates, like 192k and also there doesn’t seem to be any way to adjust the IQ balance.
The first in a series describing a system for internet remote control of a shortwave radio station. Its not something new. There are commercial products that provide remote operation of amateur radio transceivers. The purpose of this project is to make it possible to use shortwave radio sounds in musical performance, without the need of an antenna system.
Max/MSP for USB serial control of radio, OSC remote interface, user interface, Midi device handling, and an SQLITE database of preset frequencies.
Low latency, good quality audio using Soundjack by Alex Carot.
Hardware control of radio using Midi controllers (CDJ-101 and Launchpad)
Bi-directional OSC and VOIP using Logmein Hamachi VPN
Additional hardware control of AC power and antenna selection using Arduino and a WeMo switch.
TouchOSC Ipad audio mixer control using MOTU Cuemix
TeamViewer remote desktop software for logging into to base station compuer
Optional radio user interface control with Ipod TouchOSC, Griffin Powermate dial, and Korg Nano-kontrol.
grig is a graphical rig front end for hamlib by Alex Csete. rpc.rigd is a daemon that allows multiple clients. I was able to get both of them sort of working together (use -m 1901 from grig) but the daemon starts streaming error messages “read_string timeout without reading a character”. Also the latency with grig over the LAN is high. Its possible that there are problems with the rig CAT file. I am using the file for the Tentec Orion – as I haven’t figured out how to add new devices. At any rate, the above methods (UDP or TCP command line) are way more responsive.
Overlapping loops of varying duration to represent natural cycles.
In October I collaborated with Wade Kavanaugh and Stephen P. Nguyen to compose and perform the sounds of a glacier for their installation at the Gem theatre in Bethel, Maine. The glacier was made from paper.
Wade and Stephen:
A time-lapse video of the project:
A time-lapse video of a similar project they did in Minnesota 2005:
The approach was to take a series of ambient loops and organize them by duration. The longer loops would represent the slow movement of time. Shorter loops would represent events like avalanches. One-shot samples would represent quick events, like the cracking of ice.
It took several iterations to produce something slow and boring enough to be convincing. I used samples from the Ron MacLeod’s Cyclic Waves library from Cycling 74 https://www.ableton.com/en/packs/cyclic-waves/. Samples were pitched down to imply largeness.
Each vertical column in an Ableton Live set represents a time-frame of waves. That is, the far left column contains quick events and the far right column contains long cycle events. Left to right, the columns have gradually increasing cycle durations. I used a Push controller to trigger samples in real time as people walked through the theatre to see the glacier.
The theatre speakers were arranged in stereo but from front to back. Since the glacier was also arranged along the same axis, a slow auto-panning effect sent sounds drifting off into the distance, or vice versa. Visually and sonically there was a sense that the space extended beyond the walls of the theatre.
In the “control room” above the theatre… using Push to trigger samples and a Korg NanoKontrol to set panning positions of each track:
The performance lasted about 45 minutes. Occasionally the cracking of ice would startle people in the room. There were kids crawling around underneath the paper glacier. Afterwards we just let the sounds play on their own. A short excerpt:
How to control an amateur radio transceiver over the internet, using Osc (Open Sound Control), VOIP (Voice over Internet Protocol) and VPN (Virtual Private Networks).
What problem does this solve?
Using a shortwave radio receiver in a live performance without installing a large antenna system.
This method gives low-latency real-time access to audio, and radio control using a laptop computer from anywhere. I suppose it could also remote-control a synthesizer, if you’re into that kind of thing.
Modern ham radio receivers can be controlled using serial commands using the CAT (Computer Aided Transceiver) protocol. Usually this is done via a USB port. There are hardware solutions for remote controlling radios over the internet, like RemoteRig http://www.remoterig.com/wp/. But there is also a free, or low cost, solution using software.
The ‘base’ computer is connected to the radio/antenna. The ‘remote’ computer is a laptop that could be anywhere connected by WiFi
For this experiment we used a TenTec Eagle transceiver connected to a MacBook USB port. The audio output of the radio connects to the audio input of the MacBook. The MacBook is directly connected to an internet WiFi router using an ethernet cable.
A mumble client runs on the base computer, https://en.wikipedia.org/wiki/Mumble_(software) and also on the remote laptop. Both clients are connected to a Mumble server (Murmur) at Mumble.com http://www.mumble.com/mumble-download.php. You could also run your own server. I set the audio to the best quality and muted the microphone on the remote laptop. We are only using the laptop as a receiver. For transmitting, you could simply open up another channel on the Murmur server. Mumble has very low latency (compared to Skype) and decent audio quality.
Bi-directional commands using VPN and OSC
CAT commands go in both directions – to and from the radio. For example, you would send a command to the radio to change frequency. The radio would send acknowledgements back to the remote laptop.
This is a problem for networks that use NAT (Network Address Translation) because local IP addresses are private, hidden behind routers. The solution that eventually worked was using a VPN called Hamachi https://secure.logmein.com/products/hamachi/download.aspx on both the remote and base computers. Hamachi servers are setup on both computers and connected to each other. This allows the computers to ‘see’ each other as if they were on a local network.
Max and Osc
Max patches are run on both the base and remote computers. The Max patch on the base computer connects to the radio using the serial object and passes commands back and forth over the internet using udpsend and udpreceive (which use Osc).
The Max patch on the remote MacBook sends and receives commands from the base computer using updsend and udpreceive. With the Hamachi VPN, Osc works just like it does on a LAN (local area network).
Automatic reconfiguration of clients
The main advantage of this system is that when you move the remote MacBook to a new location – for example, a coffee shop with public Wifi – both the Mumble and Hamachi clients automatically reconfigure for the location. So you don’t need to know the actual IP address of your computer in the coffee shop. The reconfiguration usually happens within seconds after the Wifi connection is made.
If you are just working across a LAN, you don’t need a VPN. Osc will run on a local network using private IP’s.
For uni-directional Osc communication from remote to base, in a WAN (wide area network) you can use a static IP address for the target.
Skype is another (free) solution for transmitting VOIP audio. Set the base computer in auto-answer mode and call it from the remote computer. Skype will process the audio more than mumble, with noise gates and such. And the latency is higher. But its very easy to set up.
The next step is to build a remote interface for the radio that uses Midi/Osc controllers, so for example you can turn a dial on the Midi controller to change frequency or filter settings on a base radio.