mendel
is a Python library that can turn any DNA sequence into a musical composition.
mendel
uses arbitrary mappings from k-mers of varying length in a sequence, along with density-based MinHash, to create melodic, and vaguely musical, pieces of music from input sequence data. The idea originated from Song from π! by David Macdonald which was composed in a similar manner (but for the digits of π).
mendel
currently outputs a a three-part piece: A drums section (optional), a rhythm section (chords), and a melody section (monophonic). It is currently very much open for any suggestions for improvement, as the musical pieces it outputs are seemingly random, but because of arbitrary musical choices, it's sort of pleasing to the ear.
Music-Code, and any requirements within, along with a working Python environment, are required.
mendel
takes a single FASTA/FASTQ input, and requires the user to specify a k-mer length and an output prefix.
A single (.wav) file will be generated in the directory, prefixed by the input prefix.
mendel
is freely available under the MIT License.
I'm actively looking for any suggestions for improvement! Feel free to contact me at baris [at] mit [dot] edu, or make a pull request.