Main Idea

Western Music is composed of the same fundamental building blocks i.e. notes. However Renaissance, Baroque, Classical, Romantic or Modern periods of music all have their own set of acceptable rules and techniques for arranging those building blocks. A Bach's piece indeed sounds very different than Schoenberg's. This hack tries to alter the compositional boundaries between these periods. We have translated the rules of composition (specifically Schoenberg's 12-tone technique has no title attribute.) to code and wrote a program to change the rules of musics of older periods, leaving the building blocks alone.

Musical Explaination

We basically preserve the rhythm of an older musical piece and then change the pitches according to the rules of Schoenberg's 12-tone Serialism. We'll quote wikipedia:


  • The row is a specific ordering of all twelve notes of the chromatic scale (without regard to octave placement). No note is repeated within the row.
  • The row may be subjected to interval-preserving transformations -- that is, it may appear in inversion denoted I), retrograde (R), or retrograde-inversion (RI), in addition to its "original" or prime form (P).

How This Is Implemented

We form the basis by choosing a random permutation of twelve notes of the chromatic scale, and then generate a 12-tone matrix based on that row and then fill up pitches of the older music with these rows. Using something like 12-tone matrix automatically relies heavily on interval-preserving transformations. The order of the pitches within a row is pre-determined, but the order of the transformations and rows are not, we'll be choosing them randomly. The beauty of this technique is that the outcome is not a dissonant noise but a valid classical piece!!

Computer Stuff

We use music21 toolkit to generate 12 tone matrix. We do audiveris for optical music recognition of old musical pieces and musescore to sequence them. The rest of the implementation however, we had to do from scratch!

Sample Music Files

Notice that the Atonalized versions of Mozart's Turkish March and the Batuque share the same form(!).

Sample Sheet Music

Image of Mozart with sunglasses has been taken from here

Built With

Share this project: