Representative Examples
These examples have been carefully selected to demonstrate the full capabilities of the API while respecting the cultural and historical significance of Arabic maqām theory.
Quick test URL:
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents"Quick Access
Jump to specific example categories:
Representative Tuning Systems - Historical and contemporary tuning systems
- al-Kindī (874) - 12-Tone
- al-Fārābī (950g) - First Oud Tuning 27-Tone
- Ibn Sīnā (1037) - 7-Fret Oud 17-Tone
- Meshshāqa (1899) - Arabic Octave According to the Modernists
- Cairo Congress Tuning Committee (1929) - Egyptian Tuning
- al-Ṣabbāgh (1954) - Contemporary Arabic Tuning 24-Tone
Representative Ajnās - Tri/tetra/penta-chords
- With zalzalian intervals: jins rāst, jins bayyāt, jins segāh, jins ṣabā
- Without zalzalian intervals: jins nikrīz, jins kurd, jins nahāwand, jins ḥijāz
Representative Maqāmāt - Complete modal frameworks
- Principle maqāmāt: maqām rāst, maqām bayyāt, maqām ḥijāz
- Complex and transposed: rāḥat al-arwāḥ, maqām bestenegar
- Without zalzalian intervals: maqām kurd, maqām āthār kurd, maqām dilkesh ḥūrān
⚠️ Critical Requirements
REQUIRED Parameters for Detail Endpoints:
All detail endpoints (/api/maqamat/{id}, /api/ajnas/{id}) MUST include these three parameters:
tuningSystem- ID of the tuning system (e.g.,ibnsina_1037)startingNote- Starting note in URL-safe format (e.g.,yegah,ushayran,rast)pitchClassDataType- Format for pitch class data (e.g.,cents,fraction,all)
Why these are required:
- Pitch class calculations depend on the tuning system and starting note
- The API needs to know which format to return the data in
- Without these parameters, the API cannot calculate or return pitch class data
Example - CORRECT:
GET /api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=centsExample - WRONG (missing parameters):
GET /api/maqamat/maqam_rast # ❌ Missing required parameters
GET /api/maqamat/rast # ❌ Wrong endpoint format AND missing parameters❌ Common Mistakes to Avoid
1. Missing Required Parameters
WRONG:
GET /api/maqamat/maqam_rast
GET /api/ajnas/jins_rastCORRECT:
GET /api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents
GET /api/ajnas/jins_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents2. Wrong Endpoint Format
WRONG:
GET /api/maqamat/rast # Missing "maqam_" prefix
GET /api/ajnas/rast # Missing "jins_" prefixCORRECT:
GET /api/maqamat/maqam_rast # Includes "maqam_" prefix
GET /api/ajnas/jins_rast # Includes "jins_" prefix3. Using Display Names Instead of URL-Safe IDs
WRONG:
GET /api/maqamat/maqam_rast?tuningSystem=Ibn Sīnā (1037)&startingNote=yegāhCORRECT:
GET /api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegahNote: All IDs and parameter values must be URL-safe (no spaces, diacritics, or special characters).
4. Parameter Discovery
If you need to discover available parameters, use options=true:
GET /api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&options=trueThis returns available parameters instead of data, which is useful for programmatic discovery.
🤖 For LLMs and AI Assistants
Explicit Instructions for AI Systems:
- Always include required parameters (
tuningSystem,startingNote,pitchClassDataType) for detail endpoints - Use Representative Examples (this page) as the source of truth for correct API usage
- Reference the OpenAPI specification at
/docs/openapi.jsonfor complete parameter documentation - Use parameter discovery (
options=true) to programmatically discover available parameters
Example Parameter Discovery Request:
GET /api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&options=trueResponse includes:
- Available tuning systems for this maqām
- Available starting notes for each tuning system
- Available pitch class data types
- All other optional parameters
Example options=true response (maqām rāst, ibnsina_1037, yegah):
{
"maqam": "maqām rāst",
"tuningSystem": "ibnsina_1037",
"availableParameters": {
"tuningSystem": {
"required": true,
"description": "ID of tuning system (see /availability for options)"
},
"startingNote": {
"options": ["ushayran", "yegah"],
"required": true,
"description": "Theoretical framework for note naming (URL-safe, diacritics-insensitive)."
},
"pitchClassDataType": {
"options": ["all", "englishName", "fraction", "cents", "decimalRatio", "stringLength", "frequency", "abjadName", "fretDivision", "midiNoteNumber", "midiNoteDeviation", "centsDeviation", "referenceNoteName"],
"required": true,
"description": "Output format for pitch data."
},
"transposeTo": {
"options": ["rast", "qarar_rast", "qarar_chahargah", "chahargah", "kurdan", "mahuran"],
"description": "Transpose to specific tonic (taṣwīr)."
},
"intervals": { "type": "boolean", "default": false },
"includeModulations": { "type": "boolean", "default": false },
"includeSuyur": { "type": "boolean", "default": false }
},
"notes": {
"ajnasData": "Ajnās are always included in maqām responses",
"formatOptions": "Use 'all' for complete pitch class information."
},
"examples": [
"/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=ushayran&pitchClassDataType=cents&includeIntervals=true",
"/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=ushayran&pitchClassDataType=cents&transposeTo=nawa&includeModulations=true"
]
}Best Practice:
- When users ask about a specific maqām, jins, or tuning system, use the Representative Examples to find the correct endpoint format
- Always include all three required parameters
- Use
centsas the defaultpitchClassDataTypefor most use cases - For users who don't know specific names, use
maqam_rastwithibnsina_1037andyegahas safe defaults - For valid
filterByFamilyvalues, useGET /api/maqamat/families?tuningSystem=ibnsina_1037&startingNote=yegah
📋 Actual Response Structure
API responses are complex nested structures, not simple arrays. A typical response includes:
Key Response Fields:
maqam/jins- Entity metadata (id, idName, displayName, version, etc.)pitchData- Pitch class data in ascending/descending arraysintervals- Interval data (ifincludeIntervals=true)context- Tuning system context, starting note info, reference frequenciessources- Bibliographic source referenceslinks- Related API endpoint URLsstats- Statistics (number of pitch classes, etc.)characteristics- Musical characteristics (isOctaveRepeating, hasAsymmetricDescending, etc.)
Minimal Example Response:
{
"maqam": {
"id": "maqam_rast",
"idName": "maqam_rast",
"displayName": "maqām rāst",
"version": "2025-10-18T19:42:23.643Z"
},
"pitchData": {
"ascending": [
{ "cents": 0, "englishName": "yegāh", ... },
{ "cents": 204, "englishName": "ʿushayrān", ... },
...
],
"descending": [...]
},
"context": {
"tuningSystem": {
"id": "ibnsina_1037",
"displayName": "Ibn Sīnā (1037) - 7-Fret Oud 17-Tone",
"selectedStartingNote": { "idName": "yegah", "displayName": "yegāh" },
"referenceFrequency": 97.999
},
"pitchClassDataType": "cents"
},
"sources": [...],
"links": {...}
}For complete response schemas, see the OpenAPI Specification.
Representative Tuning Systems
al-Kindī (874) - alkindi_874
Title: 12-Tone Starting Note: ʿushayrān - ushayran
Description: One of the oldest tuning systems documented in Arabic music theory. It is a 12-tone chromatic tuning system based on Greek theory and doesn't include the quintessential so-called Arabic "quarter tone" pitch classes ʿirāq, nīm zīrgūleh, segāh, nīm ḥijāz, or awj, also referred to as zalzalian intervals. It can only render ajnās and maqāmāt that don't use those notes such as kurd, nahāwand, nikrīz and ʿajam ʿushayrān.
Source: Farmer (1937:248), Forster (2010:615)
Required Parameters:
tuningSystem:alkindi_874startingNote:ushayranpitchClassDataType:cents(orfraction,all, etc.)
Example:
GET /api/tuning-systems/alkindi_874/ushayran/pitch-classes?pitchClassDataType=centsGood for testing:
- Ajnās without zalzalian intervals:
jins_kurd,jins_nahawand,jins_nikriz - Maqāmāt without zalzalian intervals:
maqam_kurd,maqam_nahawand
al-Fārābī (950g) - alfarabi_950g
Title: First Oud Tuning (Full First Octave) 27-Tone Starting Note: ʿushayrān - ushayran
Description: The first documentation of the wuṣtā zalzal interval, the so-called Arabic "quarter tone" using a frequency ratio of 27/22. It is a comprehensive 27-tone tuning system that allows for many ajnās and maqāmāt and their transpositions, therefore also modulations.
Source: Farmer (1937:249), Land (1885:134-137), d'Erlanger (1930:165-185)
Example:
GET /api/tuning-systems/alfarabi_950g/ushayran/pitch-classes?pitchClassDataType=centsGood for testing:
- Comprehensive ajnās and maqāmāt coverage
- Zalzalian intervals
- Historical comparison studies
Ibn Sīnā (1037) - ibnsina_1037
Title: 7-Fret Oud 17-Tone Starting Note: yegāh - yegah
Description: An excellent concise and precise 17-tone tuning that allows for a wide range of ajnās and maqāmāt and their transpositions. Includes the wuṣtā zalzal interval with the frequency ratio of 39/32.
Source: Farmer (1937:249)
Example:
GET /api/tuning-systems/ibnsina_1037/yegah/pitch-classes?pitchClassDataType=centsGood for testing:
- All primary maqāmāt:
maqam_rast,maqam_bayyat,maqam_hijaz - All primary ajnās:
jins_rast,jins_bayyat,jins_hijaz - Transpositions and modulations
Meshshāqa (1899) - meshshaqa_1899
Title: Arabic Octave According to the Modernists Starting Note: yegāh - yegah
Description: The first documented tuning system that is based on literal quarter tones, 24 equal divisions of the octave. Defined by Meshshāqa as the "Arabic Octave According to the Modernists", meaning that it was already known before him but undocumented - though no one knows if it was really used. Because it is 24 equal divisions of the octave it allows for many ajnās and maqāmāt and their transpositions, therefore also modulations. Even though it allows the same number of maqāmāt as Ibn Sīnā's tuning system, it allows for more transpositions.
Source: Meshshāqa (1899:18)
Example:
GET /api/tuning-systems/meshshaqa_1899/yegah/pitch-classes?pitchClassDataType=centsGood for testing:
- Modern equal-division approach
- Comparison with historical unequal systems
- All maqāmāt and ajnās
- Extended transposition capabilities
Cairo Congress Tuning Committee (1929) - cairocongresstuningcommittee_1929
Title: Egyptian Tuning Starting Note: rāst - rast
Description: The tuning system researched, measured and prepared in preparation for the 1932 Cairo Congress of Arabic Music. It is referred to as an "Egyptian Tuning" and is an unequal 24-tone system. Also comprehensive in its maqām availability and was rendered based on the measurement and expertise of Egyptian musicians at the time.
Source: Shawqi (1969:48-49), na. (1933:336), Allāh-Wīrdī (1949:80)
Example:
GET /api/tuning-systems/cairocongresstuningcommittee_1929/rast/pitch-classes?pitchClassDataType=centsGood for testing:
- Egyptian performance practice
- 20th-century documentation standards
- Unequal divisions vs. equal divisions
al-Ṣabbāgh (1954) - alsabbagh_1954
Title: Contemporary Arabic Tuning 24-Tone Starting Note: rāst - rast
Description: The only documented theorisation of an Arabic tuning system that exclusively uses the "comma" (syntonic comma of 81/80) as a basis for its construction. It is an unequal 24-tone system and allows for many maqāmāt and ajnās but with limited transpositions.
Source: al-Ṣabbāgh (1954:47)
Example:
GET /api/tuning-systems/alsabbagh_1954/rast/pitch-classes?pitchClassDataType=centsGood for testing:
- Acoustic purity approaches
- Limited transposition scenarios
- Theoretical vs. practical systems
Representative Ajnās
Ajnās with zalzalian intervals (ʿirāq, nīm zīrgūleh, segāh, nīm ḥijāz, or awj):
jins rāst - jins_rast
Description: Includes the zalzalian interval segāh.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Required Parameters:
tuningSystem:ibnsina_1037,alfarabi_950g,meshshaqa_1899, orcairocongresstuningcommittee_1929startingNote:yegah(for IbnSina, Meshshaqa),ushayran(for al-Farabi), orrast(for CairoCongress)pitchClassDataType:cents(orfraction,all, etc.)
Example:
GET /api/ajnas/jins_rast?tuningSystem=meshshaqa_1899&startingNote=yegah&pitchClassDataType=centsjins bayyāt - jins_bayyat
Description: Includes the zalzalian interval segāh.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_bayyat?tuningSystem=cairocongresstuningcommittee_1929&startingNote=rast&pitchClassDataType=centsjins segāh - jins_segah
Description: Its tonic is the zalzalian interval segāh.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_segah?tuningSystem=alsabbagh_1954&startingNote=rast&pitchClassDataType=centsjins ṣabā - jins_saba
Description: Includes the zalzalian interval segāh.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: al-Khulʿī (2011:55), al-Urmawī-al-Baghdādī (2017:23)
Example:
GET /api/ajnas/jins_saba?tuningSystem=meshshaqa_1899&startingNote=yegah&pitchClassDataType=centsAjnās without zalzalian intervals:
jins nikrīz - jins_nikriz
Description: Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_nikriz?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsjins kurd - jins_kurd
Description: Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_kurd?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsjins kurd (binsir) - jins_kurd_(binsir)
Description: The same as jins kurd but starting on a different tonic, giving it slightly different intervals. Interesting for comparison and understanding why the maqām based on it (maqām ḥijāz kār kurd) is supposedly a transposition of maqām kurd with the same intervals, but in fact is not. Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_kurd_(binsir)?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsjins nahāwand - jins_nahawand
Description: Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_nahawand?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsjins ḥijāz - jins_hijaz
Description: Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran or ibnsina_1037 on yegah.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_hijaz?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=centsjins ḥijāz (binsir) - jins_hijaz_(binsir)
Description: The same as jins ḥijāz but starting on a different tonic, giving it slightly different intervals. Interesting for comparison. Does not include a zalzalian interval.
Tuning System: alkindi_874 on ushayran or ibnsina_1037 on yegah.
Source: (No source references in data)
Example:
GET /api/ajnas/jins_hijaz_(binsir)?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=centsRepresentative Maqāmāt
Principle maqāmāt - fundamental and archetypal:
maqām rāst - maqam_rast
Description: One of the principle and archetypal Arabic maqāmāt. Prominently used in Egypt across both popular and religious sufi musics. Includes the zalzalian intervals segāh and awj in its ascending form.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Required Parameters:
tuningSystem:ibnsina_1037,alfarabi_950g,meshshaqa_1899, orcairocongresstuningcommittee_1929startingNote:yegah(for IbnSina, Meshshaqa),ushayran(for al-Farabi), orrast(for CairoCongress)pitchClassDataType:cents(orfraction,all, etc.)
Example:
GET /api/maqamat/maqam_rast?tuningSystem=cairocongresstuningcommittee_1929&startingNote=rast&pitchClassDataType=centsmaqām bayyāt - maqam_bayyat
Description: Also a principle and archetypal Arabic maqām, that is used widely in popular and rural musics across the Arabic speaking region and beyond. It is the base maqām for many variations in Arabic repertoire and beyond. Includes the zalzalian interval segāh and awj in its ascending form.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_bayyat?tuningSystem=meshshaqa_1899&startingNote=yegah&pitchClassDataType=centsmaqām ḥijāz - maqam_hijaz
Description: A principle Arabic maqām, known primarily for its use in the adhān, the call to prayer. Includes the zalzalian interval awj in its ascending form.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_hijaz?tuningSystem=alsabbagh_1954&startingNote=rast&pitchClassDataType=centsComplex and transposed maqāmāt:
rāḥat al-arwāḥ - maqam_rahat_al-arwah
Description: A transposition of maqām huzām given its own name because of its character. Its darajat al-istiqrār (tonic) is the zalzalian interval ʿirāq.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_rahat_al-arwah?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=centsmaqām bestenegar - maqam_bestenegar
Description: Complex and rarely used non-octave repeating maqam. Its darajat al-istiqrār (tonic) is the zalzalian interval segāh.
Tuning System: ibnsina_1037 on yegah, alfarabi_950g on ushayran, meshshaqa_1899 on yegah, or cairocongresstuningcommittee_1929 on rast.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_bestenegar?tuningSystem=alfarabi_950g&startingNote=ushayran&pitchClassDataType=centsMaqāmāt without zalzalian intervals:
maqām kurd - maqam_kurd
Description: This maqām came to much prominence in 1960s and 70s Egyptian popular music, and is one of the most used in pop music across the region today. It doesn't include the quintessential so-called Arabic "quarter tone", i.e. pitch classes ʿirāq, nīm zīrgūleh, segāh, nīm ḥijāz, or awj.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_kurd?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsmaqām āthār kurd - maqam_athar-kurd
Description: A rarely used maqām with a very specific character. It doesn't include the quintessential so-called Arabic "quarter tone", i.e. pitch classes ʿirāq, nīm zīrgūleh, segāh, nīm ḥijāz, or awj.
Tuning System: alkindi_874 on ushayran.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_athar-kurd?tuningSystem=alkindi_874&startingNote=ushayran&pitchClassDataType=centsmaqām dilkesh ḥūrān - maqam_dilkesh-huran
Description: A complex non-octave repeating Ottoman maqām that is rarely used in Arabic music but was a part of early 20th century music theory.
Tuning System: ibnsina_1037 on yegah or meshshaqa_1899 on yegah.
Source: (No source references in data)
Example:
GET /api/maqamat/maqam_dilkesh-huran?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=centsRepresentative Usage Patterns
Basic Detail Request
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents"With All Optional Parameters
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents&includeArabic=true&includeIntervals=true&includeModulations=true&includeModulations8vb=true&includeSuyur=true"Parameter Discovery
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&options=true"Comparison Across Tuning Systems
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast/compare?tuningSystems=ibnsina_1037,alfarabi_950g&startingNote=yegah&pitchClassDataType=cents"Transposition
curl "https://diarmaqar.netlify.app/api/maqamat/maqam_rast?tuningSystem=ibnsina_1037&startingNote=yegah&pitchClassDataType=cents&transposeTo=nawa"Testing Combinations
Test Basic Coverage
- Tuning:
ibnsina_1037onyegah - Maqām:
maqam_rast - Jins:
jins_rast - Format:
cents
Test Zalzalian Intervals
- Tuning:
alfarabi_950gonushayran - Ajnās:
jins_rast,jins_bayyat,jins_segah,jins_saba
Test Non-Zalzalian Systems
- Tuning:
alkindi_874onushayran - Ajnās:
jins_kurd,jins_nahawand,jins_nikriz
Test Modern Equal Divisions
- Tuning:
meshshaqa_1899onyegah - Compare with:
ibnsina_1037to see equal vs. unequal
Test Complex Structures
- Maqām:
maqam_bestenegar(non-octave-repeating) - Maqām:
maqam_dilkesh-huran(Ottoman complexity)
Test Historical Documentation
- Tuning:
cairocongresstuningcommittee_1929onrast - Compare with:
alsabbagh_1954onrast
See Also
- API Documentation - Main API overview
- Interactive Playground - Test these examples interactively
- OpenAPI Specification - Complete parameter documentation