{"id":7251,"date":"2013-09-17T21:43:37","date_gmt":"2013-09-17T21:43:37","guid":{"rendered":"http:\/\/zerokidz.com\/ideas\/?p=7251"},"modified":"2014-06-16T13:52:34","modified_gmt":"2014-06-16T17:52:34","slug":"use-gen-to-build-ios-au-effects","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=7251","title":{"rendered":"Use gen~ to build iOS AU effects"},"content":{"rendered":"<h3>Summary:<\/h3>\n<ol>\n<li>In Max, write a gen~ patch and export as c++ to xcode<\/li>\n<li>Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad<\/li>\n<li>Any app which recognizes Audiobus protocol can find and use your effect.<\/li>\n<\/ol>\n<h3>Details&#8230;<\/h3>\n<p>There are instructions at\u00a0<a href=\"http:\/\/cycling74.com\/wiki\/index.php?title=Gen_Code_Export_iOS\">http:\/\/cycling74.com\/wiki\/index.php?title=Gen_Code_Export_iOS<\/a>\u00a0&#8211; which are expanded upon here.<\/p>\n<h4>Preliminaries to Preliminaries&#8230;<\/h4>\n<ol>\n<li>Download the gen~ tremelo effect patch which runs &#8216;as is&#8217; &#8211; and is set up to work as an AU effect with controls &#8211; from here:\u00a0<a href=\"http:\/\/designingsound.org\/2013\/04\/a-tremolo-au-plugin-with-max\/\">http:\/\/designingsound.org\/2013\/04\/a-tremolo-au-plugin-with-max<\/a>\u00a0&#8211; the download button is near the end of the blog post.<\/li>\n<li>Download the c74 sample project \u00a0<a title=\"iOSGenFilter.zip\" href=\"http:\/\/cycling74.com\/wiki\/images\/a\/a4\/iOSGenFilter.zip\">Media:iOSGenFilter.zip<\/a>\u00a0and copy it somewhere. This will be your project folder.<a title=\"iOSGenFilter.zip\" href=\"http:\/\/cycling74.com\/wiki\/images\/a\/a4\/iOSGenFilter.zip\">\u200e<\/a>\u00a0It contains an xcode project file \u00a0and source code for the audiobus AU wrapper thing.<\/li>\n<\/ol>\n<div>[annotations to c74 wiki notes follow:]<\/div>\n<div><\/div>\n<div>\n<div id=\"mw-content-text\" lang=\"en\" dir=\"ltr\">\n<h4>Preliminaries<\/h4>\n<ul>\n<li>Download the AudioBus SDK\u00a0<a href=\"http:\/\/developer.audiob.us\/\" rel=\"nofollow\">[1]<\/a>\u00a0&#8211; You will need to register as a developer. (alternatively, you can clone the github archive)<\/li>\n<li>Download The Amazing Audio Engine SDK\u00a0<a href=\"http:\/\/theamazingaudioengine.com\/\" rel=\"nofollow\">[2]<\/a>\u00a0(alternatively, you can clone the github archive)<\/li>\n<li>Download the AudioBus iOS app in order to test\u00a0<a href=\"http:\/\/audiob.us\/\" rel=\"nofollow\">[3]<\/a>\u00a0&#8211; It costs $4.99. Install it on your iPad or iPhone\/iPod<\/li>\n<li><del>Obtain a temporary Audiobus API key<\/del> &#8211; You can&#8217;t do this until after you finish step 9 below.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Building an Audiobus iOS project<\/h4>\n<ol>\n<li>Duplicate the provided Xcode project &#8211; (not necessary unless you want to change the project name &#8211; you already copied it into your project folder). If you want to duplicate it &#8211; check out this stackOverflow post:\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/6428247\/duplicating-an-xcode-4-project\">http:\/\/stackoverflow.com\/questions\/6428247\/duplicating-an-xcode-4-project<\/a><\/li>\n<li>Copy The Amazing Audio Engine SDK to the project folder. &#8211; Here are specifics:\n<ol>\n<li>Launch TheAmazingAudioEngine.xcodeproj<\/li>\n<li>In xcode, build it<\/li>\n<li>In &#8216;products&#8217; group \u00a0in xcode navigator, &lt;ctrl&gt;-click on the libTheAmazingAudioEngine.a file and open in finder.<\/li>\n<li>Copy this file into iosGenFilter folder inside your\u00a0project folder<\/li>\n<li>You can close the AmazingAudioEngine project in Xcode now.<\/li>\n<li>Now, in finder, copy the AmazingAudioEngine folder (the one that contains .h and .m files) into the iosGenFilter folder<\/li>\n<\/ol>\n<\/li>\n<li>From Audiobus SDK, copy the Audiobus folder and libAudiobus.a file to the\u00a0\u00a0iosGenFilter folder<\/li>\n<li>Open the tremelo Max patch which you downloaded.<\/li>\n<li>In Max, Send gen~ the exportcode message in order to export the genpatcher as C++ code &#8211; actually do this&#8230;\n<ol>\n<li>Using inspector on the gen~ object Choose the GenFilter folder (inside iosGenFilter folder) to save the exported code to.<\/li>\n<li>Lock patch and click on the exportcode message box to export the code.<\/li>\n<\/ol>\n<\/li>\n<li>Launch GenFilter.xcodeproj in the iosGenFilter folder.<\/li>\n<li>In xcode, Change the namespace used in GenFilter.mm to match that of the exported code\n<ol>\n<li>This means, find the statement near top of file starting with &#8220;using namespace&#8221; and make it look like this: using namespace gen_exported;<\/li>\n<li>(if you get a bunch of errors &#8211; then you need to find out what your exported code is called. It will be the most recent .cpp file in the GenFilter folder.)<\/li>\n<\/ol>\n<\/li>\n<li><del>Copy your Audiobus API key to the appropriate location in AppDelegate.mm<\/del> &#8211; can&#8217;t do this just yet &#8211; so skip.<\/li>\n<li>Connect your iPad to the computer. Build the project for iPad<\/li>\n<li>In &#8216;products&#8217; group \u00a0in xcode navigator, &lt;ctrl&gt;-click on the libThe GenFilter.app file and select &#8216;open in finder&#8217;.\n<ol>\n<li>&lt;ctrl&gt;-click GenFilter.app in finder and select &#8216;open package contents&#8217;. &#8211; leave this finder window open<\/li>\n<li>in a broswer go to\u00a0<a href=\"http:\/\/developer.audiob.us\/temporary-registration\">http:\/\/developer.audiob.us\/temporary-registration<\/a>\u00a0&#8211; you&#8217;ll probably need to login with your user\/password set up earlier.<\/li>\n<li>drag the info.plist file from the finder window (step A) into the dropbox in the browser. \u00a0You should get a screen with your temporary API key. I had to do this twice to get it to work.<\/li>\n<li>Now copy the API key into the AppDelegate.mm file replacing the one in the following statement &#8211; it was around line 50. &#8211; re-build project to make sure you have no errors<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div>\n<pre class=\"brush: cpp; gutter: true\">   \/\/ Create an Audiobus instance\r\n    self.audiobusController = [[[ABAudiobusController alloc] initWithAppLaunchURL:[NSURL URLWithString:@&quot;genfilter.audiobus:\/\/&quot;] apiKey:@&quot;MTM4MDY1ODQzNSoqKkdlbkZpbHRlcioqKmdlbmZpbHRlci5hdWRpb2J1czovLw==:caS8WT1r4OmYz6t89pDq37qNi29hwFba+7+7bP8WubzyKN7Xj+tnU31\/Wcaw580zQg8Jz+vC6Ha0H+qDM9JhdBxfQZ7w\/R0VHrvsbZYQEJkj1bNpg2h2DfsF1mvFr6jb&quot;] autorelease];<\/pre>\n<\/div>\n<div>Now do the following steps (with iPad still connected to your computer)<\/div>\n<div><\/div>\n<\/div>\n<div>\n<ol>\n<li>Launch audiobus on your iPad<\/li>\n<li>click the run button in xcode to launch GenFilter on your iPad<\/li>\n<li>In audiobus, select mic input, headphone output, and GenFilter for effect.<\/li>\n<\/ol>\n<\/div>\n<div id=\"catlinks\"><\/div>\n<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: In Max, write a gen~ patch and export as c++ to xcode Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad Any app which recognizes Audiobus protocol can find and use your effect. Details&#8230; There are instructions at\u00a0http:\/\/cycling74.com\/wiki\/index.php?title=Gen_Code_Export_iOS\u00a0&#8211; which are expanded upon here. Preliminaries to Preliminaries&#8230; Download the gen~ &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=7251\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Use gen~ to build iOS AU effects&#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,28],"tags":[206,344,52,78,345,218,190],"class_list":["post-7251","post","type-post","status-publish","format-standard","hentry","category-development","category-dsp","category-maxmsp","tag-core-audio","tag-dsp","tag-gen","tag-ios","tag-maxmsp","tag-plugins","tag-portfolio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Use gen~ to build iOS AU effects - 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=7251\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Use gen~ to build iOS AU effects - reactive music\" \/>\n<meta property=\"og:description\" content=\"Summary: In Max, write a gen~ patch and export as c++ to xcode Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad Any app which recognizes Audiobus protocol can find and use your effect. Details&#8230; There are instructions at\u00a0http:\/\/cycling74.com\/wiki\/index.php?title=Gen_Code_Export_iOS\u00a0&#8211; which are expanded upon here. Preliminaries to Preliminaries&#8230; Download the gen~ &hellip; Continue reading &quot;Use gen~ to build iOS AU effects&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=7251\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2013-09-17T21:43:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-16T17:52:34+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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"Use gen~ to build iOS AU effects\",\"datePublished\":\"2013-09-17T21:43:37+00:00\",\"dateModified\":\"2014-06-16T17:52:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251\"},\"wordCount\":712,\"keywords\":[\"core audio\",\"DSP\",\"gen\",\"iOS\",\"Max\\\/MSP\",\"plugins\",\"portfolio\"],\"articleSection\":[\"development\",\"DSP\",\"Max\\\/MSP\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251\",\"name\":\"Use gen~ to build iOS AU effects - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"datePublished\":\"2013-09-17T21:43:37+00:00\",\"dateModified\":\"2014-06-16T17:52:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=7251\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=7251#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use gen~ to build iOS AU effects\"}]},{\"@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":"Use gen~ to build iOS AU effects - 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=7251","og_locale":"en_US","og_type":"article","og_title":"Use gen~ to build iOS AU effects - reactive music","og_description":"Summary: In Max, write a gen~ patch and export as c++ to xcode Compile AU effect in xcode (code-signing with Audiobus API key) and launch on iPad Any app which recognizes Audiobus protocol can find and use your effect. Details&#8230; There are instructions at\u00a0http:\/\/cycling74.com\/wiki\/index.php?title=Gen_Code_Export_iOS\u00a0&#8211; which are expanded upon here. Preliminaries to Preliminaries&#8230; Download the gen~ &hellip; Continue reading \"Use gen~ to build iOS AU effects\"","og_url":"https:\/\/reactivemusic.net\/?p=7251","og_site_name":"reactive music","article_published_time":"2013-09-17T21:43:37+00:00","article_modified_time":"2014-06-16T17:52:34+00:00","author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=7251#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=7251"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"Use gen~ to build iOS AU effects","datePublished":"2013-09-17T21:43:37+00:00","dateModified":"2014-06-16T17:52:34+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=7251"},"wordCount":712,"keywords":["core audio","DSP","gen","iOS","Max\/MSP","plugins","portfolio"],"articleSection":["development","DSP","Max\/MSP"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=7251","url":"https:\/\/reactivemusic.net\/?p=7251","name":"Use gen~ to build iOS AU effects - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"datePublished":"2013-09-17T21:43:37+00:00","dateModified":"2014-06-16T17:52:34+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=7251#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=7251"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=7251#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"Use gen~ to build iOS AU effects"}]},{"@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\/7251","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=7251"}],"version-history":[{"count":22,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/7251\/revisions"}],"predecessor-version":[{"id":14265,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/7251\/revisions\/14265"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}