{"id":4641,"date":"2019-06-17T00:40:38","date_gmt":"2019-06-16T22:40:38","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/index.php\/section\/audioobject-tunextp\/"},"modified":"2024-05-10T13:21:36","modified_gmt":"2024-05-10T11:21:36","slug":"audioobject-tunextp","status":"publish","type":"post","link":"https:\/\/audioworx.transfunnel.co\/old\/?p=4641","title":{"rendered":"TuneXTP"},"content":{"rendered":"<p>This functionality alerts an object when its parameter memory is updated or modified. It provides information on the exact variables that were modified and allows the object to update internal variables accordingly. An example is in a filter block, where a parameter update (for example a gain\/frequency\/q change) triggers the recalculation of the filter coefficients in the tuning code. The API triggered is <strong><em>CAudioObject::tuneXTP()<\/em><\/strong>.<\/p>\n<pre class=\"text\">void CAudioObject::tuneXTP(int subblock, int startMemBytes, int sizeBytes, xBool shouldAttemptRamp)\r\n{\r\n}<\/pre>\n<p>An ID-based memory addressing scheme is used instead of pure memory offsets. The <strong><em>CAudioObject\u2192tuneXTP()<\/em><\/strong> method is called by the framework in <strong><em>CAudioProcessing\u2192setAudioObjectTuning()<\/em><\/strong>.<\/p>\n<p><em><strong>CAudioObject::tuneXTP()<\/strong><\/em> take in three integers representing the:<\/p>\n<ul>\n<li>sub-block: index of the sub-block in the audio object.<\/li>\n<li>startMemBytes: memory offset (in bytes) from the beginning of the sub-block memory.<\/li>\n<li>sizeBytes: number of the parameters tuned (<span class=\"emph\">size in bytes<\/span>).<\/li>\n<li>shouldAttemptRamp: flag to indicate audio object should attempt to ramp the tuning parameters or not.<\/li>\n<\/ul>\n<p>The subblock, startAdr and size are passed into the audio object to enable the calculation of the elements it needs to tune.<\/p>\n<p class=\"note\">The code MUST be written in a manner that allows the tuning of any variable even if the corresponding sub-block is not provided. For example, an object with 2 sub-blocks with 4 variables within each sub-block, the algorithm should be able to support tuning the 5th variable with both commands: tuneXTP(0, 5, 1) AND tuneXTP(1,0,1).<\/p>\n<p class=\"heading\"><strong>Implementation<\/strong><\/p>\n<p>Once triggered, the function\u2019s implementation is heavily dependent on the audio object itself and on the corresponding tuning panel (or Device Description\/ memory layout) that the tuning tool will use to tune the audio object.<\/p>\n<p>The developer needs to take into consideration the following while designing an object:<\/p>\n<ul>\n<li>The set file header size. If an object uses a large number of sub-blocks, each sub-block will require additional header data to store its values in the initial tuning file.<\/li>\n<li>The number of sub-blocks. If there are a lot of sub-blocks, and developers are tuning a big chunk of data, there will be many more xTP messages sent compared to an audio block with fewer sub-blocks.<\/li>\n<li>The calculations required. Having more sub-blocks can reduce the calculations required in the <strong><em>AudioObject::tuneXTP()<\/em><\/strong> functions. The audio object can focus on calculations for a narrower section of audio object memory, which is the sub-block.<\/li>\n<\/ul>\n<p>For example, if a parameter biquad block is being tuned, the index or sub-block ID passed in by the <em>CAudioProcessing<\/em> class could determine:<\/p>\n<ul>\n<li>If a specific channel is being tuned. Once triggered, the function should:\n<ul>\n<li>Recalculate the filter coefficients characterizing all filters of that specific Biquad channel.<\/li>\n<li>Use the memory offset and size variables to recalculate only the filter coefficients whose corresponding parameters were modified.<\/li>\n<\/ul>\n<\/li>\n<li>A specific filter within a specific channel. Once triggered, this will only compute the coefficients of a single filter.<\/li>\n<\/ul>\n<p>The xAF team has implemented the Parameter biquad block with the sub-block definition referring to a channel in the biquad block rather than one specific filter. The xAF also uses memory offset and sub-block to recalculate as few filter coefficients as possible.<\/p>\n<p>Examples of what the tuning methods of each individual Audio Object trigger are listed below:<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 158px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 28px;\">\n<td class=\"table-head\"><strong>Audio Object<\/strong><\/td>\n<td class=\"table-head\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Delay<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the delay time in milliseconds. Each channel may have different delay and update buffers.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Gain<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the gain of each channel.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Parameter Biquad<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the type, frequency, gain, quality of a filter and recalculate filter coefficients for all filters in a channel.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Limiter<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the limit gain, threshold, attach time, release time, hold time and hold threshold.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">LevelMonitor<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the frequency and time weighting of level meter.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This functionality alerts an object when its parameter memory is updated or modified. It provides information on the exact variables that were modified and allows the object to update internal variables accordingly. An example is in a filter block, where a parameter update (for example a gain\/frequency\/q change) triggers the recalculation of the filter coefficients [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","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":"on","ocean_gallery_id":[]},"categories":[353],"tags":[],"coauthors":[165],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4641"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4641"}],"version-history":[{"count":22,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4641\/revisions"}],"predecessor-version":[{"id":28005,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4641\/revisions\/28005"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4641"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=4641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}