<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<network id="CLAM">

  <processing id="Amount" type="ControlSource">
    <MinValue>0</MinValue>
    <MaxValue>100</MaxValue>
    <Step>1</Step>
    <UnitName>Am</UnitName>
  </processing>

  <processing id="JACK_Input" type="AudioSource"/>

  <processing id="JACK_Input2" type="AudioSource"/>

  <processing id="JACK_Out_Original" type="AudioSink"/>

  <processing id="JACK_Out_Synth" type="AudioSink"/>

  <processing id="SMSAnalysisCore" type="SMSAnalysisCore">
    <SinSpectralAnalysis>
      <WindowGenerator>
        <Type>Hamming</Type>
        <Size>2049</Size>
        <MaxSize>0</MaxSize>
        <UseTable>1</UseTable>
        <Normalize>NormalizationForAnalysis</Normalize>
        <Invert>0</Invert>
      </WindowGenerator>
      <CircularShift>
        <Amount>-1024</Amount>
      </CircularShift>
      <FFT>
        <AudioSize>2048</AudioSize>
      </FFT>
      <prHopSize>512</prHopSize>
      <prZeroPadding>0</prZeroPadding>
      <prSamplingRate>44100</prSamplingRate>
      <prFFTSize>2048</prFFTSize>
    </SinSpectralAnalysis>
    <ResSpectralAnalysis>
      <WindowGenerator>
        <Type>BlackmanHarris92</Type>
        <Size>1025</Size>
        <MaxSize>0</MaxSize>
        <UseTable>1</UseTable>
        <Normalize>NormalizationForAnalysis</Normalize>
        <Invert>0</Invert>
      </WindowGenerator>
      <CircularShift>
        <Amount>-512</Amount>
      </CircularShift>
      <FFT>
        <AudioSize>1024</AudioSize>
      </FFT>
      <prHopSize>512</prHopSize>
      <prZeroPadding>0</prZeroPadding>
      <prSamplingRate>44100</prSamplingRate>
      <prFFTSize>1024</prFFTSize>
    </ResSpectralAnalysis>
    <PeakDetect>
      <MaxPeaks>500</MaxPeaks>
      <MagThreshold>-60</MagThreshold>
      <MaxFreq>8000</MaxFreq>
    </PeakDetect>
    <FundFreqDetect>
      <ReferenceFundFreq>1000</ReferenceFundFreq>
      <LowestFundFreq>35</LowestFundFreq>
      <HighestFundFreq>1500</HighestFundFreq>
      <MaxCandMagDiff>30</MaxCandMagDiff>
      <MaxFundFreqError>10</MaxFundFreqError>
      <PMp>0.5</PMp>
      <PMq>1.4</PMq>
      <PMr>0.5</PMr>
      <MPp>0.5</MPp>
      <MPq>1.4</MPq>
      <MPr>0.5</MPr>
      <PMnPeaks>10</PMnPeaks>
      <MPnPeaks>10</MPnPeaks>
      <PMCont>1</PMCont>
      <MPCont>1</MPCont>
      <NInt>5</NInt>
      <NMaxCandidates>40</NMaxCandidates>
    </FundFreqDetect>
    <SinTracking>
      <Threshold>40</Threshold>
      <nMaxSines>200</nMaxSines>
      <IsHarmonic>0</IsHarmonic>
    </SinTracking>
    <prSamplingRate>44100</prSamplingRate>
    <prFFTSize>0</prFFTSize>
    <SynthSineSpectrum>
      <SpectrumSize>513</SpectrumSize>
      <SamplingRate>44100</SamplingRate>
      <ZeroPadding>0</ZeroPadding>
    </SynthSineSpectrum>
  </processing>

  <processing id="SMSFreqShift" type="SMSFreqShift"/>

  <processing id="SMSResidualGain" type="SMSResidualGain"/>

  <processing id="SMSSinusoidalGain" type="SMSSinusoidalGain"/>

  <processing id="SMSSynthesis" type="SMSSynthesis">
    <SynthSineSpectrum>
      <SpectrumSize>513</SpectrumSize>
      <SamplingRate>44100</SamplingRate>
      <ZeroPadding>0</ZeroPadding>
    </SynthSineSpectrum>
    <PhaseMan>
      <MaxSines>100</MaxSines>
      <SamplingRate>44100</SamplingRate>
      <Type>Continuation</Type>
    </PhaseMan>
    <SpectralSynth>
      <AnalWindowGenerator>
        <Type>BlackmanHarris92</Type>
        <Size>1025</Size>
        <MaxSize>0</MaxSize>
        <UseTable>1</UseTable>
        <Normalize>NormalizationForAnalysis</Normalize>
        <Invert>1</Invert>
      </AnalWindowGenerator>
      <SynthWindowGenerator>
        <Type>Triangular</Type>
        <Size>1025</Size>
        <MaxSize>0</MaxSize>
        <UseTable>1</UseTable>
        <Normalize>NoNormalization</Normalize>
        <Invert>0</Invert>
      </SynthWindowGenerator>
      <CircularShift>
        <Amount>512</Amount>
      </CircularShift>
      <IFFT>
        <AudioSize>1024</AudioSize>
      </IFFT>
      <prZeroPadding>0</prZeroPadding>
      <prSamplingRate>44100</prSamplingRate>
      <Residual>0</Residual>
    </SpectralSynth>
    <OverlapAddSin>
      <HopSize>512</HopSize>
      <FrameSize>512</FrameSize>
    </OverlapAddSin>
    <OverlapAddRes>
      <HopSize>512</HopSize>
      <FrameSize>512</FrameSize>
    </OverlapAddRes>
    <OverlapAddGlobal>
      <HopSize>512</HopSize>
      <FrameSize>512</FrameSize>
    </OverlapAddGlobal>
    <prSamplingRate>0</prSamplingRate>
  </processing>

  <port_connection>
    <out>JACK_Input.AudioOut</out>
    <in>SMSAnalysisCore.Input Audio</in>
  </port_connection>

  <port_connection>
    <out>JACK_Input2.AudioOut</out>
    <in>JACK_Out_Original.AudioIn</in>
  </port_connection>

  <port_connection>
    <out>SMSAnalysisCore.Sinusoidal Peaks</out>
    <in>SMSSinusoidalGain.In SpectralPeaks</in>
  </port_connection>

  <port_connection>
    <out>SMSAnalysisCore.Residual Spectrum</out>
    <in>SMSResidualGain.In Spectrum</in>
  </port_connection>

  <port_connection>
    <out>SMSFreqShift.Out SpectralPeaks</out>
    <in>SMSSynthesis.InputSinPeaks</in>
  </port_connection>

  <port_connection>
    <out>SMSResidualGain.Out Spectrum</out>
    <in>SMSSynthesis.InputResSpectrum</in>
  </port_connection>

  <port_connection>
    <out>SMSSinusoidalGain.Out SpectralPeaks</out>
    <in>SMSFreqShift.In SpectralPeaks</in>
  </port_connection>

  <port_connection>
    <out>SMSSynthesis.OutputAudio</out>
    <in>JACK_Out_Synth.AudioIn</in>
  </port_connection>

  <control_connection>
    <out>Amount.output</out>
    <in>SMSFreqShift.Amount</in>
  </control_connection>

</network>
