<project name="Musical Improvisation" app="Snap! 7, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAAAXNSR0IArs4c6QAAAzlJREFUeF7t10FKY2EQhdFfUXDiFtyPGxB0oAbcidvJJrIeceIkBAevwVkPlOZy6QI5GaeqyHkfPHK2bdu2fAgMCZwJcEje2S8BAQphVECAo/yOC1ADowICHOV3XIAaGBUQ4Ci/4wLUwKiAAEf5HRegBkYFBDjK77gANTAqIMBRfscFqIFRAQGO8jsuQA2MCghwlN9xAWpgVECAo/yOC1ADowICHOV3XIAaGBUQ4Ci/4wLUwKiAAEf5HRegBkYFBDjK77gANTAqIMBRfscFqIFRAQGO8jsuQA2MCghwlN9xAWpgVECAo/yOC1ADowICHOV3XIAaGBUQ4Ci/4wLUwKiAAEf5HRegBkYFBDjK77gANTAqIMBRfscFqIFRAQGO8jsuQA2MCghwlN9xAWpgVECAo/yOC1ADowICHOV3XIAaGBUQ4Ci/4wLUwKiAAL/h3+/36/39fd3e3q6bm5vRh/Sbjwvwm6f78fGxXl5e1ufn53p7e1v39/fr4uJiPT09raurq9/cxH/9bQL8gftwOKzX19d1fX3917eOx+N6fn5e27Z9hemTCwgwCPB0Oq3Hx8d1fn6+7u7ucn2TS4D/+Ap+eHj4egXvdrt1eXkpnZKAAP0JKaWUrRFg5maqJCDAEqQ1mYAAMzdTJQEBliCtyQQEmLmZKgkIsARpTSYgwMzNVElAgCVIazIBAWZupkoCAixBWpMJCDBzM1USEGAJ0ppMQICZm6mSgABLkNZkAgLM3EyVBARYgrQmExBg5maqJCDAEqQ1mYAAMzdTJQEBliCtyQQEmLmZKgkIsARpTSYgwMzNVElAgCVIazIBAWZupkoCAixBWpMJCDBzM1USEGAJ0ppMQICZm6mSgABLkNZkAgLM3EyVBARYgrQmExBg5maqJCDAEqQ1mYAAMzdTJQEBliCtyQQEmLmZKgkIsARpTSYgwMzNVElAgCVIazIBAWZupkoCAixBWpMJCDBzM1USEGAJ0ppMQICZm6mSgABLkNZkAgLM3EyVBARYgrQmExBg5maqJCDAEqQ1mYAAMzdTJQEBliCtyQQEmLmZKgkIsARpTSYgwMzNVElAgCVIazIBAWZupkoCfwBN/Be3THjJawAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="Musical Improvisation"><notes></notes><hidden>getPosition doDefineBlock doDeleteBlock doSetBlockAttribute reportBlockAttribute reportThisContext reportMousePosition reportCrossproduct </hidden><headers></headers><code></code><blocks><block-definition s="play chord %&apos;notes&apos; for %&apos;duration&apos; beats" type="command" category="sound"><header></header><code></code><translations></translations><inputs><input type="%l"></input><input type="%n"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>note</l><block var="notes"/><script><block s="fork"><block s="reifyScript"><script><block s="doPlayNote"><l></l><block var="duration"/></block></script><list></list></block><list><block var="note"><comment w="278" collapsed="false">notice how the note needs to be passed in as value (argument), and not embedded as a variable, because by the time the PLAY NOTE block would evaluate the variable in a new thread, it might already have changed to another value.</comment></block></list></block></script></block></script></block><block s="doRest"><block var="duration"/></block></script></block-definition><block-definition s="swap items %&apos;i1&apos; and %&apos;i2&apos; in %&apos;list&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%n"></input><input type="%n"></input><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>tmp</l></list></block><block s="doSetVar"><l>tmp</l><block s="reportListItem"><block var="i1"/><block var="list"/></block></block><block s="doReplaceInList"><block var="i1"/><block var="list"/><block s="reportListItem"><block var="i2"/><block var="list"/></block></block><block s="doReplaceInList"><block var="i2"/><block var="list"/><block var="tmp"/></block></script></block-definition><block-definition s="shuffle %&apos;data&apos;" type="command" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doWarp"><script><block s="doFor"><l>i</l><l>1</l><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block><script><custom-block s="swap items %n and %n in %l"><block var="i"/><block s="reportRandom"><block var="i"/><block s="reportListAttribute"><l><option>length</option></l><block var="data"/></block></block><block var="data"/></custom-block></script></block></script></block></script></block-definition><block-definition s="intersection of %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="lists"/><block s="reifyReporter"><autolambda><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportListContainsItem"><block var="b"/><l></l></block></autolambda><list></list></block><block var="a"/></block></autolambda><list><l>a</l><l>b</l></list></block></block></block></script></block-definition><block-definition s="union of %&apos;lists&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportCombine"><block var="lists"/><block s="reifyReporter"><autolambda><block s="reportConcatenatedLists"><list><block var="a"/><block s="reportKeep"><block s="reifyPredicate"><autolambda><block s="reportNot"><block s="reportListContainsItem"><block var="a"/><l></l></block></block></autolambda><list></list></block><block var="b"/></block></list></block></autolambda><list><l>a</l><l>b</l></list></block></block></block></script></block-definition></blocks><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="100" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="134"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="135"></list></costumes><sounds><list struct="atomic" id="136"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="-9.094947017729282e-13" y="-5.684341886080802e-14" heading="90" scale="1" volume="100" pan="0" rotation="1" instrument="1"  draggable="true" costume="0" color="80,80,80,1" pen="tip" id="141"><costumes><list struct="atomic" id="142"></list></costumes><sounds><list struct="atomic" id="143"></list></sounds><blocks></blocks><variables></variables><scripts><script x="30" y="10"><block s="doSetInstrument"><l>1</l></block><block s="doSetTempo"><l>100</l></block></script><script x="30" y="70"><block s="doPlayNote"><l>60</l><l>1</l><comment w="222" collapsed="false">We start by exploring the PLAY NOTE block and how its piano keyboard maps notes to numbers. &quot;C&quot; maps to the number 60</comment></block></script><script x="30" y="151"><block s="doFor"><l>i</l><l>60</l><l>72</l><script><block s="doPlayNote"><block var="i"/><l>.5</l></block></script><comment w="380" collapsed="false">If notes are just numbers, we can use a FOR loop to play an ascending sequence. Notice how there are 12 steps before the same notes repeat but at a different pitch. That&apos;s called an &quot;octave&quot;, because musicians can&apos;t count ;-)</comment></block></script><script x="30" y="232"><block s="doForEach"><l>item</l><block s="reportNumbers"><l>60</l><l>72</l></block><script><block s="doPlayNote"><block var="item"/><l>0.5</l></block></script><comment w="256" collapsed="false">We can use the NUMBERS block to get some numbers, and play them gack using a FOR EACH loop</comment></block></script><script x="30" y="306.6666666666665"><block s="doForEach"><l>item</l><block s="reportVariadicSum"><list><l>60</l><block s="reportNumbers"><l>0</l><l>12</l></block></list></block><script><block s="doPlayNote"><block var="item"/><l>0.5</l></block></script><comment w="308" collapsed="false">Let&apos;s explore Hyperblocks! Instead of a list of absolute numbers we can have a list of intervals and offset (transpose) it against a &quot;key&quot;.</comment></block></script><script x="30" y="384.5"><block s="doFor"><l>i</l><l>1</l><l>5</l><script><block s="doForEach"><l>item</l><block s="reportVariadicSum"><list><l>60</l><block s="reportVariadicProduct"><list><block s="reportNumbers"><l>0</l><l>12</l></block><block var="i"/></list></block></list></block><script><block s="doPlayNote"><block var="item"/><l>0.2</l></block></script></block></script><comment w="254" collapsed="false">What if instead of ascending in single steps we want to ascend in double, triple or quadruple steps, and how would that sound?</comment></block></script><script x="30" y="501.16666666666697"><custom-block s="play chord %l for %n beats"><l/><l></l><comment w="243" collapsed="false">how can we play several notes at the same time? Let&apos;s make a custom block for that and use LAUNCH!</comment></custom-block></script><script x="30" y="570.166666666667"><block s="doFor"><l>i</l><l>1</l><l>8</l><script><custom-block s="play chord %l for %n beats"><block s="reportVariadicSum"><list><l>60</l><block s="reportVariadicProduct"><list><block s="reportNumbers"><l>0</l><l>5</l></block><block var="i"/></list></block></list></block><l>1</l></custom-block></script><comment w="234" collapsed="false">Try our new PLAY CHORD block on evenly spaced intervals. Sounds kinda spacey, doesn&apos;t it?</comment></block></script><script x="30" y="656.0000000000006"><custom-block s="play chord %l for %n beats"><block s="reportVariadicSum"><list><l>60</l><block s="reportNewList"><list><l>0</l><l>4</l><l>7</l></list></block></list></block><l>1</l><comment w="197" collapsed="false">Let&apos;s make a chord that sounds like music, can we make a &quot;major&quot; chord?</comment></custom-block></script><script x="30" y="725.0000000000006"><block s="doFor"><l>i</l><l>0</l><l>12</l><script><custom-block s="play chord %l for %n beats"><block s="reportVariadicSum"><list><l>60</l><block s="reportNewList"><list><l>0</l><l>4</l><l>7</l></list></block><block var="i"/></list></block><l>.5</l></custom-block></script><comment w="296" collapsed="false">Now we can transpose that chord the same way we transposed a single note before. Do all those chords sound &quot;right&quot; to you? Find out which ones sound like the belong together!</comment></block></script><script x="30" y="806.833333333334"><block s="doForEach"><l>item</l><block s="reportNewList"><list><l>0</l><l>5</l><l>7</l></list><comment w="306" collapsed="false">Did you also come up with the numbers 0, 5 and 7? Those are called &quot;Cadence&quot; of &quot;Tonic&quot;, &quot;Subdominant&quot; and &quot;Dominant&quot; chords</comment></block><script><custom-block s="play chord %l for %n beats"><block s="reportVariadicSum"><list><l>60</l><block s="reportNewList"><list><l>0</l><l>4</l><l>7</l></list></block><block var="item"/></list></block><l>2</l></custom-block></script></block></script><script x="30" y="888.6666666666671"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportModulus"><block s="reportVariadicSum"><list><l></l><block s="reportNewList"><list><l>0</l><l>4</l><l>7</l></list></block></list></block><l>12</l></block></autolambda><list></list></block><block s="reportNewList"><list><l>0</l><l>5</l><l>7</l></list></block><comment w="315" collapsed="false">Let&apos;s collect all the notes of the 3 cadence chords in a list, and make sure they&apos;re all within the same octave (remember, musicians can&apos;t count, an &quot;octave&quot; is really an interval of 12 steps)...</comment></block></script><script x="30" y="969.666666666667"><custom-block s="union of %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportModulus"><block s="reportVariadicSum"><list><l></l><block s="reportNewList"><list><l>0</l><l>4</l><l>7</l></list></block></list></block><l>12</l></block></autolambda><list></list></block><block s="reportNewList"><list><l>0</l><l>5</l><l>7</l></list></block></block><comment w="224" collapsed="false">... and make a list where all the numbers occur only once, a &quot;union&quot; set of the 3 cadence chords.</comment></custom-block></script><script x="30" y="1038.6666666666665"><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>5</l><l>7</l><l>9</l><l>11</l></list><comment w="90" collapsed="false">put them in order ...</comment></block></script><script x="30" y="1095.6666666666663"><block s="doForEach"><l>item</l><block s="reportVariadicSum"><list><l>60</l><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>5</l><l>7</l><l>9</l><l>11</l></list></block></list></block><script><block s="doPlayNote"><block var="item"/><l>.5</l></block></script><comment w="382" collapsed="false">... and play them back: We just discovered the major scale!&#xD;Notice how the scale has 7 (!) notes, and then it repeats itself at a different pitch. So, *that&apos;s* why musicians call it an &quot;octave&quot; (&quot;octo&quot; = Latin for 8). A musical scale consists of 7 individual notes, it is also called &quot;heptatonic&quot; (&quot;hepta&quot; = Greek for 7)</comment></block></script><script x="30" y="1188.6666666666665"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportModulus"><block s="reportVariadicSum"><list><l></l><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>5</l><l>7</l><l>9</l><l>11</l></list></block></list></block><l>12</l></block></autolambda><list></list><comment w="360" collapsed="false">Hey, what happens if we also transpose the major scale to the 3 levels of the cadence, and collect all the resulting notes (wrapped inside the same octave) ...</comment></block><block s="reportNewList"><list><l>0</l><l>5</l><l>7</l></list></block></block></script><script x="30" y="1259.666666666667"><custom-block s="intersection of %l"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportModulus"><block s="reportVariadicSum"><list><l></l><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>5</l><l>7</l><l>9</l><l>11</l></list></block></list></block><l>12</l></block></autolambda><list></list></block><block s="reportNewList"><list><l>0</l><l>5</l><l>7</l></list></block></block><comment w="252" collapsed="false">but ONLY select the notes that are present in ALL 3 scales? In other words, take the &quot;intersection&quot; set?</comment></custom-block></script><script x="30" y="1328.666666666667"><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>7</l><l>9</l></list><comment w="90" collapsed="false">put them in order ...</comment></block></script><script x="30" y="1385.666666666667"><block s="doForEach"><l>item</l><block s="reportVariadicSum"><list><l>60</l><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>7</l><l>9</l></list></block></list></block><script><block s="doPlayNote"><block var="item"/><l>.5</l></block></script><comment w="342" collapsed="false">... and play them back: We just discovered ANOTHER scale, made up of 5 notes. That scale is called &quot;pentatonic&quot; (&quot;penta&quot; = Greek for 5).&#xD;&#xD;The pentatonic scale has an amazing quality which musicians love: You can play any of its notes to any chord in a song, and it always sounds &quot;right&quot; (because it&apos;s the intersection of those choes, duh!). That&apos;s extremely handy, because you don&apos;t even need to concentrate or &quot;feel&quot; any music whe you&apos;re improvising using the pentatonic scale, you just play any of its five notes randomly whenever you feel like it for as long as you like!</comment></block></script><script x="30" y="1538.6666666666665"><block s="receiveGo"><comment w="138.298828125" collapsed="false">Let&apos;s use this to put the band back together!</comment></block><block s="doSetGlobalFlag"><l><option>turbo mode</option></l><l><bool>true</bool></l></block><block s="doSetTempo"><l>100</l></block><block s="doDeclareVariables"><list><l>notes</l><l>key</l><l>instruments</l></list></block><block s="doSetVar"><l>instruments</l><block s="reportNumbers"><l>1</l><l>4</l></block></block><block s="doForever"><script><block s="doSetVar"><l>key</l><block s="reportRandom"><l>53</l><l>60</l></block></block><block s="doForEach"><l>bass</l><block s="reportNewList"><list><l>9</l><l>7</l><l>0</l><l>5</l></list><comment w="248" collapsed="true">Chord progression, this currently is Jens&apos; fav</comment></block><script><block s="doSetVar"><l>notes</l><block s="reportVariadicSum"><list><block var="key"/><block var="bass"/><block s="reportNewList"><list><l>0</l><block s="reportIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>2</l><l>4</l><l>9</l></list></block><block var="bass"/></block><l>3</l><l>4</l></block><l>7</l></list></block></list><comment w="209.1767578125" collapsed="false">some chords sound better as &quot;minor&quot; ones.</comment></block></block><block s="fork"><block s="reifyScript"><script><block s="doSetInstrument"><block s="reportListItem"><l>1</l><block var="instruments"/></block></block><block s="doPlayNote"><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="notes"/></block><l>12</l></block><l>1</l></block><block s="doRepeat"><l>2</l><script><block s="doRest"><l>0.5</l></block><block s="doPlayNote"><block s="reportDifference"><block s="reportListItem"><l><option>any</option></l><block var="notes"/></block><l>12</l></block><l>1</l></block></script><comment w="143" collapsed="false">this part introduces some rhythm, also called &quot;phrasing&quot;. Try out your own!</comment></block></script><list></list></block><list></list><comment w="90" collapsed="true">Bass</comment></block><block s="fork"><block s="reifyScript"><script><block s="doSetInstrument"><block s="reportListItem"><l>2</l><block var="instruments"/></block></block><block s="doRepeat"><l>8</l><script><block s="doIfElse"><block s="reportRandom"><l>0</l><l>1</l><comment w="90" collapsed="false">only play about every other note and rest otherwise. Experiment with your own rules!</comment></block><script><block s="doPlayNote"><block s="reportVariadicSum"><list><l>12</l><block var="key"/><block s="reportListItem"><l><option>any</option></l><block s="reportNewList"><list><l>0</l><l>2</l><l>4</l><l>7</l><l>9</l></list></block></block></list></block><l>0.5</l></block></script><script><block s="doRest"><l>0.5</l></block></script></block></script></block></script><list></list></block><list></list><comment w="90" collapsed="false">&quot;Melody&quot;, this is where we use the pentatonic scale</comment></block><block s="doSetInstrument"><block s="reportListItem"><l>3</l><block var="instruments"/></block></block><custom-block s="play chord %l for %n beats"><block var="notes"/><l>4</l><comment w="90" collapsed="true">harmony</comment></custom-block></script></block><custom-block s="shuffle %l"><block var="instruments"/></custom-block></script></block></script><comment x="30" y="2293.0000000000023" w="293" collapsed="false">more chord progressions to check out, try your own ones!</comment><script x="30" y="2347.0000000000023"><block s="reportNewList"><list><l>9</l><l>7</l><l>0</l><l>5</l></list><comment w="90" collapsed="true">Jens&apos; favorite</comment></block></script><script x="30" y="2382.0000000000023"><block s="reportNewList"><list><l>0</l><l>7</l><l>9</l><l>4</l><l>5</l><l>0</l><l>5</l><l>7</l></list><comment w="115" collapsed="true">Pachelbel Canon</comment></block></script><script x="30" y="2417.0000000000023"><block s="reportNewList"><list><l>0</l><l>0</l><l>5</l><l>7</l></list><comment w="167" collapsed="true">simple chord progression</comment></block></script><script x="30" y="2452.0000000000023"><block s="reportNewList"><list><l>9</l><l>7</l><l>5</l><l>4</l></list><comment w="97" collapsed="true">descending</comment></block></script><script x="30" y="2487.0000000000023"><block s="reportNewList"><list><l>0</l><l>2</l><l>5</l><l>7</l></list><comment w="117" collapsed="true">another simple one</comment></block></script></scripts></sprite></sprites></stage><variables></variables></scene></scenes></project>
