Skip to content

Commit

Permalink
Fix pwm frequencies and add tester ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Feb 3, 2025
1 parent ec4c073 commit 0a5a51b
Showing 1 changed file with 99 additions and 32 deletions.
131 changes: 99 additions & 32 deletions src/main.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -3172,14 +3172,14 @@ Item3 as Right)</scr:Expression>
</Expression>
<Expression xsi:type="IncludeWorkflow" Path="Extensions\PlayAudioCue.bonsai">
<Duration>0.1</Duration>
<Frequency>12000</Frequency>
<Frequency>8000</Frequency>
</Expression>
<Expression xsi:type="rx:BehaviorSubject" TypeArguments="sys:Boolean">
<rx:Name>TriggerFeedbackCue</rx:Name>
</Expression>
<Expression xsi:type="IncludeWorkflow" Path="Extensions\PlayAudioCue.bonsai">
<Duration>0.1</Duration>
<Frequency>18000</Frequency>
<Frequency>10000</Frequency>
</Expression>
<Expression xsi:type="rx:BehaviorSubject" TypeArguments="p10:Unit">
<rx:Name>TriggerInitiationCue</rx:Name>
Expand Down Expand Up @@ -5401,36 +5401,105 @@ Value.RightForce as RightForce) as Force)</scr:Expression>
<Name>HwShortcuts</Name>
<Workflow>
<Nodes>
<Expression xsi:type="SubscribeSubject">
<Name>EnableExperimentUI</Name>
</Expression>
<Expression xsi:type="PropertyMapping">
<PropertyMappings>
<Property Name="Enabled" />
</PropertyMappings>
</Expression>
<Expression xsi:type="gui:ButtonBuilder">
<gui:Name>TriggerAudio</gui:Name>
<gui:Enabled>true</gui:Enabled>
<gui:Visible>true</gui:Visible>
<gui:Text>TriggerAudio</gui:Text>
<Expression xsi:type="Combinator">
<Combinator xsi:type="IntProperty">
<Value>0</Value>
</Combinator>
</Expression>
<Expression xsi:type="rx:Sink">
<Expression xsi:type="rx:Visualizer">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
<Expression xsi:type="gui:SliderBuilder">
<gui:Name>Frequency</gui:Name>
<gui:Enabled>true</gui:Enabled>
<gui:Visible>true</gui:Visible>
<gui:Minimum>1</gui:Minimum>
<gui:Maximum>10000</gui:Maximum>
<gui:DecimalPlaces xsi:nil="true" />
<gui:Value>5000</gui:Value>
</Expression>
<Expression xsi:type="Unit" />
<Expression xsi:type="MulticastSubject">
<Name>AudioTrigger</Name>
<Expression xsi:type="rx:BehaviorSubject">
<Name>Frequency</Name>
</Expression>
<Expression xsi:type="VisualizerMapping" />
<Expression xsi:type="gui:ButtonBuilder">
<gui:Name>TriggerAudio</gui:Name>
<gui:Enabled>true</gui:Enabled>
<gui:Visible>true</gui:Visible>
<gui:Text>TriggerAudio</gui:Text>
</Expression>
<Expression xsi:type="rx:Sink">
<Workflow>
<Nodes>
<Expression xsi:type="WorkflowInput">
<Name>Source1</Name>
</Expression>
<Expression xsi:type="SubscribeSubject">
<Name>Frequency</Name>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="rx:WithLatestFrom" />
</Expression>
<Expression xsi:type="InputMapping">
<PropertyMappings>
<Property Name="Frequency" Selector="Item2" />
</PropertyMappings>
</Expression>
<Expression xsi:type="IncludeWorkflow" Path="Extensions\PlayAudioCue.bonsai">
<Duration>0.1</Duration>
<Frequency>300</Frequency>
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="2" Label="Source1" />
<Edge From="1" To="2" Label="Source2" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
</Edges>
</Workflow>
</Expression>
<Expression xsi:type="VisualizerMapping" />
<Expression xsi:type="SubscribeSubject">
<Name>EnableExperimentUI</Name>
</Expression>
<Expression xsi:type="PropertyMapping">
<PropertyMappings>
<Property Name="Enabled" />
</PropertyMappings>
</Expression>
<Expression xsi:type="gui:TableLayoutPanelBuilder">
<gui:Name>ToneTester</gui:Name>
<gui:Enabled>true</gui:Enabled>
<gui:Visible>true</gui:Visible>
<gui:ColumnCount>1</gui:ColumnCount>
<gui:RowCount>2</gui:RowCount>
<gui:ColumnStyles />
<gui:RowStyles>
<gui:RowStyle>
<gui:SizeType>Percent</gui:SizeType>
<gui:Height>0.3</gui:Height>
</gui:RowStyle>
<gui:RowStyle>
<gui:SizeType>Percent</gui:SizeType>
<gui:Height>0.7</gui:Height>
</gui:RowStyle>
</gui:RowStyles>
<gui:CellSpans />
</Expression>
<Expression xsi:type="WorkflowOutput" />
</Nodes>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="2" To="8" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="8" Label="Source2" />
<Edge From="6" To="7" Label="Source1" />
<Edge From="7" To="8" Label="Source3" />
<Edge From="8" To="9" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down Expand Up @@ -5491,19 +5560,17 @@ Value.RightForce as RightForce) as Force)</scr:Expression>
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="3" Label="Source1" />
<Edge From="2" To="6" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="8" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source2" />
<Edge From="6" To="7" Label="Source1" />
<Edge From="7" To="8" Label="Source2" />
<Edge From="8" To="9" Label="Source1" />
<Edge From="10" To="14" Label="Source1" />
<Edge From="11" To="12" Label="Source1" />
<Edge From="8" To="12" Label="Source1" />
<Edge From="9" To="10" Label="Source1" />
<Edge From="10" To="11" Label="Source1" />
<Edge From="11" To="12" Label="Source2" />
<Edge From="12" To="13" Label="Source1" />
<Edge From="13" To="14" Label="Source2" />
<Edge From="14" To="15" Label="Source1" />
<Edge From="15" To="16" Label="Source1" />
<Edge From="13" To="14" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down

0 comments on commit 0a5a51b

Please sign in to comment.