Turkish Makam Database

2016-04-28
The makamu.zip and makamu*.abc files have been regenerated. The source code has been updated.

2016-04-29
The utf-8 encoded abc files are based on the *.txt files in the SymbTr v2.4 database upgraded by Sertan Senturk.

2015-09-04 13:30 The commaA-E.fmt file is now embedded in the header of each file. If your program automatically loads the header before calling abcm2ps then you do not need load the format file commaA-E.fmt

The composer field C: has been preserved. It is unlikely that any of these tunes are still protected under copyrights since almost all the composers have been dead for more than 70 years. A list of the composers and their time of death may be downloaded here.

The collection makamu.abc has been split into 22 separate files.

If the abc files do not look right under Windows, open them using WordPad (see accessories in your start button) and save them under the same file names.

Downloadable files

You can down load the entire collection of 2200 makams in one zip file.
The file has also been split into the following 22 abc files.
makamu0.abc makamu1.abc makamu2.abc makamu3.abc
makamu4.abc makamu5.abc makamu6.abc makamu7.abc
makamu8.abc makamu9.abc makamu10.abc makamu11.abc
makamu12.abc makamu13.abc makamu14.abc makamu15.abc
makamu16.abc makamu17.abc makamu18.abc makamu19.abc
makamu20.abc makamu21.abc

you may need one of these files. comma53.fmt commaA-E.fmt

The following makext.tcl is a useful extension for viewing and organizing this collection if you use runabc.tcl. See below for details.

You probably do not need source code

Examples

Here are a bunch of examples of some makams in this collection. Click on midi, pdf, or youtube. The midi and pdf files were created from the abc representations.

Acemasiran Pesrev pdf midi youtube
Ruhumda Derin pdf midi youtube
Su Daglari Delmeli pdf midi youtube youtube
Kopruden Gecti Gelin pdf midi youtube youtube

Instructions

The files work correctly on Runabc, EasyAbc, and AbcExplorer. See Runabc, AbcMIDI and EasyAbc for instructions in getting these programs. The web site for ABCexplorer is here.

Pitfalls

Eol convention

If the abc files look like the following image when you open it with your editor,
notepad view
this is because the files were produced in a Linux operating system. The files are still readable by most abc software; however, you may want to change the end of line convention to dos format. On Windows, just open the file using WordPad (which comes with the system in the accessories) and save it under the same file name.

Character Encoder

The files are encoded in utf-8 character encoding scheme in order to display the Turkish characters. The names of the tunes should appear as
utf-8

and not like

ascii

If the font is not correct, it is necessary to indicate to your program to use the utf-8 encoding scheme. If you are using runabc.tcl, the encoding scheme is one of the submenu options under the wrench icon.

Special Accidentals

When you try to display a particular tune, the program may fail, hang, or display nothing. If you are lucky, you may see a message from ghostscript like

Error: /undefined in ft259
Explanation: abcm2ps produces special codes like ft259 in the PostScript file in order to display the unusual accidentals in the key signature and in the body of the music. The instructions on how to display these symbols need to be embedded into the PostScript file. There are several solutions. If you paste,
I:abc-charset utf-8
%%beginps
/micronewps {1}
/sbar {M -3.0 4.0 rmoveto 4.0 4.3 rlineto stroke}!
/hbar {M -3.0 -1.0 rmoveto 6.0 1.5 rlineto stroke}!
/num2 {M 2.0 6.0 rmoveto /Times-Roman 10 selectfont (2) show}!
/num3 {M 4.0 6.0 rmoveto /Times-Roman 10 selectfont (3) show}!
/ft1543  {2 copy ft0 sbar}! %_7/8
/ft515 {ft1543}! %_3/4
/ft3{gsave -1 1 scale exch neg exch ft0 grestore}!
/ft259 {2 copy ft3}! %_2/4
/sh3 {2 copy sh1}! %_1/4
/sh259 {2 copy sh1}! %^2/4
/sh515 { 2 copy sh0}! %^3/4
/sh2055 {2 copy sh1 hbar}! % ^9/8
%%endps
in the beginning of the input file, abcm2ps should create a proper PostScript file.

Alternatively, ensure that abcm2ps runs with the format file comma53.fmt (or commaA-E.fmt). For example,

abcm2ps -f comma53.fmt myabcfile.abc

Explanation

This collection is an abc translation of the compilation produced by K. Karaosmanoglu and recenty upgraded by Sertan Senturk for research purposes -- see A Turkish Makam Music Symbolic Database for Music Information Retrieval:SymbTr by K. Karaosmanoglu.

Also see Dunya Makam discover and analyze Turkish makam music with CompMusic technologies.

Unlike western music, the notes in the scales do not correspond to equal tempered scales of typical instruments. Here an octave is divided into 17 or 24 divisions. A makam refers to a particular mode which uses a specific subset of these notes of the octave. Just like Western music has various modes like major, minor, dorian, and etc., Turkish classical music has many different modes or makams. The modes give the music a distinctive arabic flavour; for example click Geldik Gidiyoruz to hear the rendition produced by the computer.

The database of 2200 tunes in SymbTr format, MIDI format and PDF format is publicly available from the site SymbTr v2.2. I am grateful to the authors, Kemal and Sertan, for providing me with the latest version, assistance and other files needed to interpret this database.

Each of the tunes in the SymbTr data base is in a separate file with a long name similar to saba--sarki--agiraksak--camlar_altinda--bimen_sen.txt. The double dashes separate the file name into 5 fields. They are makam, form, usul, title, and composer respectively. Makam corresponds to the mode in western music (eg. major, minor, dorian, etc.); there is generally a specific key signature associated with the makam in this set. There are approximately 200 different makam types in this collection. The second field, form, distinguishes vocal, instrumental, religious, long melody and other forms. There are at least 50 form types distinguished in this collection. The third field, usul refers to the time signature, rhythm and placement of beats in the music. Over 150 usuls are distinguished. The title and composer fields are often abbreviated in the file name.

The production of the abc files, introduced several new challenges. In order to produce the music scores in PostScript and SVG format, it was necessary to define the special symbols used to define the altered notes. These commands appear in the header of each abc file. If your software does not automatically transfer this header information to abcm2ps then you will need to tell abcm2ps to load one of the format files comma53.fmt or commaAE.fmt using the -F runtime option.

In order to hear the music at the pitches the MIDI notes has to be altered using the MIDI pitchbend command. The program abc2midi was adapted to handle the comma53 tuning system and a special MIDI tuningsystem command is embedded in each of the tunes. Ensure that your version of abc2midi is dated February 2014 or later.

To preserve the pitch resolution of the music, the notes were encoded in the comma53 notation in the database. Turkish makams are a form of classical Turkish folk music. The database classifies the music by form, rhythm (usuls), and mode (makam). The music is highly microtonal.

If you are using my program runabc as a user interface to the abcmidi and abcm2ps programs, you should check the option 'use ps header' which is found in the Options menu (wrench icon). Furthermore you should set the character encoding (in the Options menu) to UTF-8. The files also display and play correctly using EasyAbc.

There is already quite a lot of online information about Turkish makams -- Wikipedia is a good source. There are also many YouTube videos of performances of this music. This note is therefore confined to the particularities of this database.

The abc files are a translation of the contents of the *.txt files in the SymbTr database. I shall not repeat the description of this format which has been published in the paper in a recent publication A Turkish Makam Music Symbolic Database for Music Information Retrieval:SymbTr by K. Karaosmano─člu. The files are somewhat similar to MIDI files in the sense that all repeats have already been expanded and there are no dynamic markings. On the other hand, the files contain a lot of additional information such as different note representations, and bar number positional information. The latest version of the data set can be found on MTG/SymbTr.

Abc music notation allows the representation of fractional pitch tones or microtones using a notation which looks like ^2/5C1/2 or _5/7B or something similar. The number following the sharp symbol '^' or the flat symbol '_' indicates the size of accidental relative to the semitone interval. In the first example, the half note middle C is sharpened by 2/5'ths of a semitone. Abc2midi uses the MIDI pitchbend command to modify the pitch.

The notes are represented in the database in comma53 notation. This scale divides an octave into 53 equal intervals. The pitch is essentially given by a number which ranges from zero to 53 times the highest octave number. In some ways this is similar to the MIDI representation where each semitone is given a number, but here an octave is split into a finer scale as illustrated in the figure below.

comma graph

Except for C, there is no exact correspond between the comma53 notes and the 12 tone equal tempered scale. Each comma unit is exactly 12/53 semitone units wide; therefore it is possible to represent a tune exactly in ABC notation using the microtone fractions -- for example.

C4 ^2/53D4 ^2/53D4 ^4/53E2_1/53F2  | \
^4/53E2^2/53D2 C2^2/53D2 C4 _19/53B4  | 
^48/53C2^2/53D2 ^4/53E2_1/53F2 ^4/53E2^2/53D2 ^2/53D2^4/53E2  | \
^2/53D3^48/53C ^5/53B2^48/53C2 ^2/53D8  | 
This representation unfortunately poses many problems. First it is difficult to decipher and almost impossible to edit. Secondly, in order to convert the music into a score using abcm2ps one requires instructions on how to present each of the 52 microtones.

If an octave was divided into 48 comma units, then each semitone would be split into 4 eigth-tones and the equal tempered notes, C,C#,D etc. would fall exactly on a specific comma48. However, comma53 divides an octave in 48 + 5 units. Thus some 7 notes enclose 4 comma53 units and another 5 notes enclose 5 comma53 units. It turns out, that only the black notes on the keyboard enclose 5 comma53 units. There are always two neighbouring comma53 for each of the flat or sharp notes. Thus A# and Bb have separate comma53 values and the same applies to the other sharps or flats. Using these observations, one could set up a more transparent mapping of the comma53 notes to the abc notation using ^1/4, ^2/4, etc. as symbols rather than actual pitch offsets. A simple function in abc2midi was implemented to perform the conversions of this representation to comma53 values and MIDI pitch bends. The command "%%MIDI tuningsystem comma53" tells abc2midi to interpret the microtone symbols into comma53. Further details of this mapping are given in the abc2midi guide. (Select 'Tuning System'.)

There were several issues regarding the conversion of the abc representation to PostScript or SVG files. First abcm2ps does not have all the microtone symbols built-in the program and it was necessary to specify these symbols in an external file written in PostScript language (comma53.fmt). This information can also be placed in the head of the abc file. Fortunately abcm2ps is able to translate these definitions to SVG notation so the same format file can be used for SVG output.

To complicate matters more, Turkish music is commonly presented using the Arel - Ezgel (AE) scale. This scale does not distinguish the certain pitches in the comma53 scale. This eliminates the numeric superscripts in the accidental markings. If you link abcm2ps with the commaA-E.fmt file instead of the comma53.fmt, the music should appear in its traditional form. This does not effect how the music is converted to MIDI files.

A runabc extension was developed for sorting and separating the tunes by one of makam, form and usul designators. If you have the latest version of runabc, this extension, makext.tcl, can loaded using the 'Options /load runabc extension' and selecting makext.tcl. The following images show the differences between the two interfaces.

standard runabc

Standard runabc user interface.

runabc makam extension

Runabc with the special makext extension. Clicking on any of the headings (makam, form, usul, meter, key etc.) will sort all the entries in alphabetical order for that column. In this figure, they are sorted by usul.

The database is still under development and a few inconsistencies in the time signature indications and the bar line placements were found for a few of the tunes.