{"id":4525,"date":"2019-06-16T20:18:13","date_gmt":"2019-06-16T18:18:13","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/?p=4525"},"modified":"2021-12-15T21:40:47","modified_gmt":"2021-12-15T20:40:47","slug":"master-preset-control-module-configuration","status":"publish","type":"post","link":"https:\/\/audioworx.transfunnel.co\/old\/?p=4525","title":{"rendered":"Master Preset Control Module Configuration"},"content":{"rendered":"<p class=\"text\">The purpose of this module is to facilitate configuring presets for the entire device containing multiple cores\/instances of xAF. Refer to the xAF Specification for more details.<\/p>\n<h4 class=\"text\">Master Preset Control Design<\/h4>\n<p class=\"text\">User can prepare the presets for each signal flow using GTT. Once the presets are prepared, user should prepare slot map which gives information on presets to be recalled for a particular slot. Refer GTT user guide for creating slot map and presets. Each slot can also be configured with fade in, fade out times using which platform can choose to apply Instance mute\/unmute while applying a new slot.<\/p>\n<h4 class=\"text\">Saving the master preset control map file and presets on the target device<\/h4>\n<p class=\"text\">Presets and slot map should be prepared and saved using Global Tuning Tool. Saving them on to the device is currently an offline process. Platform has to supply slot map during initialization of Master preset control Module and saved presets should be accessible by the particular cores where presets are recalled.<\/p>\n<p class=\"text\">Presets can also be saved on the device using the procedure saving\/loading seti files (more in section &#8220;Tuning Sets (SETi) implemented&#8221;).<\/p>\n<h4 class=\"text\">Instantiating the Master Preset Control Module with slot map stored on the device<\/h4>\n<p class=\"text\">To instantiate Master Preset Control Module, platform has to load the slot map prepared\/saved from Global Tuning Tool. Platform can use the <em>DeviceParser<\/em> class, which is included in the interface library to parse the slot map. Below is a brief example on how to load the slot map.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4526\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/019.jpg\" alt=\"\" width=\"748\" height=\"290\" \/><\/p>\n<p class=\"text\">Once <em>m_presetCtrlMap<\/em> is populated with parsed slot map, it can be used to instantiate the master preset control module as shown below.<\/p>\n<p class=\"text\"><em>xAF_Error<\/em><em> err = xAFInitMasterPresetControl(&amp;g_masterPresetControl, m_presetCtrlMap, <\/em><em>&amp;allocateMem);<\/em><\/p>\n<p class=\"text\">After successful instantiation of the master preset control, the default slot gets loaded into the instance(s).<\/p>\n<h4 class=\"text\">Loading A New Slot<\/h4>\n<p class=\"text\">Master preset control module loads default slot during reboot. To load a different slot at runtime, the xTP command 0x64 with function Id 0x02 needs to be sent to the amplifier. Refer to the xTP specification for details on 0x64 command.<\/p>\n<p class=\"text\">This command supports two operations:<\/p>\n<ul>\n<li class=\"text\">\u201cGet Active Slot \u201d via operation Id \u201c0x02\u201d<\/li>\n<\/ul>\n<p class=\"text\">This command retrieves the currently active slot on the device. Platform can call <em>xAFSetActiveSlot()<\/em> to get Active slot<\/p>\n<ul>\n<li class=\"text\">\u201cLoad Slot \u201d via operation Id \u201c0x03\u201d.<\/li>\n<\/ul>\n<p class=\"text\">Load slot command loads the preset as per device id and slot id given in the command.<\/p>\n<p class=\"text\">To load the new slot following steps needs to be performed:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-4527\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/020.jpg\" alt=\"\" width=\"462\" height=\"581\" \/><\/p>\n<p class=\"text\">Detail about the APIs used to load a new slot is as below:<\/p>\n<ul>\n<li class=\"text\">Call <em>xAFGetRampTimes(<\/em><em>xAFMasterPresetControl<\/em><em>* <\/em><em>masterPresetControl<\/em><em>, <\/em><em>float<\/em><em>* <\/em><em>fadeInTime<\/em><em>, <\/em><em>float<\/em><em>* <\/em><em>fadeOutTime<\/em><em>, <\/em><em>unsigned<\/em> <em>int<\/em> <em>slotId<\/em><em>) <\/em>to get the fade in or fade out time<\/li>\n<li class=\"text\">Call <em>xAFGetNumPreset(<\/em><em>xAFMasterPresetControl<\/em><em>* <\/em><em>masterPresetControl<\/em><em>, <\/em><em>unsigned<\/em> <em>int<\/em><em>* <\/em><em>numPreset<\/em><em>, <\/em><em>unsigned<\/em> <em>int<\/em> <em>slotId<\/em><em>)<\/em> to get the number of presets for a particular slot<\/li>\n<li class=\"text\">Call <em>xAFLoadSlot(<\/em><em>xAFMasterPresetControl<\/em><em>* <\/em><em>masterPresetControl<\/em><em>, <\/em><em>xAFPreset<\/em><em>* <\/em><em>presets<\/em><em>, <\/em><em>unsigned<\/em> <em>int<\/em> <em>slotId<\/em><em>)<\/em> API to get a list of presets (contains preset id, core id and instance id) for a particular slot<\/li>\n<li class=\"text\">Call the following framework APIs\u00a0 <em>setInstanceMuteRampUpTime(float val), setInstanceMuteRampDownTime(float val<\/em>) to set the ramp times for performing instance mute operation<\/li>\n<\/ul>\n<p class=\"text\">A new slot is applied in steps of instance mute\/unmute cycle as follows:<\/p>\n<ul>\n<li class=\"text\">Call <em>setInstanceMuteState(<\/em><em>int<\/em> <em>val<\/em><em>)<\/em> API to initiate the instance mute. The response xTP command is sent back as the instance mute is in progress (0x01)<\/li>\n<li class=\"text\">Platform is responsible for polling the status of instance Mute by calling framework function <em>getInstanceMuteRampingState()<\/em><\/li>\n<li class=\"text\">Once Mute is completed platform can apply the preset file using framework API<em> loadSETIDataFromInterface(<\/em><em>IOBase<\/em><em>* <\/em><em>IOInterface<\/em><em>)<\/em><\/li>\n<li class=\"text\">Call <em>setInstanceMuteState(<\/em><em>int<\/em> <em>val<\/em><em>)<\/em> to unmute amplifier<\/li>\n<li class=\"text\">Once un-mute is completed slot is completed and a second response is sent back to<\/li>\n<li class=\"text\">GTT for indicating a successful load(0x00)<\/li>\n<\/ul>\n<h4 class=\"text\">Example Implementation<\/h4>\n<p class=\"text\">In INXS-Release, you can find a reference implementation on the xAF repo in the <em>VirtualAmpEffect<\/em> file at the following location:<\/p>\n<p class=\"text\"><a href=\"https:\/\/bitbucket.harman.com\/projects\/LSACCA\/repos\/extendable-audio-framework\/browse\/private\/utils\/xAFVirtualAmp\/VirtualAmpEffect.cpp?at=refs%2Fheads%2Fmaster\">https:\/\/bitbucket.harman.com\/projects\/LSACCA\/repos\/extendable-audio-framework\/browse\/private\/utils\/xAFVirtualAmp\/VirtualAmpEffect.cpp?at=refs%2Fheads%2Fmaster<\/a><\/p>\n<p class=\"text\"><a href=\"https:\/\/bitbucket.harman.com\/projects\/LSACCA\/repos\/extendable-audio-framework\/browse\/private\/src\/framework\/core\/MasterControl.c?at=refs%2Fheads%2Fmaster\">https:\/\/bitbucket.harman.com\/projects\/LSACCA\/repos\/extendable-audio-framework\/browse\/private\/src\/framework\/core\/MasterControl.c?at=refs%2Fheads%2Fmaster<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of this module is to facilitate configuring presets for the entire device containing multiple cores\/instances of xAF. Refer to the xAF Specification for more details. Master Preset Control Design User can prepare the presets for each signal flow using GTT. Once the presets are prepared, user should prepare slot map which gives information [&hellip;]<\/p>\n","protected":false},"author":1,"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":"","ocean_second_sidebar":"","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":"","ocean_custom_header_template":"","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":"","ocean_menu_typo_font_family":"","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":"","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":[54,10],"tags":[],"coauthors":[165],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4525"}],"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=4525"}],"version-history":[{"count":2,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4525\/revisions"}],"predecessor-version":[{"id":14372,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4525\/revisions\/14372"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4525"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=4525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}