Skip to content

Commit 3918949

Browse files
authored
Live Coding session workflows 31 May 2024
1 parent 7e78a37 commit 3918949

8 files changed

+3794
-0
lines changed

LiveCodingMay2024/DIrTuning_1.bonsai

+250
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<WorkflowBuilder Version="2.8.1"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:gl="clr-namespace:Bonsai.Shaders;assembly=Bonsai.Shaders"
5+
xmlns:res="clr-namespace:Bonsai.Resources;assembly=Bonsai.System"
6+
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
7+
xmlns:num="clr-namespace:Bonsai.Numerics;assembly=Bonsai.Numerics"
8+
xmlns="https://bonsai-rx.org/2018/workflow">
9+
<Workflow>
10+
<Nodes>
11+
<Expression xsi:type="Combinator">
12+
<Combinator xsi:type="gl:CreateWindow">
13+
<gl:Width>640</gl:Width>
14+
<gl:Height>480</gl:Height>
15+
<gl:VSync>On</gl:VSync>
16+
<gl:SwapSync>false</gl:SwapSync>
17+
<gl:ClearColor>Gray</gl:ClearColor>
18+
<gl:ClearMask>DepthBufferBit ColorBufferBit</gl:ClearMask>
19+
<gl:CursorVisible>true</gl:CursorVisible>
20+
<gl:Location xsi:nil="true" />
21+
<gl:WindowBorder>Resizable</gl:WindowBorder>
22+
<gl:WindowState>Normal</gl:WindowState>
23+
<gl:DisplayDevice>Second</gl:DisplayDevice>
24+
<gl:TargetRenderFrequency>0</gl:TargetRenderFrequency>
25+
<gl:TargetUpdateFrequency xsi:nil="true" />
26+
<gl:RenderState />
27+
<gl:GraphicsMode>
28+
<gl:ColorFormat>
29+
<gl:Red>8</gl:Red>
30+
<gl:Green>8</gl:Green>
31+
<gl:Blue>8</gl:Blue>
32+
<gl:Alpha>8</gl:Alpha>
33+
</gl:ColorFormat>
34+
<gl:Depth>16</gl:Depth>
35+
<gl:Stencil>0</gl:Stencil>
36+
<gl:Samples>0</gl:Samples>
37+
<gl:AccumulatorFormat>
38+
<gl:Red>0</gl:Red>
39+
<gl:Green>0</gl:Green>
40+
<gl:Blue>0</gl:Blue>
41+
<gl:Alpha>0</gl:Alpha>
42+
</gl:AccumulatorFormat>
43+
<gl:Buffers>2</gl:Buffers>
44+
<gl:Stereo>false</gl:Stereo>
45+
</gl:GraphicsMode>
46+
</Combinator>
47+
</Expression>
48+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Primitives.BonVisionResources.bonsai" />
49+
<Expression xsi:type="Combinator">
50+
<Combinator xsi:type="res:LoadResources" />
51+
</Expression>
52+
<Expression xsi:type="Combinator">
53+
<Combinator xsi:type="gl:RenderFrame" />
54+
</Expression>
55+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Environment.OrthographicView.bonsai">
56+
<Left>-90</Left>
57+
<Right>90</Right>
58+
<Bottom>-90</Bottom>
59+
<Top>90</Top>
60+
</Expression>
61+
<Expression xsi:type="rx:BehaviorSubject">
62+
<Name>DrawStimulus</Name>
63+
</Expression>
64+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Environment.SphereMapping.bonsai">
65+
<ClearColor>Gray</ClearColor>
66+
<Width xsi:nil="true" />
67+
<Height xsi:nil="true" />
68+
<RotationZ>0</RotationZ>
69+
<RotationY>0</RotationY>
70+
<RotationX>0</RotationX>
71+
<FaceSize xsi:nil="true" />
72+
</Expression>
73+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Environment.ViewWindow.bonsai">
74+
<Width>20</Width>
75+
<Height>15</Height>
76+
<Rotation>
77+
<X>0</X>
78+
<Y>0</Y>
79+
<Z>0</Z>
80+
</Rotation>
81+
<Translation>
82+
<X>0</X>
83+
<Y>0</Y>
84+
<Z>-10</Z>
85+
</Translation>
86+
</Expression>
87+
<Expression xsi:type="Combinator">
88+
<Combinator xsi:type="FloatProperty">
89+
<Value>0</Value>
90+
</Combinator>
91+
</Expression>
92+
<Expression xsi:type="Combinator">
93+
<Combinator xsi:type="FloatProperty">
94+
<Value>90</Value>
95+
</Combinator>
96+
</Expression>
97+
<Expression xsi:type="Combinator">
98+
<Combinator xsi:type="FloatProperty">
99+
<Value>180</Value>
100+
</Combinator>
101+
</Expression>
102+
<Expression xsi:type="Combinator">
103+
<Combinator xsi:type="FloatProperty">
104+
<Value>270</Value>
105+
</Combinator>
106+
</Expression>
107+
<Expression xsi:type="Combinator">
108+
<Combinator xsi:type="rx:Merge" />
109+
</Expression>
110+
<Expression xsi:type="Combinator">
111+
<Combinator xsi:type="num:Permutation" />
112+
</Expression>
113+
<Expression xsi:type="rx:CreateObservable">
114+
<Workflow>
115+
<Nodes>
116+
<Expression xsi:type="WorkflowInput">
117+
<Name>Source1</Name>
118+
</Expression>
119+
<Expression xsi:type="Combinator">
120+
<Combinator xsi:type="num:DegreeToRadian" />
121+
</Expression>
122+
<Expression xsi:type="PropertyMapping">
123+
<PropertyMappings>
124+
<Property Name="Angle" />
125+
</PropertyMappings>
126+
</Expression>
127+
<Expression xsi:type="GroupWorkflow">
128+
<Name>DirStim</Name>
129+
<Workflow>
130+
<Nodes>
131+
<Expression xsi:type="SubscribeSubject">
132+
<Name>DrawStimulus</Name>
133+
</Expression>
134+
<Expression xsi:type="ExternalizedMapping">
135+
<Property Name="Angle" />
136+
</Expression>
137+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Primitives.DrawGratings.bonsai">
138+
<LocationX>0</LocationX>
139+
<LocationY>0</LocationY>
140+
<Layer>0</Layer>
141+
<ExtentX>45</ExtentX>
142+
<ExtentY>45</ExtentY>
143+
<SpatialFrequency>0.25</SpatialFrequency>
144+
<TemporalFrequency>1</TemporalFrequency>
145+
<Phase>0</Phase>
146+
<Angle>270</Angle>
147+
<SquareWave>false</SquareWave>
148+
<Contrast>1</Contrast>
149+
<DutyCycle xsi:nil="true" />
150+
<Radius>5</Radius>
151+
<Aperture>0.1</Aperture>
152+
<Opacity>1</Opacity>
153+
</Expression>
154+
<Expression xsi:type="Combinator">
155+
<Combinator xsi:type="gl:Timer">
156+
<gl:DueTime>PT1S</gl:DueTime>
157+
</Combinator>
158+
</Expression>
159+
<Expression xsi:type="Combinator">
160+
<Combinator xsi:type="rx:TakeUntil" />
161+
</Expression>
162+
<Expression xsi:type="SubscribeSubject">
163+
<Name>DrawStimulus</Name>
164+
</Expression>
165+
<Expression xsi:type="IncludeWorkflow" Path="BonVision:Primitives.DrawGratings.bonsai">
166+
<LocationX>0</LocationX>
167+
<LocationY>0</LocationY>
168+
<Layer>0</Layer>
169+
<ExtentX>45</ExtentX>
170+
<ExtentY>45</ExtentY>
171+
<SpatialFrequency>0.25</SpatialFrequency>
172+
<TemporalFrequency>1</TemporalFrequency>
173+
<Phase>0</Phase>
174+
<Angle>90</Angle>
175+
<SquareWave>false</SquareWave>
176+
<Contrast>0</Contrast>
177+
<DutyCycle xsi:nil="true" />
178+
<Radius>5</Radius>
179+
<Aperture>0.1</Aperture>
180+
<Opacity>1</Opacity>
181+
</Expression>
182+
<Expression xsi:type="Combinator">
183+
<Combinator xsi:type="gl:Timer">
184+
<gl:DueTime>PT1S</gl:DueTime>
185+
</Combinator>
186+
</Expression>
187+
<Expression xsi:type="Combinator">
188+
<Combinator xsi:type="rx:TakeUntil" />
189+
</Expression>
190+
<Expression xsi:type="Combinator">
191+
<Combinator xsi:type="rx:Concat" />
192+
</Expression>
193+
<Expression xsi:type="WorkflowOutput" />
194+
</Nodes>
195+
<Edges>
196+
<Edge From="0" To="2" Label="Source1" />
197+
<Edge From="1" To="2" Label="Source2" />
198+
<Edge From="2" To="4" Label="Source1" />
199+
<Edge From="3" To="4" Label="Source2" />
200+
<Edge From="4" To="9" Label="Source1" />
201+
<Edge From="5" To="6" Label="Source1" />
202+
<Edge From="6" To="8" Label="Source1" />
203+
<Edge From="7" To="8" Label="Source2" />
204+
<Edge From="8" To="9" Label="Source2" />
205+
<Edge From="9" To="10" Label="Source1" />
206+
</Edges>
207+
</Workflow>
208+
</Expression>
209+
<Expression xsi:type="WorkflowOutput" />
210+
</Nodes>
211+
<Edges>
212+
<Edge From="0" To="1" Label="Source1" />
213+
<Edge From="1" To="2" Label="Source1" />
214+
<Edge From="2" To="3" Label="Source1" />
215+
<Edge From="3" To="4" Label="Source1" />
216+
</Edges>
217+
</Workflow>
218+
</Expression>
219+
<Expression xsi:type="Combinator">
220+
<Combinator xsi:type="rx:Concat" />
221+
</Expression>
222+
<Expression xsi:type="WorkflowOutput" />
223+
<Expression xsi:type="Combinator">
224+
<Combinator xsi:type="FloatProperty">
225+
<Value>0</Value>
226+
</Combinator>
227+
</Expression>
228+
<Expression xsi:type="rx:BehaviorSubject">
229+
<Name>Random</Name>
230+
</Expression>
231+
</Nodes>
232+
<Edges>
233+
<Edge From="0" To="1" Label="Source1" />
234+
<Edge From="1" To="2" Label="Source1" />
235+
<Edge From="3" To="4" Label="Source1" />
236+
<Edge From="4" To="5" Label="Source1" />
237+
<Edge From="5" To="6" Label="Source1" />
238+
<Edge From="6" To="7" Label="Source1" />
239+
<Edge From="8" To="12" Label="Source1" />
240+
<Edge From="9" To="12" Label="Source2" />
241+
<Edge From="10" To="12" Label="Source3" />
242+
<Edge From="11" To="12" Label="Source4" />
243+
<Edge From="12" To="13" Label="Source1" />
244+
<Edge From="13" To="14" Label="Source1" />
245+
<Edge From="14" To="15" Label="Source1" />
246+
<Edge From="15" To="16" Label="Source1" />
247+
<Edge From="17" To="18" Label="Source1" />
248+
</Edges>
249+
</Workflow>
250+
</WorkflowBuilder>

0 commit comments

Comments
 (0)