Complete array of available pitch classes in the tuning system
Array of all available ajnas (jins data objects) for modulation analysis
Array of all available maqamat (maqam data objects) for modulation analysis
The source maqam transposition to analyze modulations from
If true, analyze ajnas modulations; if false, analyze maqamat modulations
Tolerance in cents for pitch matching (default: 5)
Object containing all possible modulations organized by scale degree according to Al-Shawwā's rules
Modulation Analysis Using Al-Shawwā's Technique
This function implements the modulation algorithm based on Sāmī Al-Shawwā's 1946 work "Al-Qawāʿid al-Fannīya fī al-Mūsīqa al-Sharqīya wa al-Gharbīya" (The Artistic Principles of Eastern and Western Music). Al-Shawwā, a Cairo-born Aleppine violinist, provided unique guidelines for maqām modulation based on scale degree relationships within the Arab-Ottoman-Persian note naming framework.
Modulation Rules Implemented:
Tonic Correspondence: Modulation between maqāmāt sharing the same tonic (qarār), provided the tonic is classified as an "original" note (aṣlīya)
Third-Degree Modulation: Transition where the third degree of the source maqām becomes the tonic of the target, valid only when the third degree is classified as an "original" note
Alternative Third-Degree Modulation: If the standard third degree is invalid, Al-Shawwā permits using a niṣf (half-note)/two-parts (2p) scale degree immediately below it, provided that: a) It is the sixth pitch class from the fundamental (qarār) scale degree of the source maqām according to the 24-tone list b) It maintains a distance of two pitch classes from the preceding scale degree within the source maqām
Fourth and Fifth-Degree Modulation: Transitions using the fourth or fifth scale degrees of the source maqām as the tonic of the target
Sixth-Degree Modulation (No Third): When both the third degree and its alternative are invalid, modulation may occur through the sixth scale degree, provided it is the sixteenth or seventeenth pitch class from the tonic of the source maqām and remains an "original" scale degree
Sixth-Degree Modulation (Between Naturals): The sixth scale degree may also be used when it lies between two "natural" scale degrees within the source maqām