{"id":17524,"date":"2014-11-11T15:47:57","date_gmt":"2014-11-11T20:47:57","guid":{"rendered":"https:\/\/reactivemusic.net\/?p=17524"},"modified":"2014-11-11T15:55:38","modified_gmt":"2014-11-11T20:55:38","slug":"mbta-bus-data-in-max","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=17524","title":{"rendered":"MBTA bus data in Max"},"content":{"rendered":"<p class=\"lead\">Sonification of Mass Ave buses, from Harvard to Dudley.<\/p>\n<p class=\"lead\"><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-17525\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png\" alt=\"Screen Shot 2014-11-11 at 3.26.16 PM\" width=\"300\" height=\"181\" srcset=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png 300w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-1024x620.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This patch sends requests to the MBTA developer portal to get the current location of buses &#8211; using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more interesting to poll at a slower rate, because the updates don&#8217;t seem that frequent. And buses tend to stop a lot.<\/p>\n<p>MBTA developer portal:\u00a0<a href=\"https:\/\/reactivemusic.net\/?p=17511\">https:\/\/reactivemusic.net\/?p=17511<\/a><\/p>\n<p>Here is the get request URL used in the patch:<\/p>\n<pre>http:\/\/realtime.mbta.com\/developer\/api\/v2\/vehiclesbyroute?api_key=wX9NwuHnZU2ToO7GmGR9uw&amp;route=01&amp;format=json<\/pre>\n<h5>download<\/h5>\n<p><a href=\"https:\/\/github.com\/tkzic\/internet-sensors\">https:\/\/github.com\/tkzic\/internet-sensors<\/a><\/p>\n<p>folder: mbta<\/p>\n<p>patches:<\/p>\n<ul>\n<li>mbta.maxpat<\/li>\n<li>mbta.js<\/li>\n<li>poly-oscillator.maxpat<\/li>\n<\/ul>\n<h5>authentication<\/h5>\n<p>You will not need authentication to run run this patch. It uses the default developer API-key for testing. Please read the terms of service at the MBTA developer portal. Data should not be polled more often than 10 seconds. You can also request your own developer API key from MBTA.<\/p>\n<h5>instructions<\/h5>\n<ul>\n<li>Open mbta.maxpat<\/li>\n<li>Toggle the metro (at the top of the patch) to start polling<\/li>\n<li>Turn on the audio (at the bottom of the patch) and turn up the gain<\/li>\n<\/ul>\n<p>Note: there will be more buses running during rush hours in Boston. \u00a0Try experimenting with the polling rate and ramp length in the poly-oscillator patch. Also, you can experiment with the pitch range.<\/p>\n<p>&nbsp;<\/p>\n<p>data-stream-switch.maxpat<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sonification of Mass Ave buses, from Harvard to Dudley. This patch sends requests to the MBTA developer portal to get the current location of buses &#8211; using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=17524\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MBTA bus data in Max&#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":[21,275],"tags":[161,214,344,12],"class_list":["post-17524","post","type-post","status-publish","format-standard","hentry","category-dsp","category-internet-sensors","tag-api","tag-data-sonification","tag-dsp","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MBTA bus data in Max - 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=17524\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MBTA bus data in Max - reactive music\" \/>\n<meta property=\"og:description\" content=\"Sonification of Mass Ave buses, from Harvard to Dudley. This patch sends requests to the MBTA developer portal to get the current location of buses &#8211; using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more &hellip; Continue reading &quot;MBTA bus data in Max&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=17524\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-11T20:47:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-11T20:55:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png\" \/>\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=17524#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"MBTA bus data in Max\",\"datePublished\":\"2014-11-11T20:47:57+00:00\",\"dateModified\":\"2014-11-11T20:55:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524\"},\"wordCount\":231,\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png\",\"keywords\":[\"API\",\"data sonification\",\"DSP\",\"web development\"],\"articleSection\":[\"DSP\",\"internet-sensors\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524\",\"name\":\"MBTA bus data in Max - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png\",\"datePublished\":\"2014-11-11T20:47:57+00:00\",\"dateModified\":\"2014-11-11T20:55:38+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=17524\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#primaryimage\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/Screen-Shot-2014-11-11-at-3.26.16-PM.png\",\"contentUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/Screen-Shot-2014-11-11-at-3.26.16-PM.png\",\"width\":2146,\"height\":1300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=17524#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MBTA bus data in Max\"}]},{\"@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":"MBTA bus data in Max - 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=17524","og_locale":"en_US","og_type":"article","og_title":"MBTA bus data in Max - reactive music","og_description":"Sonification of Mass Ave buses, from Harvard to Dudley. This patch sends requests to the MBTA developer portal to get the current location of buses &#8211; using the Max js object. Latitude and Longitude data is mapped to oscillator pitch. Data is polled every 10 seconds, but it seems like the results might be more &hellip; Continue reading \"MBTA bus data in Max\"","og_url":"https:\/\/reactivemusic.net\/?p=17524","og_site_name":"reactive music","article_published_time":"2014-11-11T20:47:57+00:00","article_modified_time":"2014-11-11T20:55:38+00:00","og_image":[{"url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png","type":"","width":"","height":""}],"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=17524#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=17524"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"MBTA bus data in Max","datePublished":"2014-11-11T20:47:57+00:00","dateModified":"2014-11-11T20:55:38+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=17524"},"wordCount":231,"image":{"@id":"https:\/\/reactivemusic.net\/?p=17524#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png","keywords":["API","data sonification","DSP","web development"],"articleSection":["DSP","internet-sensors"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=17524","url":"https:\/\/reactivemusic.net\/?p=17524","name":"MBTA bus data in Max - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=17524#primaryimage"},"image":{"@id":"https:\/\/reactivemusic.net\/?p=17524#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM-300x181.png","datePublished":"2014-11-11T20:47:57+00:00","dateModified":"2014-11-11T20:55:38+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=17524#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=17524"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/reactivemusic.net\/?p=17524#primaryimage","url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM.png","contentUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2014\/11\/Screen-Shot-2014-11-11-at-3.26.16-PM.png","width":2146,"height":1300},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=17524#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"MBTA bus data in Max"}]},{"@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\/17524","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=17524"}],"version-history":[{"count":4,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/17524\/revisions"}],"predecessor-version":[{"id":17529,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/17524\/revisions\/17529"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}