Skip to content

tonicidentifier_makam v1.2.1

Compare
Choose a tag to compare
@sertansenturk sertansenturk released this 16 Mar 19:27
· 18 commits to master since this release

tonicidentifier_makam

An Automatic Tonic Identification Method for Turkish Makam Music Recordings

Introduction

This repository hosts the implementation of the tonic identification method proposed for makam music in:

Atlı, H. S., Bozkurt B., and Şentürk S. (2015). A method for tonic frequency identification of Turkish makam music recordings. 5th International Workshop on Folk Music Analysis (FMA).

If you are using this identifier please cite the above paper.

Tonic is the final tone in the Turkish makam music performances. The methodology implemented in this repository is based on detecting the last note in the recording and estimating its frequency.

Usage

import json
from tonicidentifier.TonicLastNote import TonicLastNote
from pitchfilter.PitchFilter import PitchFilter

pitch = json.load(open("sample_data/cab08727-d5c2-4fda-9d96-d107915a85ec.json", 'r'))['pitch']

# Post process the pitch track to get rid of spurious pitch estimations and correct octave errors
flt = PitchFilter()
pitch = flt.run(pitch)

tonic_identifier = TonicLastNote()
tonic, pitch_sliced, pitch_chunks, distribution, stable_pitches = tonic_identifier.identify(pitch)
print tonic

Please refer to demo.ipynb for an interactive demo.

Installation

If you want to install the repository, it is recommended to install the package and 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 repo like this instead

pip install -e .

The algorithm uses some modules in Essentia. Follow the instructions to install the library. Then you should link the python bindings of Essentia in the virtual encironment:

ln -s /usr/local/lib/python2.7/dist-packages/essentia env/lib/python2.7/site-packages

Then you can install the rest of the dependencies:

pip install -r requirements

Changelog

  • Minor fix where the returned pitch distribution with hz bins had a erroneous frequency reference (it should be None)

Authors

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