﻿<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.9.0"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:wie="clr-namespace:Bonsai.Windows.Input;assembly=Bonsai.Windows.Input"
                 xmlns:al="clr-namespace:Bonsai.Audio;assembly=Bonsai.Audio"
                 xmlns:dsp="clr-namespace:Bonsai.Dsp;assembly=Bonsai.Dsp"
                 xmlns:p1="clr-namespace:Harp.SoundCard;assembly=Harp.SoundCard"
                 xmlns="https://bonsai-rx.org/2018/workflow">
  <Workflow>
    <Nodes>
      <Expression xsi:type="Combinator">
        <Combinator xsi:type="wie:KeyDown">
          <wie:Filter>A</wie:Filter>
          <wie:SuppressRepetitions>false</wie:SuppressRepetitions>
        </Combinator>
      </Expression>
      <Expression xsi:type="Combinator">
        <Combinator xsi:type="al:AudioReader">
          <al:FileName>sample.wav</al:FileName>
          <al:BufferLength>0</al:BufferLength>
          <al:SampleRate>0</al:SampleRate>
        </Combinator>
      </Expression>
      <Expression xsi:type="Combinator">
        <Combinator xsi:type="dsp:ConvertScale">
          <dsp:Depth>S32</dsp:Depth>
          <dsp:Scale>65536</dsp:Scale>
          <dsp:Shift>0</dsp:Shift>
        </Combinator>
      </Expression>
      <Expression xsi:type="Combinator">
        <Combinator xsi:type="p1:UpdateSoundWaveform">
          <p1:DeviceIndex xsi:nil="true" />
          <p1:SoundIndex>2</p1:SoundIndex>
          <p1:SampleRate>SampleRate96000Hz</p1:SampleRate>
        </Combinator>
      </Expression>
    </Nodes>
    <Edges>
      <Edge From="0" To="1" Label="Source1" />
      <Edge From="1" To="2" Label="Source1" />
      <Edge From="2" To="3" Label="Source1" />
    </Edges>
  </Workflow>
</WorkflowBuilder>