This Max patch connects to a radio transceiver and reads the frequency data using hamlib. Hamlib provides a common API for amateur radio devices. https://hamlib.github.io/. The hamllib server runs in the background using TCP/IP. This patch uses Jeremy Bernstein’s shell object. https://github.com/jeremybernstein/shell and the Sadam Library of externals, installed with the Max package manager.
Files
hamlibtcptest1.maxpat : select radio, starts rigcltd dameon, poll frequency via tcp/ip
launch-rigctld.sh : shell script to run rigctld
Libraries
Max: Jeremy Bernstein’s shell external, and the sadam library from Max package manager.
hamlib can be installed using homebrew
Notes
There is some latency when using the Elecraft K4. Need to look into the internal CAT settings.
Also, look into communication latency of TCP/IP and associated libraries.
I’m exploring a version of this that uses node.js instead of the shell external and tcp/ip library in Max. Initial problem is that the rigctld daemon stays active after Max is closed and needs to get killed manually.