[Clam-devel] Commits from home: Vowel synthesizer

David García Garzón dgarcia at iua.upf.edu
Tue Mar 13 04:02:33 PDT 2007


I've not committed the example network which i use to test it all. Since i 
don't want it on 1.0 I just attach it in this mail.

It has two processing paths, the synthesis one and the analysis one which i 
use to compare the synthesis with the audio on the mic (say 'aaaaaa...'). 
Check that the stochastic/residual component on the synthesis is feed by a 
muted oscillator so there is no stochastic component right now.

I'm not on dedicating so much resources before LAC2007 so if you are 
interested in that feel free to play with it. Most work can be done by 
modifying the resonator code to mach vowels or the instrument you like.

David.


On Tuesday 13 March 2007 06:21:53 David García Garzón wrote:
> This weekend i did some experiments on interactive vowels synthesis. At
> Pau's query, i commit them, although the work is not finished yet. It can
> be already used as simple instrument synthesizer. A better vowel resonator
> is still needed. But, at least it could be used as prototype for other
> processing that modify the harmonics to synthetize other instruments.
>
>
>  * PeakView: Peaks adapt to the minimum value.
>    This change introduces some flicker to the view since the scale varies
> but at least it visualizes very small values i needed to visualize. A
> memory on the minimum should be more stable.
>  * SpectralPeakArray:
>    * Optimizations: Removed some array copies, using const references now
>    * Several early returns and just-in-place variable definitions
>  * API rename on phasor based instant views, orderData -> positionData
>  * New processing HarmonicPeaksGenerator which generates a set of
>    harmonic peaks with a given fundamental frequency and a given slope.
>  * VowelResonator: A new processing which create the resonances of a vowel
>  * HarmonicPeaksGenerator: The slope is now logaritmic


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

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

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

  <processing id="F1" type="OutControlSender">
    <Min>200</Min>
    <Default>700</Default>
    <Max>800</Max>
    <Step>1</Step>
    <ControlRepresentation>Vertical Slider</ControlRepresentation>
  </processing>

  <processing id="F2" type="OutControlSender">
    <Min>800</Min>
    <Default>1000</Default>
    <Max>2500</Max>
    <Step>1</Step>
    <ControlRepresentation>Vertical Slider</ControlRepresentation>
  </processing>

  <processing id="HarmonicPeaksGenerator_0" type="HarmonicPeaksGenerator"/>

  <processing id="Oscilloscope_0" type="Oscilloscope"/>

  <processing id="Oscilloscope_1" type="Oscilloscope"/>

  <processing id="PeakView_0" type="PeakView"/>

  <processing id="PeakView_1" type="PeakView"/>

  <processing id="PeakView_2" type="PeakView"/>

  <processing id="Pitch" type="OutControlSender">
    <Min>55</Min>
    <Default>110</Default>
    <Max>440</Max>
    <Step>1</Step>
    <ControlRepresentation>Vertical Slider</ControlRepresentation>
  </processing>

  <processing id="SMSAnalysisCore_0" 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>
      <prWindowSize>2049</prWindowSize>
      <prWindowType>Hamming</prWindowType>
    </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>
      <prWindowSize>1025</prWindowSize>
      <prWindowType>BlackmanHarris92</prWindowType>
    </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="SMSSynthesis_0" 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>
      <prAnalWindowSize>1025</prAnalWindowSize>
      <prAnalWindowType>BlackmanHarris92</prAnalWindowType>
      <prHopSize>512</prHopSize>
    </SpectralSynth>
    <OverlapAddSin>
      <FrameSize>512</FrameSize>
    </OverlapAddSin>
    <OverlapAddRes>
      <FrameSize>512</FrameSize>
    </OverlapAddRes>
    <OverlapAddGlobal>
      <FrameSize>512</FrameSize>
    </OverlapAddGlobal>
    <prSamplingRate>0</prSamplingRate>
  </processing>

  <processing id="SimpleOscillator_0" type="SimpleOscillator">
    <Frequency>440</Frequency>
    <Amplitude>0</Amplitude>
    <Phase>0</Phase>
    <SamplingRate>44100</SamplingRate>
  </processing>

  <processing id="SpectralAnalysis_0" type="SpectralAnalysis">
    <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>
    <prWindowSize>1025</prWindowSize>
    <prWindowType>BlackmanHarris92</prWindowType>
  </processing>

  <processing id="SpectrumView_0" type="SpectrumView"/>

  <processing id="SpectrumView_1" type="SpectrumView"/>

  <processing id="VowelResonator_0" type="VowelResonator"/>

  <port_connection>
    <out>AudioSource_0.AudioOut</out>
    <in>SMSAnalysisCore_0.Input Audio</in>
  </port_connection>

  <port_connection>
    <out>AudioSource_0.AudioOut</out>
    <in>Oscilloscope_1.Input</in>
  </port_connection>

  <port_connection>
    <out>HarmonicPeaksGenerator_0.Out SpectralPeaks</out>
    <in>PeakView_0.Input</in>
  </port_connection>

  <port_connection>
    <out>HarmonicPeaksGenerator_0.Out SpectralPeaks</out>
    <in>VowelResonator_0.In SpectralPeaks</in>
  </port_connection>

  <port_connection>
    <out>SMSAnalysisCore_0.Sinusoidal Branch Spectrum</out>
    <in>SpectrumView_1.Input</in>
  </port_connection>

  <port_connection>
    <out>SMSAnalysisCore_0.Sinusoidal Peaks</out>
    <in>PeakView_2.Input</in>
  </port_connection>

  <port_connection>
    <out>SMSSynthesis_0.OutputSpectrum</out>
    <in>SpectrumView_0.Input</in>
  </port_connection>

  <port_connection>
    <out>SMSSynthesis_0.OutputAudio</out>
    <in>AudioSink_0.AudioIn</in>
  </port_connection>

  <port_connection>
    <out>SMSSynthesis_0.OutputAudio</out>
    <in>Oscilloscope_0.Input</in>
  </port_connection>

  <port_connection>
    <out>SimpleOscillator_0.Audio Output</out>
    <in>SpectralAnalysis_0.Input</in>
  </port_connection>

  <port_connection>
    <out>SpectralAnalysis_0.Output</out>
    <in>SMSSynthesis_0.InputResSpectrum</in>
  </port_connection>

  <port_connection>
    <out>VowelResonator_0.Out SpectralPeaks</out>
    <in>SMSSynthesis_0.InputSinPeaks</in>
  </port_connection>

  <port_connection>
    <out>VowelResonator_0.Out SpectralPeaks</out>
    <in>PeakView_1.Input</in>
  </port_connection>

  <control_connection>
    <out>F1.out</out>
    <in>VowelResonator_0.F1</in>
  </control_connection>

  <control_connection>
    <out>F2.out</out>
    <in>VowelResonator_0.F2</in>
  </control_connection>

  <control_connection>
    <out>Pitch.out</out>
    <in>HarmonicPeaksGenerator_0.Fundamental</in>
  </control_connection>

</network>


More information about the clam-devel mailing list