Giter VIP home page Giter VIP logo

pitchfilter's Introduction

pitchfilter

Repository for post-processing pitch tracks to filter erroneous estimations and correct octave errors.

Introduction

This repository implements the post-filtering methodology explained in Bozkurt, B. (2008).

Given a pitch track, the algorithm:

  • corrects octave errors
  • removes noisy regions
  • removes small chunks
  • removes extremely high or low pitch estimations

Usage

The method accepts numpy arrays, where the first column holds the time stamps (in seconds), the second column holds the frequencies (in Hz) and the third column holds the pitch saliences/confidence.

In the following example, the algorithm filters the pitch track of feda89e3-a50d-4ff8-87d4-c1e531cc1233 extracted using Predominant Melody Extractor repository.

import json
from pitchfilter.pitchfilter import PitchFilter
import numpy

# reading extracted pitch from json
pitch = numpy.array(json.load(open("sample_data/feda89e3-a50d-4ff8-87d4-c1e531cc1233.json", 'r'))['pitch'])

# filtering the extracted pitch
flt = PitchFilter()
pitch_filt = flt.run(pitch)

Installation

If you want to install pitchfilter, it is recommended to install the repository and its dependencies into a virtualenv.

In the terminal, do the following:

virtualenv env
source env/bin/activate
python setup.py install

If you want to be able to edit files and have the changes be reflected, then install the package like this instead:

pip install -e .

Authors

Hasan Sercan Atlı [email protected]
Sertan Şentürk [email protected]

References

Bozkurt, B. (2008). An automatic pitch analysis method for turkish maqam music. Journal of New Music Research, 37(1), 1-13.

pitchfilter's People

Contributors

hsercanatli avatar sertansenturk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pitchfilter's Issues

Rewrite the for loops with numpy equivalent

Currently the code turns the pitch track and the chunks in many for loops. Since we work on numpy arrays, things can be simplified and made faster using matrix manipulations.

Moreover a lot of the samples are appended using the python built-in, breaking the array structure to list of numpy arrays. We should also change the appends, to numpy equivalent so we can always return the arrays intact.

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.