---
title: TarsosDSP Pitch Estimation Synthesizer
canonical: https://0110.be/posts/TarsosDSP_Pitch_Estimation_Synthesizer
markdown_url: https://0110.be/posts/TarsosDSP_Pitch_Estimation_Synthesizer.md
id: 359
published_at: '2012-12-19T15:07:10Z'
updated_at: '2013-12-05T18:19:15Z'
author: Joren
tags:
- name: HoGent
  markdown_url: https://0110.be/tags/HoGent.md
- name: Java
  markdown_url: https://0110.be/tags/Java.md
- name: TarsosDSP
  markdown_url: https://0110.be/tags/TarsosDSP.md
---

# TarsosDSP Pitch Estimation Synthesizer

The DSP library for Taros, aptly named TarsosDSP, now includes an example showing how to synthesize pitch estimations. The goal of the example is to show which errors are made by different pitch detectors.

<div align="center">
<a href="https://0110.be/releases/TarsosDSP/TarsosDSP-latest/TarsosDSP-latest-Examples/Resynthesizer-latest.jar"><img src="https://0110.be/files/attachments/359/Pitch_Estimation_Synthesizer.png" alt="Pitch estimation synthesizer"/></a>

</div>
To test the application, download and execute the [Resynthesizer.jar](http://tarsos.0110.be/releases/TarsosDSP/TarsosDSP-latest/TarsosDSP-latest-Examples/Resynthesizer-latest.jar) file and load an audio file. For the moment only 44.1kHz mono wav is allowed. To hear what exactly it does, compare the following two audio fragments:

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F71830992">
</iframe>
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F71831213">
</iframe>
There is also a command line interface, the following command does pitch tracking, and follows the envelope of `in.wav` and immediately plays it on the default audio device. If you want to save the audio, see the command line options. The "flute example":\[flute.wav\] is provided for your convenience.

<code>\
java -jar Resynthesizer-latest.jar in.wav\
</code>

     _______                       _____   _____ _____  
    |__   __|                     |  __ \ / ____|  __ \ 
       | | __ _ _ __ ___  ___  ___| |  | | (___ | |__) |
       | |/ _` | '__/ __|/ _ \/ __| |  | |\___ \|  ___/ 
       | | (_| | |  \__ \ (_) \__ \ |__| |____) | |     
       |_|\__,_|_|  |___/\___/|___/_____/|_____/|_|     

    ----------------------------------------------------
    Name:
        TarsosDSP resynthesizer
    ----------------------------------------------------
    Synopsis:
        java -jar CommandLineResynthesizer.jar [--detector DETECTOR] [--output out.wav] [--combined combined.wav] input.wav
    ----------------------------------------------------
    Description:
        Extracts pitch and loudnes from audio and resynthesises the audio with that information.
        The result is either played back our written in an output file. 
        There is als an option to combine source and synthezized material
        in the left and right channels of a stereo audio file.

        input.wav       a readable wav file.

        --output out.wav        a writable file.

        --combined combined.wav     a writable output file. One channel original, other synthesized.
        --detector DETECTOR defaults to FFT_YIN or one of these:
                    YIN
                    MPM
                    FFT_YIN
                    DYNAMIC_WAVELET
                    AMDF

The source code of the Java implementation of the synthesizer can be found on the [TarsosDSP github page](https://github.com/JorenSix/TarsosDSP).


- [Pitch\_Estimation\_Synthesizer.png](https://0110.be/files/attachments/359/Pitch_Estimation_Synthesizer.png)

- [flute.wav](https://0110.be/files/attachments/359/flute.wav)
