PyOracle is a project using Python to analyze aspects of musical structure. Audio Oracle, an algorithm based on the Factor Oracle string matching algorithm, is used to detect introductions and repetitions of musical materials. Through this analysis, aspects of musical structure can be understood, and new versions of the analyzed work can be created.
This demonstration uses PyOracle embedded in a Max/MSP patch to perform real-time machine improvisation on an input signal.
Here are some recombinations of existing music made using my PyOracle Python module. PyOracle performs an Audio Oracle analysis, which determines connections and repetitions between segments of audio. For more info, you can check out the page here.
Here’s the Oracle structure for the Bach solo cello work used below:
Each arc in the image indicates similarity between two segments of audio. The similarities make it possible to jump along an arc, rather than continuing linearly, and create a new ordering of the musical material – while maintaining smooth transitions between segments. During recombination, the algorithm walks through this oracle structure, and occasionally jumps either forward or backward along an arc.
Each file indicates a jump number, which gives a probability that, at a given point, playback will jump along an oracle transition rather than continue in a linear fashion. As the percentage increases, the output will consist of increasingly longer segments of the input.