{"id":2907,"date":"2020-05-20T08:48:07","date_gmt":"2020-05-19T23:48:07","guid":{"rendered":"https:\/\/blog.criware.com\/?p=2907"},"modified":"2020-05-20T09:26:36","modified_gmt":"2020-05-20T00:26:37","slug":"dynamic-music-with-adx2-part2-horizontal-sequencing","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2020\/05\/20\/dynamic-music-with-adx2-part2-horizontal-sequencing\/","title":{"rendered":"Dynamic Music with ADX2 \u2013 Part2: Horizontal Sequencing"},"content":{"rendered":"<h2 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">\nIntroduction<br \/>\n<\/h2>\n<p>In the first part of this series, we looked at vertically layering our stems and controlling playback by using AISAC fades. This approach was useful for escalating the intensity of our music and was easy to implement.<br \/>\nIn this second part, we will look at creating a modular system by switching horizontally between full pieces of music. Using this technique, we can switch between entirely different arrangements, tempos, and musical keys. Of course, with this added flexibility comes greater difficulty in getting all the parts to sequence naturally. Fortunately, ADX2 gives us the tools to solve the technical challenges that this approach introduces.  <\/p>\n<div style=\"max-width: 800px; margin: 0 auto; margin-bottom: 20px;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2907-1\" width=\"800\" height=\"450\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2020_05_DynamicMusicP2.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2020_05_DynamicMusicP2.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2020_05_DynamicMusicP2.mp4<\/a><\/video><\/div>\n<\/div>\n<p><!-- download start --><\/p>\n<div style=\"max-width: 800px; margin: 0 auto; margin-bottom: 20px; text-align:center;\">\n<a style=\"display: inline-block; border: 1px solid #ccc; padding: 20px;\" href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2020_05_DynamicMusicP2.zip\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1813\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2018\/06\/zip.png\" alt=\"zip\" width=\"80\" height=\"78\"><br \/>\n2020_05_DynamicMusicP2.zip<\/a>\n<\/div>\n<p><!-- download end --><\/p>\n<p style=\"text-align:center\">This project was created using CRIWARE SDK for Unity V3.00.04 and Unity V2018.4.19f1<\/p>\n<h2 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">\nComposition<br \/>\n<\/h2>\n<p>Composing a horizontal music system takes a bit more experimentation and testing than with a vertical approach. We need to think about how tight we want the transitions to be, as this can have a significant impact on our orchestration and arrangement choices. Also, since DAWs generally aren\u2019t designed with this level of interactive control in mind, we are likely going to do a lot more iterative testing, swapping between Atom Craft and our DAW. <\/p>\n<p>To illustrate some of the tools available, we have created a sample project which features a music system with a calm state and a battle state, as well as transition states between these. <\/p>\n<h2 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Atom Craft Implementation<\/h2>\n<p>Once we have some music to work with, we can jump into Atom Craft. The primary tool ADX2 offers for horizontal sequencing is the Blocks features. Blocks allow us to encapsulate our ideas into little chunks of self-contained music, which can be easily switched between. To get set up, we need to:<\/p>\n<ul>\n<li>Create a new Polyphonic Cue<\/li>\n<li>Change the Time Base to Cue, and set:<\/li>\n<li style=\"margin-left:30px;\"><b>Setting Type<\/b> to Bars\/Beats<\/li>\n<li style=\"margin-left:30px;\"><b>Measure<\/b> and <b>BPM<\/b> to match our music<\/li>\n<li>Drag the song parts (Materials) into our Cue and arrange then as appropriate<\/li>\n<li>Right-click \u2192 New Object \u2192 Create Block<\/li>\n<li>Right-click a Block \u2192 Color Settings to make the Blocks easier to identify<\/li>\n<\/ul>\n<div style=\"text-align:center;margin-bottom: 25px;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/1-2.png\" alt=\"1\" width=\"985\" height=\"375\" class=\"alignnone size-full wp-image-2914\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/1-2.png 985w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/1-2-300x114.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/1-2-768x292.png 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/>\n<\/div>\n<p>Blocks have quite a few settings, so let\u2019s go over them.<\/p>\n<ul>\n<li><b>Playback LoopNum<\/b> sets the number of times our Block will loop. Setting this to -1 will ensure that it loops infinitely, or at least until we tell it to stop or transition.<\/li>\n<li><b>Number of Divisions<\/b> will divide our Block by the set value, which controls how quickly our Block will transition when another Block\u2019s playback has been initiated. Lower values allow our music to play out more fully, but higher values offer tighter synchronization to the gameplay.<\/li>\n<li><b>Block Transition Timing<\/b> works in tandem with Number of Divisions to determine whether the Block should transition partway through, or only when playback reaches the end of the Block.<\/li>\n<li>Transition Behavior controls whether the audio within the Block continues after a transition has occurred. We might want to continue playback in the case of long release tails, but generally, we want the Block Stop behavior.<\/li>\n<li><b>Block Transition Mode<\/b> determines whether playback to the next Block will start from the beginning of that next Block, or relative to where playback is in the existing Block. In other words, if playback in the current Block stops at the end of bar 2, playback will start from bar 3 in the next Block.<\/li>\n<\/ul>\n<div style=\"text-align:center;margin-bottom: 25px;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2-1.png\" alt=\"2\" width=\"1034\" height=\"229\" class=\"alignnone size-full wp-image-2915\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2-1.png 1034w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2-1-300x66.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2-1-768x170.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/2-1-1024x227.png 1024w\" sizes=\"auto, (max-width: 1034px) 100vw, 1034px\" \/>\n<\/div>\n<p>For the sample project that we have put together, we have decided to switch between Calm and Battle states using intermediary Blocks. Calm and Battle are set to loop indefinitely (-1), allowing for transitions to happen on each bar. Since playback can be stopped midway through a Material, we have opted for Block Stop <b>Transition Behavior<\/b> for these. <\/p>\n<p>For the transitions, we have set these to play fully, without any looping. Since Battle follows Battle Transition, we have set <b>Destination Type<\/b> to Next Block. For the Calm Transition, however, we have been more explicit since Calm is at the beginning of the Timeline. This behavior can be specified in the Inspector under the Block panel if Destination Type is set to Block Destination. Also, since this transition has a long tail, we have set <b>Transition Behavior<\/b> to None, so that the transition bleeds more naturally into Calm.<\/p>\n<div style=\"text-align:center;margin-bottom: 25px;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/3-1.png\" alt=\"3\" width=\"457\" height=\"191\" class=\"alignnone size-full wp-image-2916\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/3-1.png 457w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/3-1-300x125.png 300w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/>\n<\/div>\n<p>With our music system set up, we can now quickly audition the results in Session View. Simply drag in the music Cue, select the Block tab, and sequence different states using the corresponding play buttons.<\/p>\n<div style=\"text-align:center;margin-bottom: 25px;\">\n<img loading=\"lazy\" decoding=\"async\" style=\"border:1px solid #ccc;\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/4.png\" alt=\"4\" width=\"667\" height=\"416\" class=\"alignnone size-full wp-image-2917\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/4.png 667w, https:\/\/blog.criware.com\/wp-content\/uploads\/2020\/05\/4-300x187.png 300w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In the first part of this series, we looked at vertically layering our stems and controlling playback by using<\/p>\n","protected":false},"author":2,"featured_media":2932,"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-2907","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\/2907","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=2907"}],"version-history":[{"count":11,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/2907\/revisions"}],"predecessor-version":[{"id":2936,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/2907\/revisions\/2936"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/2932"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=2907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=2907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=2907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}