{"id":20969,"date":"2024-04-04T16:50:57","date_gmt":"2024-04-04T20:50:57","guid":{"rendered":"https:\/\/reactivemusic.net\/?p=20969"},"modified":"2024-04-04T16:50:57","modified_gmt":"2024-04-04T20:50:57","slug":"using-hamlib-to-poll-frequency-data-with-max-msp","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=20969","title":{"rendered":"Using hamlib to poll frequency data with Max\/MSP"},"content":{"rendered":"<p><iframe loading=\"lazy\" title=\"Connecting radios to Max\/MSP using hamlib\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/eB2UsW8zAnc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><span class=\"yt-core-attributed-string--link-inherit-color\">This Max patch connects to a radio transceiver and reads the frequency data using hamlib. Hamlib provides a common API for amateur radio devices. <\/span><span class=\"yt-core-attributed-string--link-inherit-color\">https:\/\/hamlib.github.io\/<\/span><span class=\"yt-core-attributed-string--link-inherit-color\">. The hamllib server runs in the background using TCP\/IP. This patch uses Jeremy Bernstein&#8217;s shell object. <\/span><span class=\"yt-core-attributed-string--link-inherit-color\">https:\/\/github.com\/jeremybernstein\/shell<\/span><span class=\"yt-core-attributed-string--link-inherit-color\"> and the Sadam Library of externals, installed with the Max package manager.<\/span><\/p>\n<h3>Files<\/h3>\n<p>hamlibtcptest1.maxpat : select radio, starts rigcltd dameon, poll frequency via tcp\/ip<\/p>\n<p>launch-rigctld.sh : shell script to run rigctld<\/p>\n<h3>Libraries<\/h3>\n<p>Max: Jeremy Bernstein&#8217;s shell external, and the sadam library from Max package manager.<\/p>\n<p>hamlib can be installed using homebrew<\/p>\n<h3>Notes<\/h3>\n<p>There is some latency when using the Elecraft K4. Need to look into the internal CAT settings.<\/p>\n<p>Also, look into communication latency of TCP\/IP and associated libraries.<\/p>\n<p>I&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s shell object. https:\/\/github.com\/jeremybernstein\/shell and the Sadam Library of externals, installed with the Max package manager. Files &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=20969\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using hamlib to poll frequency data with Max\/MSP&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[230,28,332],"tags":[46,345,25,243],"class_list":["post-20969","post","type-post","status-publish","format-standard","hentry","category-development","category-maxmsp","category-radio-2","tag-connections","tag-maxmsp","tag-programming","tag-software-defined-radio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using hamlib to poll frequency data with Max\/MSP - reactive music<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/reactivemusic.net\/?p=20969\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using hamlib to poll frequency data with Max\/MSP - reactive music\" \/>\n<meta property=\"og:description\" content=\"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&#8217;s shell object. https:\/\/github.com\/jeremybernstein\/shell and the Sadam Library of externals, installed with the Max package manager. Files &hellip; Continue reading &quot;Using hamlib to poll frequency data with Max\/MSP&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=20969\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-04T20:50:57+00:00\" \/>\n<meta name=\"author\" content=\"Tom Zicarelli\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tom Zicarelli\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"Using hamlib to poll frequency data with Max\\\/MSP\",\"datePublished\":\"2024-04-04T20:50:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969\"},\"wordCount\":195,\"keywords\":[\"connections\",\"Max\\\/MSP\",\"programming\",\"software defined radio\"],\"articleSection\":[\"development\",\"Max\\\/MSP\",\"Radio\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969\",\"name\":\"Using hamlib to poll frequency data with Max\\\/MSP - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"datePublished\":\"2024-04-04T20:50:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=20969\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20969#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using hamlib to poll frequency data with Max\\\/MSP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/\",\"name\":\"reactive music\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/reactivemusic.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\",\"name\":\"Tom Zicarelli\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"caption\":\"Tom Zicarelli\"},\"sameAs\":[\"http:\\\/\\\/tomzicarelli.com\"],\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using hamlib to poll frequency data with Max\/MSP - reactive music","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/reactivemusic.net\/?p=20969","og_locale":"en_US","og_type":"article","og_title":"Using hamlib to poll frequency data with Max\/MSP - reactive music","og_description":"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&#8217;s shell object. https:\/\/github.com\/jeremybernstein\/shell and the Sadam Library of externals, installed with the Max package manager. Files &hellip; Continue reading \"Using hamlib to poll frequency data with Max\/MSP\"","og_url":"https:\/\/reactivemusic.net\/?p=20969","og_site_name":"reactive music","article_published_time":"2024-04-04T20:50:57+00:00","author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=20969#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=20969"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"Using hamlib to poll frequency data with Max\/MSP","datePublished":"2024-04-04T20:50:57+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=20969"},"wordCount":195,"keywords":["connections","Max\/MSP","programming","software defined radio"],"articleSection":["development","Max\/MSP","Radio"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=20969","url":"https:\/\/reactivemusic.net\/?p=20969","name":"Using hamlib to poll frequency data with Max\/MSP - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"datePublished":"2024-04-04T20:50:57+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=20969#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=20969"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=20969#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"Using hamlib to poll frequency data with Max\/MSP"}]},{"@type":"WebSite","@id":"https:\/\/reactivemusic.net\/#website","url":"https:\/\/reactivemusic.net\/","name":"reactive music","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/reactivemusic.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571","name":"Tom Zicarelli","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","caption":"Tom Zicarelli"},"sameAs":["http:\/\/tomzicarelli.com"],"url":"https:\/\/reactivemusic.net\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/20969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20969"}],"version-history":[{"count":1,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/20969\/revisions"}],"predecessor-version":[{"id":20970,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/20969\/revisions\/20970"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}