A data science approach to music
A data science approach to music
Classical Motifs is an interactive analytical tool that visualizes the structure of Sergei Rachmaninoff’s Prelude in C-sharp minor, Op. 3 No. 2, based on a specific performance recording. The application aligns a Duo-Art piano-roll transcription of the score with the audio recording using dynamic time warping and attack detection, producing a synchronized representation of 1,710 notes across twelve strings arranged by fifths and six octave rings. Each note is placed at its true register and timed to the recording, with a bead for every note in the score. The interface presents a series of interactive plates that users can drag to move through the music, and MOTIF buttons step through twenty occurrences of a recurring bell figure in the lowest voice. The tool derives its analytical data from two separate sources: the audio signal and the score. From the audio, it extracts loudness and attack times using a 2,048-point Fourier transform sliding at 23.44 frames per second across 5,974 windows, with attacks identified from spectral flux. From the score, it uses the transcribed note events. No pitch is inferred from the spectrum, so no phantom harmonies appear. Key analytical features include the identification of golden section proportions in the performance’s duration, the location of the most violent attack (largest single-frame spectral energy rise), and the measurement of pitch class distribution. The analysis shows that C-sharp occupies 29.3 percent of all sounding time, while the seven notes of the C-sharp minor scale account for 90.7 percent, and the five chromatic notes share the remainder. Shannon entropy calculations over ten-second windows average 2.606 bits, below the 2.807 bits of a pure C-sharp minor scale, indicating a harmony narrower than the scale itself. Typical use cases include music theory analysis, performance study, and educational exploration of structural elements such as golden ratios, loudness envelopes, and harmonic density. The tool is designed for users interested in the intersection of musicology and data visualization, offering a live, interactive environment where every plate responds to drag input. Technical requirements are minimal; the application runs in a web browser and does not require installation. The content is focused entirely on this single prelude and its specific performance, providing a detailed, data-driven examination of how the piece unfolds in time.