<?xml version='1.0' encoding='utf-8'?>
<MNPreset formatVersion="1"><metadata name="Guide - Zones and Interaction" description="Learn hit areas, gestures, coordinates, ranges and two-way patch connections." author="MNodes" category="Scene Studio" pluginVersion="1.1.5" createdAt="1790467200000" modifiedAt="1790467200000" type="Utility" preferredOpenMode="edit" tags="scene, tutorial, automation, zones" /><state><marionietoworld.MNodes_State gridActive="0" gridSize="20" viewOffsetX="12" viewOffsetY="48" zoom=".62" didInitView="1" toolbarExpanded="0" pv="1.1.5"><nodes nextId="18"><node id="1" type="visual.shadercode" title="Code - zone drawings" expanded="1" x="32" y="390" w="420" h="550"><state file="" textsize="13.0" out="0.0" code="// Interaction lives in Scene &gt; Zones; this code only draws its current state.&#10;float line(vec2 p,vec2 a,vec2 b){vec2 q=p-a,v=b-a;return length(q-v*clamp(dot(q,v)/max(dot(v,v),.0001),0.,1.));}&#10;float box(vec2 p,vec2 b){vec2 d=abs(p)-b;return length(max(d,0.))+min(max(d.x,d.y),0.);}&#10;void mainImage(out vec4 fragColor,in vec2 p){&#10; vec3 col=vec3(.035,.045,.065),accent=vec3(.32,.8,.94);&#10; float aa=1.0/mnPixelScale;&#10; vec2 c=zoneCenter(Amount);float r=min(zoneSize(Amount).x,zoneSize(Amount).y)*.44;&#10; vec2 q=p-c;float a=-2.356194+4.712389*zoneValue(Amount);&#10; col=mix(col,vec3(.11,.16,.21),1.-smoothstep(-aa,aa,length(q)-r));&#10; col=mix(col,accent,1.-smoothstep(-aa,aa,line(q,vec2(sin(a),cos(a))*r*.45,vec2(sin(a),cos(a))*r*.82)-2.));&#10; vec2 s=zoneSize(Level),l=zoneCenter(Level),left=l-vec2(s.x*.45,0),right=l+vec2(s.x*.45,0);&#10; col=mix(col,vec3(.16,.21,.27),1.-smoothstep(-aa,aa,line(p,left,right)-3.));&#10; vec2 thumb=mix(left,right,zoneValue(Level));&#10; col=mix(col,accent,1.-smoothstep(-aa,aa,line(p,left,thumb)-3.));&#10; col=mix(col,vec3(.88,.96,1.),1.-smoothstep(-aa,aa,box(p-thumb,vec2(4.,s.y*.36))-2.));&#10; col=mix(col,mix(vec3(.10,.16,.21),accent,zoneValue(Gate)),1.-smoothstep(-aa,aa,box(p-zoneCenter(Gate),zoneSize(Gate)*.44)-4.));&#10; col=mix(col,mix(vec3(.10,.16,.21),accent*.65,zoneValue(Power)),1.-smoothstep(-aa,aa,box(p-zoneCenter(Power),zoneSize(Power)*.44)-4.));&#10; vec2 pc=zoneCenter(Position),ps=zoneSize(Position),delta=p-pc;&#10; float inside=1.-smoothstep(-aa,aa,box(delta,ps*.5));&#10; vec2 point=pc+(vec2(zoneValue(Position),zoneValueY(Position))-.5)*ps;&#10; vec3 pad=vec3(.07,.105,.15);&#10; pad+=accent*.22*exp(-abs(p.x-point.x)*.7)+accent*.22*exp(-abs(p.y-point.y)*.7);&#10; pad=mix(pad,accent,1.-smoothstep(-aa,aa,length(p-point)-6.));col=mix(col,pad,inside);&#10; col=mix(col,vec3(.68,.74,.81),labelText(p,0,vec2(iResolution.x*0.1650,iResolution.y*0.9000),iResolution.y*0.0210,.5));&#10;    col=mix(col,vec3(.68,.74,.81),labelText(p,1,vec2(iResolution.x*0.4850,iResolution.y*0.7700),iResolution.y*0.0210,.5));&#10;    col=mix(col,vec3(.68,.74,.81),labelText(p,2,vec2(iResolution.x*0.1550,iResolution.y*0.1200),iResolution.y*0.0210,.5));&#10;    col=mix(col,vec3(.68,.74,.81),labelText(p,3,vec2(iResolution.x*0.4850,iResolution.y*0.1200),iResolution.y*0.0210,.5));&#10;    col=mix(col,vec3(.68,.74,.81),labelText(p,4,vec2(iResolution.x*0.8250,iResolution.y*0.8800),iResolution.y*0.0210,.5));&#10;    fragColor=vec4(col,1.);&#10;}&#10;" live="1" /></node><node id="2" type="visual.gpucanvas" title="Zones lesson" expanded="1" x="1010" y="390" w="720" h="820"><state in="0.0" inb="0.0" codein="0.0" zonesin="0.0" setrow="0.0" scriptin="0.0" editObjects="0" appearanceRow="0.0" pcount="0" speed="1.0" p1="0.0" p2="0.0" p3="0.0" p4="0.0" p5="0.0" p6="0.0" p7="0.0" p8="0.0" mousex="0.5" mousey="0.5" wheel="0.0" dragx="0.0" dragy="0.0" imouse="0 0 0 0" code="" zones="[{&quot;id&quot;: 1, &quot;name&quot;: &quot;Amount&quot;, &quot;type&quot;: &quot;knob&quot;, &quot;shape&quot;: &quot;circle&quot;, &quot;x&quot;: 0.05, &quot;y&quot;: 0.49, &quot;w&quot;: 0.23, &quot;h&quot;: 0.37, &quot;min&quot;: 0, &quot;max&quot;: 100, &quot;default&quot;: 35, &quot;unit&quot;: &quot; %&quot;}, {&quot;id&quot;: 2, &quot;name&quot;: &quot;Level&quot;, &quot;type&quot;: &quot;slider&quot;, &quot;shape&quot;: &quot;rect&quot;, &quot;x&quot;: 0.36, &quot;y&quot;: 0.58, &quot;w&quot;: 0.25, &quot;h&quot;: 0.12, &quot;min&quot;: -60, &quot;max&quot;: 6, &quot;default&quot;: -17.1, &quot;unit&quot;: &quot; dB&quot;, &quot;vertical&quot;: false}, {&quot;id&quot;: 3, &quot;name&quot;: &quot;Gate&quot;, &quot;type&quot;: &quot;button&quot;, &quot;shape&quot;: &quot;rect&quot;, &quot;x&quot;: 0.06, &quot;y&quot;: 0.18, &quot;w&quot;: 0.19, &quot;h&quot;: 0.15}, {&quot;id&quot;: 4, &quot;name&quot;: &quot;Power&quot;, &quot;type&quot;: &quot;toggle&quot;, &quot;shape&quot;: &quot;rect&quot;, &quot;x&quot;: 0.39, &quot;y&quot;: 0.18, &quot;w&quot;: 0.19, &quot;h&quot;: 0.15, &quot;default&quot;: 1}, {&quot;id&quot;: 5, &quot;name&quot;: &quot;Position&quot;, &quot;type&quot;: &quot;xy&quot;, &quot;shape&quot;: &quot;rect&quot;, &quot;x&quot;: 0.7, &quot;y&quot;: 0.22, &quot;w&quot;: 0.25, &quot;h&quot;: 0.59, &quot;min&quot;: -1, &quot;max&quot;: 1, &quot;default&quot;: -0.3, &quot;defaultY&quot;: 0.3}]" zonevalues="" labels="KNOB&#10;SLIDER&#10;BUTTON&#10;TOGGLE&#10;XY PAD" image1="" image2="" fontFile="" preserveBuffers="0" resolution="0" framerate="1" transparent="0" background="FF0F131A" keyboard="0" zoneinputs="1" showOrientation="0" showObjectAxes="0" visible="1" ignoreClicks="0" panelX="0.0" panelY="0.0" panelW="0.0" panelH="0.0" tooltipStyle="" exposeToDAW="0" /></node><node id="3" type="visual.canvas.slider" title="Send 0..100 to Amount" expanded="1" x="492" y="390" w="420" h="550"><state value="35" positionOut="0.0" min="0" max="100" log="0" unit="" default="0.5" decimals="2.0" step="0.0" units="1" x="7" y="94" w="86" h="4" rotation="0.0" opacity="1.0" label="" showValue="1" accent="FF4FD1FF" body="FF171B26" edge="FF262C3A" trackColour="FF222838" textColour="FFE8ECF4" labelColour="FF8A93A6" textSize="0.0" labelSize="0.0" textWeight="0" textSpacing="0.0" textOffsetX="0.0" textOffsetY="0.0" labelOffsetX="0.0" labelOffsetY="0.0" textMaxWidth="0.0" labelMaxWidth="0.0" partTrack="0.0" partFill="0.0" partThumb="0.0" appearanceRow="0.0" canvasOut="0.0" tooltip="" mouseOut="0.0" exposeToDAW="0" /></node><node id="4" type="visual.canvas.text" title="Amount output readout" expanded="0" x="32" y="1000" w="420" h="280"><state units="1" x="16.5" y="56" size="3" rotation="0.0" opacity="1.0" text="35" align="1" baseline="0" decimals="1" textSpacing="0.0" textMaxWidth="0.0" colour="FFFFFFFF" glow="0.0" glowColour="FFFFFFFF" shadowColour="00000000" shadowX="0.0" shadowY="4.0" shadowBlur="12.0" blur="0.0" blend="0" trail="0.0" appearanceRow="0.0" canvasOut="0.0" tooltip="" mouseOut="0.0" /></node><node id="5" type="comment" title="Comment" expanded="0" x="32" y="16" w="1690" h="50"><state text="Guide - Zones and Interaction" fontSize="32" fontWeight="3" align="0" textColour="ffe5ecee" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="6" type="comment" title="Comment" expanded="0" x="32" y="86" w="548" h="32"><state text="1 / Drawing and interaction" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="7" type="comment" title="Comment" expanded="0" x="32" y="121" w="548" h="103"><state text="The separate Shader Code draws the pictures. Scene Zones defines where they react. A zone has a stable id, a name, a type, a rectangle and a range. Its name is also available in GLSL." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="8" type="comment" title="Comment" expanded="0" x="608" y="86" w="548" h="32"><state text="2 / Inspect the targets" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="9" type="comment" title="Comment" expanded="0" x="608" y="121" w="548" h="103"><state text="Right-click the Scene header: Show Zones reveals the hit areas without changing the picture. Edit Zones lets you place/resize them. Turn Edit Zones off to play. Inspector &gt; Zones contains the complete editable list." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="10" type="comment" title="Comment" expanded="0" x="1184" y="86" w="548" h="32"><state text="3 / Try every gesture" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="11" type="comment" title="Comment" expanded="0" x="1184" y="121" w="548" h="103"><state text="Knob: drag up/down, Shift for fine movement; keep dragging outside its circle. Slider: click or drag along the rail. Button: 1 while held, 0 on release. Toggle: click to latch. XY: drag the point on two independent axes." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="12" type="comment" title="Comment" expanded="0" x="32" y="228" w="548" h="32"><state text="4 / Follow the cables" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="13" type="comment" title="Comment" expanded="0" x="32" y="263" w="548" h="103"><state text="The native slider at the bottom feeds Amount in the 0..100 range. Drag it and watch the Scene knob. Amount output feeds a Text object, so its number also changes when you play the shader knob. Connect that same output to your sound graph." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="14" type="comment" title="Comment" expanded="0" x="608" y="228" w="548" h="32"><state text="5 / Coordinates and values" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="15" type="comment" title="Comment" expanded="0" x="608" y="263" w="548" h="103"><state text="Zone x/y/w/h use 0..1 of the whole Scene, from bottom left. zoneValue(Amount) is 0..1; zoneOutput(Amount) is 0..100. In Code, change a colour without changing the interaction. The Level zone outputs -60..6 dB; XY outputs -1..1." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="16" type="comment" title="Comment" expanded="0" x="1184" y="228" w="548" h="32"><state text="6 / Build your own" fontSize="21" fontWeight="3" align="0" textColour="ff80d9de" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node><node id="17" type="comment" title="Comment" expanded="0" x="1184" y="263" w="548" h="103"><state text="Keep IDs when editing to preserve cables. Enable Zone Inputs for per-zone incoming values. Set accepts named values in their real ranges without echoing outputs, useful for feedback. Expose to DAW makes zones automatable; see Guide - DAW Automation." fontSize="17" fontWeight="1" align="0" textColour="ffcad5d9" bgColour="00000000" borderColour="80ffffff" borderOn="0" borderStroke="1.0" fontFamily="Inter" /></node></nodes><edges><e fn="1" fp="0" tn="2" tp="2" /><e fn="3" fp="101" tn="2" tp="1002" /><e fn="3" fp="100" tn="2" tp="6" /><e fn="2" fp="202" tn="4" tp="16" /><e fn="4" fp="100" tn="2" tp="6" /></edges><panel width="900" height="600" locked="1" zoom="1" performScale="1" gridEnabled="0" toolbarExpanded="0" panelBgColour="ff101820"><entry nodeId="2" x="0" y="0" w="900" h="600" z="0" auto="0" /></panel></marionietoworld.MNodes_State></state></MNPreset>