{"id":6341,"date":"2025-09-21T22:04:49","date_gmt":"2025-09-21T13:04:49","guid":{"rendered":"https:\/\/blog.criware.com\/?p=6341"},"modified":"2025-09-21T22:05:26","modified_gmt":"2025-09-21T13:05:26","slug":"making-music-react-to-gameplay-part-2","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2025\/09\/21\/making-music-react-to-gameplay-part-2\/","title":{"rendered":"Making Music React to Gameplay [Part 2]"},"content":{"rendered":"<p>In the <a href=\"https:\/\/blog.criware.com\/index.php\/2025\/09\/20\/making-music-react-to-gameplay-part-1\/\">previous post<\/a>, we prepared an ADX Cue Sheet containing a main music Cue, as well as Cues for extra musical phrases and kicks that can be added on top of it. We set up Actions and Game Variables to start these extra sounds based on the situation in the game, and in sync with the background music. In this post, we will import the data authored in AtomCraft into Unreal Engine and implement it in the game with a Blueprint.<\/p>\n<h5>Importing the Cue Sheet<\/h5>\n<p>To add the binary Cue Sheet to your game project, import the .acb and .acf files that were built into the content drawer (content browser).<\/p>\n<p>The .acf file contains all the Atom Craft project information. When importing, you will be asked if you want to update the Atom plug-in with the Atom Configuration contained in this file; press \u201cYes\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE1.png\" alt=\"\" width=\"443\" height=\"147\" class=\"alignnone size-full wp-image-6344\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE1.png 443w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE1-300x100.png 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/p>\n<p>The assets will be created.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE2.png\" alt=\"\" width=\"768\" height=\"266\" class=\"alignnone size-full wp-image-6345\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE2.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE2-300x104.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>If you open the Cue Sheet and try playing <strong>Cue_BGM<\/strong>, you can verify that all the settings from Atom Craft have been carried over, such as other Cues being triggered at the timing set in the Action Track.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE3.png\" alt=\"\" width=\"1161\" height=\"734\" class=\"alignnone size-full wp-image-6346\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE3.png 1161w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE3-300x190.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE3-1024x647.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE3-768x486.png 768w\" sizes=\"auto, (max-width: 1161px) 100vw, 1161px\" \/><\/p>\n<h5>Playing the BGM<\/h5>\n<p>However, what we want to do is to play the BGM from the Level\u2019s Blueprint.<br \/>\nFirst, open the editor via \u201c<strong>Open Level Blueprint<\/strong>\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE4.png\" alt=\"\" width=\"843\" height=\"381\" class=\"alignnone size-full wp-image-6347\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE4.png 843w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE4-300x136.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE4-768x347.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/p>\n<p>Then, place a <strong>Spawn Sound 2D<\/strong> node.<br \/>\nBe sure to select this node from the <strong>Atom<\/strong> category, and not the one under the <strong>Audio<\/strong> category, as it is UE\u2019s default, and it would not be able to play Atom cues.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE5.png\" alt=\"\" width=\"889\" height=\"565\" class=\"alignnone size-full wp-image-6348\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE5.png 889w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE5-300x191.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE5-768x488.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE6.png\" alt=\"\" width=\"845\" height=\"361\" class=\"alignnone size-full wp-image-6349\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE6.png 845w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE6-300x128.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE6-768x328.png 768w\" sizes=\"auto, (max-width: 845px) 100vw, 845px\" \/><\/p>\n<p>If you start the game, the BGM will now play just like it did in AtomCraft\u2019s preview mode, and the secondary sounds triggered by Actions will also play correctly.<\/p>\n<h5>Selecting Sounds with Game Variables<\/h5>\n<p>Finally, let\u2019s change the Game Variable and confirm that the sound changes.<br \/>\n\u2022\tAfter we start the playback by pressing the \u201c1\u201d key, we use a <strong>Set Atom Game Variable<\/strong> node to set the variable to 0.0.<br \/>\n\u2022\tWhen we press the \u201c2\u201d key, we do the same but set the variable to 1.0.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7.png\" alt=\"\" width=\"1092\" height=\"606\" class=\"alignnone size-full wp-image-6350\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7.png 1092w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7-300x166.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7-1024x568.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7-768x426.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE7-800x445.png 800w\" sizes=\"auto, (max-width: 1092px) 100vw, 1092px\" \/><\/p>\n<p>This way, pressing 1 or 2 will trigger a different sound variation.<\/p>\n<h5>Stopping the current BGM<\/h5>\n<p>If you press the keys several times, you will notice that, right now, pressing a key triggers a new sound on top of the old one.<br \/>\nLet\u2019s add a way to stop the current sound before starting a new playback.<\/p>\n<p>First, Right-click the blue output pin of the <strong>Spawn Sound 2D<\/strong> node and select <strong>Promote to Variable<\/strong>.<br \/>\nThis turns the Atom cue (technically, the Atom Component) into a variable.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE8.png\" alt=\"\" width=\"1011\" height=\"333\" class=\"alignnone size-full wp-image-6351\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE8.png 1011w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE8-300x99.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE8-768x253.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/p>\n<p>A <strong>Set<\/strong> node will be created. Place it after the <strong>Spawn Sound 2D<\/strong> node.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE9.png\" alt=\"\" width=\"948\" height=\"318\" class=\"alignnone size-full wp-image-6352\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE9.png 948w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE9-300x101.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE9-768x258.png 768w\" sizes=\"auto, (max-width: 948px) 100vw, 948px\" \/><\/p>\n<p>Now, when playback starts, if there is already a sound playing, it will be removed (<strong>DestroyComponent<\/strong>) before starting a new playback.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE10.png\" alt=\"\" width=\"1400\" height=\"330\" class=\"alignnone size-full wp-image-6353\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE10.png 1400w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE10-300x71.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE10-1024x241.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE10-768x181.png 768w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p>You can see the entire setup below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE11.png\" alt=\"\" width=\"1400\" height=\"590\" class=\"alignnone size-full wp-image-6354\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE11.png 1400w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE11-300x126.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE11-1024x432.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/09\/UE11-768x324.png 768w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p>With this Blueprint, you will not have to restart the game every time to test playback.<\/p>\n<p>This was just a simple example: <strong>ADX\u2019s Actions<\/strong> can do a lot more than just trigger playback; they can also change sound parameters or branch between sounds in different ways. Because the properties of the triggered tracks are also inherited, this becomes a powerful tool for creative audio implementations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous post, we prepared an ADX Cue Sheet containing a main music Cue, as well as Cues for<\/p>\n","protected":false},"author":2,"featured_media":6343,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5,7,22],"tags":[],"class_list":["post-6341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adx","category-tutorials","category-unreal-engine"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/comments?post=6341"}],"version-history":[{"count":4,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6341\/revisions"}],"predecessor-version":[{"id":6357,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/6341\/revisions\/6357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/6343"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=6341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=6341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=6341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}