Code Monkey home page Code Monkey logo

estimate-f0-inharmonicity's Introduction

estimate-f0-inharmonicity

Estimate the fundamental frequency F0 and inharmonicity coefficient B of an isolated piano note

The code implements the estimation approach in

F. Rigaud, B. David, and L. Daudet, 
“A parametric model and estimation techniques for the inharmonicity and tuning of the piano” ,
The Journal of the Acoustical Society of America, vol. 133, no. 5, pp. 3017–3118, 2013.

The paper describes a robust new algorithm based on the Non-negative Matrix Factorization (NMF) frameworks in order to finely estimate (F0,B) from isolated notes.

How to run

  1. Clone the directory
 $ git clone https://github.com/beiciliang/estimate-f0-inharmonicity.git
  1. Install the requirements using pip
$ cd estimate-f0-inharmonicity
$ pip install --user -r requirements.txt
  1. Run the python file
$ python estimate-f0-inharmonicity.py [your path containing .wav file of an isolated piano note] [The midi number of the note in the given wav file]

using the data provided in this repo as an example:

$ python estimate-f0-inharmonicity.py ./data/IS-v96-m60.wav 60 

it will return:

For note MIDI-No.60:
the estimated fundamental frequency is 262.399515937
the estimated inharmonicity coefficient is 0.000326411619295

The source code could also calculate the first 30th partials and their amplitude based on the estimated (F0,B). Feel free to use it if it's useful for your piano-related projects.

P.S. A matlab implementation is provided at Tian Cheng's soundsoftware repository.

estimate-f0-inharmonicity's People

Contributors

beiciliang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

estimate-f0-inharmonicity's Issues

If I just want the F0?

Dear,

Thanks to your project.

But I have a question, the wav file you proposed is an isolated piano note,
and what does the midiNum mean?
The midi number of the note in the given wav file

Just a note in the wav, how many midi number? Not should be one? Why is 60?
Can't understand.

Could U help me, please ?
Thx

WIndow function

Why have you decided to use an hamming window instead of hanning, which is supposed be the better choice on a signal which consists of several sinoids?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.