Skip to content

ahenkidentifier v1.4.0

Compare
Choose a tag to compare
@sertansenturk sertansenturk released this 19 Apr 10:39
· 18 commits to master since this release

ahenkidentifier

Identifies the ahenk (transposition) of a makam music recording given the tonic frequency and the symbol (or the makam)

Usage

from ahenkidentifier.ahenkidentifier import AhenkIdentifier

ahenk = AhenkIdentifier.identify(tonic_freq, makam)
# or 
ahenk = AhenkIdentifier.identify(tonic_freq, tonic_symbol)

The inputs are:

# tonic_freq        :   The frequency of the tonic in Hz.
# makam/tonic_symbol:   The algorithm can either accept the makam-slug or 
#                       the note symbol of the tonic in SymbTr format as a string (e.g. B4b1).

For the makam-slug names, check the json file in the data folder. The slugs are the same with the ones in the filenames of the scores in the SymbTr collection. The tonic symbols are notated as [Note pitch-class][Octave](Accidental Symbol(Holderian Comma)), e.g. B4b1

The output is:

# ahenk           : The name of the ahenk as a unicode string and a dictionary of computed stats

Please refer to demo.ipynb for an interactive demo.

Installation

If you want to install ahenkidentifier, 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 repository like this instead:

pip install -e .

Changelog

  • Added more unittests
  • Code coverage integration
  • Code climate integration

Issues

The "Bolahenk Nısfiye" ahenk, which is an octave higher than the default ahenk ("Bolahenk"), is omitted. In solo performances, automatic identification of this ahenk requires the frequency range of the instrument being performed. Moreover, it is ambiguous to distinguish it from "Bolahenk" in multi-instrument recordings.

Authors

Sertan Şentürk
contact@sertansenturk.com

Reference

Thesis