{"id":6193,"date":"2013-03-19T23:32:38","date_gmt":"2013-03-19T23:32:38","guid":{"rendered":"http:\/\/zerokidz.com\/ideas\/?p=6193"},"modified":"2014-05-18T03:38:29","modified_gmt":"2014-05-18T07:38:29","slug":"web-audio-playground-max-osc-and-websockets","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=6193","title":{"rendered":"Web Audio Playground Max, Osc, and WebSockets"},"content":{"rendered":"<p><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6194\" title=\"Screen Shot 2013-03-19 at 7.30.18 PM\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png\" alt=\"\" width=\"300\" height=\"168\" srcset=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png 300w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-1024x576.png 1024w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-500x281.png 500w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM.png 1175w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>updated 5\/17\/2014<\/p>\n<h3>overview<\/h3>\n<p>This fork adds the following features to\u00a0Chris Wilson&#8217;s Web Audio Playground:<\/p>\n<ul>\n<li>basic patch load\/save capability<\/li>\n<li>clipboard copy\/paste to get patches in and out of browser<\/li>\n<li>OSC control of all parameters using web sockets and a ruby server.<\/li>\n<\/ul>\n<p>Try it out at:\u00a0<a href=\"http:zerokidz.com\/wap\/index.html\">http:zerokidz.com\/wap\/index.html<\/a><\/p>\n<p>For optimum results try Chrome on Mac OS. But it does work in other browsers.<\/p>\n<p>Patch file format is JSON. Patches are reloaded by firing gesture events which created them.<\/p>\n<h3>download<\/h3>\n<p>Source code:\u00a0<a href=\"https:\/\/github.com\/tkzic\/WebAudio\">https:\/\/github.com\/tkzic\/WebAudio<\/a><\/p>\n<h4>files<\/h4>\n<p>sub-folder: osctest<\/p>\n<p><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-11-22-at-2.10.20-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8058\" title=\"Screen Shot 2013-11-22 at 2.10.20 AM\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-11-22-at-2.10.20-AM.png\" alt=\"\" width=\"206\" height=\"158\" \/><\/a><\/p>\n<h4>Instructions for Osc, Websockets Max\/MSP example<\/h4>\n<p><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2014-05-18-at-3.03.27-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-11560\" title=\"Screen Shot 2014-05-18 at 3.03.27 AM\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2014-05-18-at-3.03.27-AM-300x173.png\" alt=\"\" width=\"300\" height=\"173\" srcset=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2014-05-18-at-3.03.27-AM-300x173.png 300w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2014-05-18-at-3.03.27-AM-1024x593.png 1024w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2014-05-18-at-3.03.27-AM.png 1188w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Note: You can either run a local web server, using nodeserver.js and index.html &#8211; in the WebAudio folder &#8211; or use the online version of WAP as described here.<\/p>\n<p>1.\u00a0 Load WAP in a Google Chrome browser using the following URL: <a href=\"http:zerokidz.com\/wap\/index.html\">http:zerokidz.com\/wap\/index.html<\/a><\/p>\n<p>2. In WAP, load a patch called: delay-thing.<\/p>\n<p>Note: If the patch doesn&#8217;t exist you can paste it in by opening the file osctest\/delay-thing.json in a text editor and copying the text. Then click paste in WAP and paste in the text. Then make sure to save it in WAP by typing in the name &#8220;delay-thing&#8221; and clicking the save-as: button<\/p>\n<p>3. In a terminal window, go to the osctest\/ folder and start the server by typing:<\/p>\n<div class=\"panel\">\n<p>ruby .\/wapOSCserver.rb<\/p>\n<\/div>\n<p>4. In WAP, Press the OSC button &#8211; the ruby server should acknowledge with the message: &#8220;WebSocket connection open&#8221;<\/p>\n<p>5. Open the Max patch: wapOSCtester.maxpat<\/p>\n<p>6. In WAP press the play button on the Oscillator module (you should hear sounds)<\/p>\n<p>7. In the Max patch drag the slider on the left to control the oscillator pitch. You should hear the sound change and see the sliders move in WAP.<\/p>\n<h4>Notes on Web Sockets connection:<\/h4>\n<p>The html side of the connection is done in js\/socketsOSC.js<\/p>\n<p>look at the function: connectOSC() &#8211; which gets triggered by the OSC button in index.html<\/p>\n<p>Incoming messages from Max (via Ruby server) are parsed in parseOSCMessage() which figures out how to set appropriate values for the audio objects in the DOM.<\/p>\n<p>There are currently no acknowledgement or error messages being returned (at least I don&#8217;t remember doing this)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>updated 5\/17\/2014 overview This fork adds the following features to\u00a0Chris Wilson&#8217;s Web Audio Playground: basic patch load\/save capability clipboard copy\/paste to get patches in and out of browser OSC control of all parameters using web sockets and a ruby server. Try it out at:\u00a0http:zerokidz.com\/wap\/index.html For optimum results try Chrome on Mac OS. But it does &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=6193\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Web Audio Playground Max, Osc, and WebSockets&#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,21,143],"tags":[161,58,11,6,190,164],"class_list":["post-6193","post","type-post","status-publish","format-standard","hentry","category-development","category-dsp","category-interactive-media-art","tag-api","tag-audio","tag-electronic-music","tag-interactive-media","tag-portfolio","tag-web-audio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Web Audio Playground Max, Osc, and WebSockets - 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=6193\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Web Audio Playground Max, Osc, and WebSockets - reactive music\" \/>\n<meta property=\"og:description\" content=\"updated 5\/17\/2014 overview This fork adds the following features to\u00a0Chris Wilson&#8217;s Web Audio Playground: basic patch load\/save capability clipboard copy\/paste to get patches in and out of browser OSC control of all parameters using web sockets and a ruby server. Try it out at:\u00a0http:zerokidz.com\/wap\/index.html For optimum results try Chrome on Mac OS. But it does &hellip; Continue reading &quot;Web Audio Playground Max, Osc, and WebSockets&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=6193\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2013-03-19T23:32:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-05-18T07:38:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"Web Audio Playground Max, Osc, and WebSockets\",\"datePublished\":\"2013-03-19T23:32:38+00:00\",\"dateModified\":\"2014-05-18T07:38:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193\"},\"wordCount\":380,\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2013\\\/03\\\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png\",\"keywords\":[\"API\",\"audio\",\"electronic music\",\"interactive media\",\"portfolio\",\"web audio\"],\"articleSection\":[\"development\",\"DSP\",\"interactive media art\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193\",\"name\":\"Web Audio Playground Max, Osc, and WebSockets - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2013\\\/03\\\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png\",\"datePublished\":\"2013-03-19T23:32:38+00:00\",\"dateModified\":\"2014-05-18T07:38:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=6193\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#primaryimage\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2013\\\/03\\\/Screen-Shot-2013-03-19-at-7.30.18-PM.png\",\"contentUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2013\\\/03\\\/Screen-Shot-2013-03-19-at-7.30.18-PM.png\",\"width\":\"1175\",\"height\":\"661\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=6193#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Audio Playground Max, Osc, and WebSockets\"}]},{\"@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":"Web Audio Playground Max, Osc, and WebSockets - 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=6193","og_locale":"en_US","og_type":"article","og_title":"Web Audio Playground Max, Osc, and WebSockets - reactive music","og_description":"updated 5\/17\/2014 overview This fork adds the following features to\u00a0Chris Wilson&#8217;s Web Audio Playground: basic patch load\/save capability clipboard copy\/paste to get patches in and out of browser OSC control of all parameters using web sockets and a ruby server. Try it out at:\u00a0http:zerokidz.com\/wap\/index.html For optimum results try Chrome on Mac OS. But it does &hellip; Continue reading \"Web Audio Playground Max, Osc, and WebSockets\"","og_url":"https:\/\/reactivemusic.net\/?p=6193","og_site_name":"reactive music","article_published_time":"2013-03-19T23:32:38+00:00","article_modified_time":"2014-05-18T07:38:29+00:00","og_image":[{"url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png","type":"","width":"","height":""}],"author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=6193#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=6193"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"Web Audio Playground Max, Osc, and WebSockets","datePublished":"2013-03-19T23:32:38+00:00","dateModified":"2014-05-18T07:38:29+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=6193"},"wordCount":380,"image":{"@id":"https:\/\/reactivemusic.net\/?p=6193#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png","keywords":["API","audio","electronic music","interactive media","portfolio","web audio"],"articleSection":["development","DSP","interactive media art"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=6193","url":"https:\/\/reactivemusic.net\/?p=6193","name":"Web Audio Playground Max, Osc, and WebSockets - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=6193#primaryimage"},"image":{"@id":"https:\/\/reactivemusic.net\/?p=6193#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM-300x168.png","datePublished":"2013-03-19T23:32:38+00:00","dateModified":"2014-05-18T07:38:29+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=6193#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=6193"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/reactivemusic.net\/?p=6193#primaryimage","url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM.png","contentUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2013\/03\/Screen-Shot-2013-03-19-at-7.30.18-PM.png","width":"1175","height":"661"},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=6193#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"Web Audio Playground Max, Osc, and WebSockets"}]},{"@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\/6193","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=6193"}],"version-history":[{"count":24,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/6193\/revisions"}],"predecessor-version":[{"id":11568,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/6193\/revisions\/11568"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}