Authors: Oriol Colomé i Font & Satyajeet Prabhu
Affiliation: SMC 2023-24. Universitat Pompeu Fabra.
This repository contains the original code and analysis for exploring motif development in ṭab' Iraq-al-ayam, as described in our research paper. The analysis focuses on identifying and tracking musical motifs across different pieces in the Arab-Andalusian tradition.
scores/
: Contains MusicXML files of the analyzed pieces- Includes various forms: Btayhi, Quddam, and Bassit in Iraq-Ajam
- Color-annotated scores showing identified motifs
plots/
: Generated visualizations of motif analysispaper/
: Research paper and related materialsnotebook.ipynb
: Main analysis notebook
- Clone this repository:
git clone https://github.com/yourusername/arab-andal-motif-dev.git
cd arab-andal-motif-dev
- Create and activate a virtual environment (recommended):
# Using venv (Python 3.8 or higher recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install all dependencies:
# Install all required packages
pip install -r requirements.txt
For development work, additional tools are automatically configured for code quality:
- Install pre-commit hooks:
pre-commit install
-
The following quality checks will run automatically on commit:
- Code formatting (black)
- Import sorting (isort)
- Linting (flake8)
- Type checking (mypy)
- Basic file checks (trailing whitespace, YAML validity)
-
Run quality checks manually:
# Run all pre-commit hooks
pre-commit run --all-files
# Run tests with coverage
pytest tests/ --cov=src/ --cov-report=term-missing
# Format code
black src tests examples
requirements.txt
: Python package dependenciessetup.cfg
: Configuration for pytest, flake8, mypy, and other tools.pre-commit-config.yaml
: Pre-commit hooks configuration.github/workflows/tests.yml
: CI pipeline configuration
For the best development experience:
- Configure your IDE to use the project's virtual environment
- Enable format-on-save with black (line length: 88)
- Enable import sorting with isort
- Enable flake8 linting
- Enable mypy type checking
- Open
notebook.ipynb
in Jupyter Notebook or JupyterLab - The notebook is structured to analyze MusicXML scores from the
scores
folder - Generated plots will be saved to the
plots
folder - Color-annotated scores can be viewed using Musescore or similar music score editors
The analysis pipeline includes:
- Score parsing using music21
- Motif identification through pattern matching
- Visualization of motif development
- Color annotation of identified patterns
The plots and annotated scores demonstrate the systematic development of motifs across different pieces in the ṭab' Iraq-al-ayam tradition. Refer to the research paper for detailed interpretation of results.
Below is an example of motif analysis in Quddam Iraq-Ajam Lasamir:
This visualization shows the identified motifs and their development throughout the piece.
For questions or collaborations, please contact:
- Oriol Colomé i Font: [email protected]
- Satyajeet Prabhu: [email protected]
This project is licensed under the terms included in the LICENSE file.