We use a recording of Tanburi Cemil Bey's Muhayyer Peşrev, performed by Salih Bilgin. The musician is blowing a mansur ney, and hence performs in Mansur ahenk.

The tonic is computed earlier using a score-informed tonic identification method.

For the makam-slug names, check the json file in the data folder. The slugs are the same with the ones in the SymbTr filenames.


In [1]:
import os
import json
import pprint
from ahenkidentifier.ahenkidentifier import AhenkIdentifier

In [2]:
tonicfile = os.path.join('example', 'tonic.json')
tonic = json.load(open(tonicfile, 'r'))
tonicfreq = tonic['scoreInformed']['Value']

makam = 'muhayyer'

In [3]:
ahenk = AhenkIdentifier.identify(tonicfreq, makam)
pprint.pprint(ahenk)


{'abs_deviation': {'unit': 'cent', 'value': 22.516513885620157},
 'deviation': {'unit': 'cent', 'value': -22.516513885620157},
 'distance_to_bolahenk': {'performed': {'unit': 'cent',
                                        'value': 522.5165138856202},
                          'theoretical': {'unit': 'cent', 'value': 500}},
 'makam': 'muhayyer',
 'name': u'Mansur',
 'slug': u'mansur',
 'tonic_symbol': u'A4'}