{"id":5095,"date":"2024-08-03T12:34:17","date_gmt":"2024-08-03T03:34:17","guid":{"rendered":"https:\/\/blog.criware.com\/?p=5095"},"modified":"2024-08-14T10:58:02","modified_gmt":"2024-08-14T01:58:02","slug":"adx-beginners-guide-13-interactive-music-with-block-playback","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2024\/08\/03\/adx-beginners-guide-13-interactive-music-with-block-playback\/","title":{"rendered":"ADX Beginner\u2019s Guide #13 \u2013 Interactive Music with  Block Playback"},"content":{"rendered":"<p>After learning how to implement <a href=\"https:\/\/blog.criware.com\/index.php\/2024\/07\/08\/adx-beginners-guide-12-interactive-music-with-aisac-and-selectors\/\">interactive music with ADX<\/a> by using AISACs and Selectors, we will this time examine another related feature: Block Playback.<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">What is Block Playback?<\/h1>\n<p>It is possible to arrange the sequence of a Cue into several sections called Blocks. The order and conditions in which these Blocks are played back can be predetermined, randomized, and\/or triggered by in-game events. Unlike a regular Cue, the sequence can be completely non-linear. Although this can be used for any type of audio assets (e.g. dynamic dialog), it is especially useful when implementing interactive music.<br \/>\nFor example, you can create a Cue where each Block corresponds to a specific section of a song: introduction, verse, chorus, break, and conclusion. Because Block Playback allows you to specify what transitions are possible between the blocks, you can easily configure the verses to play in random order, to always play a break after a chorus, or to have an in-game event trigger the conclusion of the song (or any other block), etc.<\/p>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/01-BlockPlayback-diagram.png\" alt=\"01 BlockPlayback diagram\" width=\"653\" height=\"222\" class=\"alignnone size-full wp-image-5102\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/01-BlockPlayback-diagram.png 653w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/01-BlockPlayback-diagram-300x102.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/p>\n<p>The goal is to create a relatively coherent structure for the music while allowing it to adapt to game states and keeping it from becoming too repetitive.<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">How to use Block Playback?<\/h1>\n<p>As the Blocks divide a Cue sequence into vertical sections, they are especially useful with <strong>Polyphonic Cue<\/strong><strong>s. <\/strong>Whenever a Block is played back, all the Waveform Regions it contains (on any of its Track) will be played. Objects outside the Block will not be played, so you have to make sure that the length of the Block matches that of your assets. The order of the Blocks can be changed on the Timeline, and all objects within a Block will also be moved. In order to easily organize the structure of the song, you can switch the <strong>TimeBase<\/strong> to <em>Bar\/Beat<\/em>, as explained in <a href=\"https:\/\/blog.criware.com\/index.php\/2024\/07\/08\/adx-beginners-guide-12-interactive-music-with-aisac-and-selectors\/\">the previous post<\/a>.<\/p>\n<p>Of course, to take full advantage of Block Playback, you should design your music assets as short phrases or segments. Then you can build the Cue to your liking. If your memory budget allows it, you can create a full multi-track song with one instrument per track. If it does not, keep your track count to a minimum by premixing each segment of the song.<\/p>\n<p>To add Blocks to a Cue:<\/p>\n<ul>\n<li>Create as many Tracks as you need.<\/li>\n<li>Then, right-click on the Cue and select <em>Create Block<\/em>.<\/li>\n<li>Adjust the size of the Block to match your assets and create other Blocks. They will be added one after another.<\/li>\n<li>Now you can drag and drop the Materials on the tracks and into each Block. Remember that the Waveforms Regions will be limited by the size of the Blocks.<\/li>\n<li>By default, Blocks are configured to jump to the next one when they end. So if you have created two Blocks, Block 2 will start playing when Block 1 ends. Then, the Cue will stop once Block 2 has finished playing because there are no more Blocks.<\/li>\n<\/ul>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/02-Create-Blocks.png\" alt=\"02 Create Blocks\" width=\"1238\" height=\"439\" class=\"alignnone size-full wp-image-5103\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/02-Create-Blocks.png 1238w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/02-Create-Blocks-300x106.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/02-Create-Blocks-768x272.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/02-Create-Blocks-1024x363.png 1024w\" sizes=\"auto, (max-width: 1238px) 100vw, 1238px\" \/>\n<\/p>\n<p>Some properties of Block 2 will need to be changed to avoid this and get continuous music playback:<\/p>\n<ul>\n<li>One solution is to change the <em>Block Playback Loop Number<\/em> to -1 so that Block 2 loops indefinitely.<\/li>\n<li>If you need something less repetitive, you can also change the <em>Block Transition Destination Type<\/em> to <em>Specify Block Transition Destinations<\/em> instead of <em>Next Block<\/em>.<\/li>\n<li>From there you will be able to set Block 1 as the <em>Block Transition Destination<\/em>.<\/li>\n<\/ul>\n<p>At the end of Block 2, the playback will now jump back to Block 1.<\/p>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/03-Specify-Block-Transition.png\" alt=\"03 Specify Block Transition\" width=\"1215\" height=\"591\" class=\"alignnone size-full wp-image-5104\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/03-Specify-Block-Transition.png 1215w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/03-Specify-Block-Transition-300x146.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/03-Specify-Block-Transition-768x374.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/03-Specify-Block-Transition-1024x498.png 1024w\" sizes=\"auto, (max-width: 1215px) 100vw, 1215px\" \/>\n<\/p>\n<p>&nbsp;<\/p>\n<p>If you add two more Blocks to your Cue, you will be able to create more interesting playback options. For instance, you could decide that at the end of Block 2, the playback will jump randomly to either Block 1, 3, or 4, creating a less repetitive song.<\/p>\n<ul>\n<li>Select Block 2.<\/li>\n<li>Then, change the <em>Specification Type<\/em> property to <em>Random<\/em>. <em>Specification Type<\/em> can be set to <em>Sequential<\/em>, <em>Random<\/em>, <em>Random No Repeat<\/em>, or <em>Shuffle<\/em>.<\/li>\n<li>Click the <em>Add<\/em> button to add Blocks 3 and 4 to the list of destinations.<\/li>\n<li>You can adjust the weight of each Block for the randomization.<\/li>\n<\/ul>\n<p>Now, at the end of Block 2, the Cue will jump to Block 1, 3, or 4, making the song structure less predictable.<\/p>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/04-Random-Block-Transition.png\" alt=\"04 Random Block Transition\" width=\"1354\" height=\"662\" class=\"alignnone size-full wp-image-5107\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/04-Random-Block-Transition.png 1354w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/04-Random-Block-Transition-300x147.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/04-Random-Block-Transition-768x375.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/04-Random-Block-Transition-1024x501.png 1024w\" sizes=\"auto, (max-width: 1354px) 100vw, 1354px\" \/>\n<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Transition triggered by game events<\/h1>\n<p>If ADX receives an event from the game to switch to a specific Block, it will override the destination of the currently playing Block. But, it will still respect the <em>Block Transition Timing<\/em> which is set to <em>Block End<\/em> by default, meaning that the transition will occur at the end of the Block.<\/p>\n<p>However, when using a game state to switch to another part of a song, the goal is often to transition relatively quickly, so this could be an issue, especially if your Blocks are long. By setting the <em>Block Transition Timing <\/em>property to <em>Division<\/em>, the Block will be divided into several sub-sections whose boundaries can be used as transition points. Since these are divisions of the initial block length, you can still make clean transitions, but with more granularity: in the next two bars, the next bar, the next beat, etc.<\/p>\n<p>Note that if the transition points do not need to occur in sync with the musical structure, the <em>Block Transition Timing<\/em> property can be set to <em>Im<\/em><em>mediate<\/em>.<\/p>\n<p>In Atom Craft, you can simulate transitions triggered by the game by clicking on the Blocks while the Cue plays.<\/p>\n<p>For instance, we can configure Block 3 so that it can reply to a transition triggered by the game every two bars:<\/p>\n<ul>\n<li>Select Block 3.<\/li>\n<li>Change <em>Block Transition Timing<\/em> to <em>Division<\/em>.<\/li>\n<li>Since our Blocks have a length of 8 bars, we set the <em>Block Number of Divisions<\/em> property to 4.<\/li>\n<li>The Block is now divided in 4 parts.<\/li>\n<\/ul>\n<p>Now, when Block 3 is being played, if ADX receives an event from the game to play Block 4, the transition will occur when the playback reaches the next division.<\/p>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/05-Block-Division.png\" alt=\"05 Block Division\" width=\"1369\" height=\"441\" class=\"alignnone size-full wp-image-5108\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/05-Block-Division.png 1369w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/05-Block-Division-300x97.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/05-Block-Division-768x247.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/05-Block-Division-1024x330.png 1024w\" sizes=\"auto, (max-width: 1369px) 100vw, 1369px\" \/>\n<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Transition stingers<\/h1>\n<p>Even with a comprehensive interactive music system using Blocks to cover all possible game states, you may find sometimes that the transitions between Blocks can be too abrupt.<\/p>\n<p>A good solution to this problem is to add a one-shot sound, a stinger, to help with the transition between the two sections. For example, if the introduction doesn&#8217;t have a drum layer, you can add a 1-bar drum break that creates a bridge to your main section that already has drums. Not only will this make the transition more natural, but it will also add impact. It is also possible to trigger the stinger immediately after the transition. This can be useful to add a stinger at the beginning of a loop, without retriggering it when the music loops.<\/p>\n<p>Dedicated Tracks must be used to trigger the stingers:<\/p>\n<ul>\n<li>Add a new Track.<\/li>\n<li>In the Inspector, change its <em>Block Transition Type<\/em> to either <em>Playback Transition<\/em> (to trigger the stinger before the transition) or <em>Playback on the first Transition<\/em> (to trigger the stinger after).<\/li>\n<li>Then, depending on which mode you selected, you must place the Waveform Region you want to play either just before the transition point or just after the beginning of the Block.<\/li>\n<li>Stripes will be displayed on the Track, indicating that the Waveform Region will not play unless a transition occurs.<\/li>\n<\/ul>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/06-Transition-Stinger.png\" alt=\"06 Transition Stinger\" width=\"947\" height=\"509\" class=\"alignnone size-full wp-image-5110\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/06-Transition-Stinger.png 947w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/06-Transition-Stinger-300x161.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/06-Transition-Stinger-768x413.png 768w\" sizes=\"auto, (max-width: 947px) 100vw, 947px\" \/><\/p>\n<p>Here is a video that features a Cue using Block Playback:<\/p>\n<div style=\"max-width: 700px; margin: 0 auto; margin-bottom: 20px; border: 1px solid #aaa;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-5095-1\" width=\"800\" height=\"423\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/Video_BLockPlayback.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/Video_BLockPlayback.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2024\/03\/Video_BLockPlayback.mp4<\/a><\/video><\/div>\n<\/div>\n<p>You now have all the tools to create great interactive music that will respond to what happens in the game. Of course, you can combine these methods. For instance, there is nothing stopping you from adding some AISACs to a Cue using Block Playback!<\/p>\n<p>In the <a href=\"https:\/\/blog.criware.com\/index.php\/2024\/08\/14\/adx-beginners-guide-14-dialog-and-localization\/\">next post<\/a> of this beginner&#8217;s guide, we will learn how Atom Craft makes it easy to manage your dialogue assets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After learning how to implement interactive music with ADX by using AISACs and Selectors, we will this time examine another<\/p>\n","protected":false},"author":2,"featured_media":5559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-5095","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adx","category-tutorials"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5095","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=5095"}],"version-history":[{"count":16,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5095\/revisions"}],"predecessor-version":[{"id":5575,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5095\/revisions\/5575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/5559"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=5095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=5095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=5095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}