% abstract, choose between abstract and summary
This study presents a novel method for mapping music scales in two dimensions, incorporating microtones, using a self-organizing map. Modulation, key to shaping emotional experience, relies on interval similarities in Iranian music’s Radif. This research systematically explores key and Gushe relationships, considering microtonal variations and the Shahed note as an emotional anchor.

The self organazing map algorithm was utilized to cluster eight distinct interval patterns spanning both Western and Persian musical theories based on variations in tonic and dominant notes, along with their microtones states. A total of 1,176 musical scale states were systematically generated and clustered, incorporating semi-tonic and microtonic variations. The training of self organizing map ensured both the representation of known scales and the emergence of new, previously unexplored patterns. Quantitative metrics such as quantization error, topographic error, and reconstruction percentage were employed to evaluate the clustering results, achieving high accuracy and retaining 100\% of the original data in the final map.

A key application of the generated map is to provide smooth modulation pathways between musical scales, allowing for gradual transitions that remain imperceptible to the listener. Using Bresenham's Algorithm, modulation pathways were optimized for computational efficiency while ensuring an intuitive auditory experience. To further enhance user understanding, a melody generator was developed using Python's Mido library, which translates these modulation pathways into audible transitions, leveraging quarter-tone adjustments and note-centric weighting.

The evaluation process included both quantitative and qualitative methods. Quantitative analysis measured the smoothness of modulation using average step differences and hit/miss rates for predicted modulation pathways, yielding an 83\% hit rate. Qualitative assessments involved a user survey with 72 participants, who rated 28 generated melodies based on their perceived mood continuity. The results confirmed the system's ability to propose modulation pathways that align with traditional practices while introducing innovative transitions.

This research demonstrates the potential of self organizing map for uncovering new pathways in musical modulation, bridging the gap between traditional and algorithmic approaches, and providing valuable tools for composers exploring nuanced emotional shifts in their work.