{"id":17857,"date":"2022-08-16T23:56:59","date_gmt":"2022-08-16T21:56:59","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/?p=17857"},"modified":"2024-05-13T12:34:00","modified_gmt":"2024-05-13T10:34:00","slug":"8-1-building-external-ao","status":"publish","type":"post","link":"https:\/\/audioworx.transfunnel.co\/old\/?p=17857","title":{"rendered":"Building External AO"},"content":{"rendered":"<p class=\"heading\"><strong>Prerequisites<\/strong><\/p>\n<p>1. Developer should generate the corresponding libraries before starting the build process execution. Otherwise, there will be errors when executing the batch file <strong>Build.bat<\/strong>:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-17858 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_error_01.png\" alt=\"\" width=\"1114\" height=\"286\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-17859 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_error_02.png\" alt=\"\" width=\"1111\" height=\"286\" \/><\/p>\n<p>For generating xAF libraries:<\/p>\n<pre><strong>python build.py --platform=WinPc --target=Win64 --program=allExtObjects --profile=Release<\/strong><\/pre>\n<p>For generating AWX VirtualAmp:<\/p>\n<pre><strong>python build.py --target=Win64 --program=virtualAmp --profile=Release --group=all<\/strong><\/pre>\n<p>2.\u00a0 Place the the external audio object&#8217;s source code under external\\src\\<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-17872 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_cpp.png\" alt=\"\" width=\"274\" height=\"183\" \/><\/p>\n<p>3. Place the external audio object header file under external\\inc\\ .\u00a0 The header file name should be equal to the external audio object class name. For example, if the audio object name is CTemplate, the header file name should be Template.h.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17873 size-full alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_header-e1660686193942.png\" alt=\"\" width=\"285\" height=\"254\" \/><\/p>\n<p>4.\u00a0 Make sure the external audio object&#8217;s pre-processor macro is defined in file external\\inc\\ExternalObjAudioIds.h. The name should be <strong>OBJ_&#8221;header file name&#8221; <\/strong> and the value should be in the range between 9002 and 9999.<\/p>\n<p>E.g. Audio Object Template ID:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17861 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_ID.png\" alt=\"\" width=\"420\" height=\"118\" \/><\/p>\n<p>5. If additional libraries need to be linked, add them in the file CmakeLists.txt located in:<\/p>\n<p>extendable-audio-framework\\external\\src\\<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17870 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_cmakelists_01.png\" alt=\"\" width=\"560\" height=\"93\" \/><\/p>\n<p class=\"heading\"><strong>Steps for building Audio Object Template<\/strong><\/p>\n<p>1. Open a command prompt window in Admin mode.<\/p>\n<p>2. Execute the batch file Build.bat<\/p>\n<p>3. After the build process is complete, the corresponding VirtualAmpExternal.dll file will be available at the path \\external\\virtualamp\\output\\build_dir_WIN64_Release\\Release.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17864 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_build_02.png\" alt=\"\" width=\"964\" height=\"358\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17865 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_build_03.png\" alt=\"\" width=\"460\" height=\"162\" \/><\/p>\n<p>4. The generated .dll file can be imported as an audio library into GTT to update the toolbox with the newly added audio object(s).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17887 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_GTT_04.png\" alt=\"\" width=\"292\" height=\"340\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17875 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_GTT_03.png\" alt=\"\" width=\"1208\" height=\"495\" \/><\/p>\n<p class=\"note\">If the developer needs to use <strong>debug<\/strong> build mode to make sure everything is working as expected, the file <strong>Build.bat<\/strong> can be modified accordingly by changing -DCMAKE_BUILD_TYPE=&#8221;Release&#8221; to <strong>-DCMAKE_BUILD_TYPE=&#8221;Debug&#8221; <\/strong>and &#8211;config Release to <strong>&#8211;config Debug<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17884 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_01.png\" alt=\"\" width=\"849\" height=\"209\" \/><\/p>\n<p>&nbsp;<\/p>\n<p class=\"note\">To debug the audio object in Visual Studio, the developer has to select the option <strong>Debug-&gt;Attach to Process&#8230;\u00a0<\/strong>Then, select Attach to:\u00a0<strong>Native code.\u00a0<\/strong>Finally, filter out the desired process:<br \/>\n&#8211; Toolbox:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17886 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_03.png\" alt=\"\" width=\"657\" height=\"542\" \/><br \/>\n&#8211; Calc function and tuning:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-17885 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_02.png\" alt=\"\" width=\"658\" height=\"543\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites 1. Developer should generate the corresponding libraries before starting the build process execution. Otherwise, there will be errors when executing the batch file Build.bat: For generating xAF libraries: python build.py &#8211;platform=WinPc &#8211;target=Win64 &#8211;program=allExtObjects &#8211;profile=Release For generating AWX VirtualAmp: python build.py &#8211;target=Win64 &#8211;program=virtualAmp &#8211;profile=Release &#8211;group=all 2.\u00a0 Place the the external audio object&#8217;s source code under [&hellip;]<\/p>\n","protected":false},"author":105,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[]},"categories":[353],"tags":[],"coauthors":[288],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/17857"}],"collection":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/users\/105"}],"replies":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17857"}],"version-history":[{"count":15,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/17857\/revisions"}],"predecessor-version":[{"id":28055,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/17857\/revisions\/28055"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17857"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=17857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}