dna2abc is a Tcl/Tk application for turning DNA sequences into musical sequences. The core of the application is an editor for a list of rules. Each rule consists of a regular expression and a Tcl script. As dna2abc scans along the input DNA sequence, each rule is tested against a portion of the sequence, and, if the regular expression matches, the corresponding Tcl script is executed.
dna2abc requires Tcl 8.0 or later, and corresponding versions of the BLT and TkTable extensions. I recommend the newest version of Tcl available, to get the most powerful regular expression support. This distribution includes either a Windows or Linux executable created with the Tcl 8.3 version of FreeWrap. Alternatively, run the program by sourcing dna2abc.tcl in wish. There is documentation in lib-src/help/, and the *.tcl files in examples/ are sample dna2abc scripts. Most of the source is in lib-src/.
This version was tested with Tcl8.3.2, BLT2.4u, and TkTable2.6 under Windows and Linux.
The input file format is ASCII text, consisting of sequences of 'A', 'T', 'C', 'G', and 'N' (missing data) broken into lines of arbitrary length. Lines beginning with '>' are ignored as comments. The included file examples/in.dna is a portion of the human Y chromosome. (Actually, nothing in dna2abc assumes that the input is DNA. Nor do the scripts triggered by the rules have to include commands to generate music. dna2abc can be used to process any sort of sequential input file.)
The output format is ABC music (documentation on the ABC format is included in this release in the abcDocs/ directory). Linux and Windows executables for converting ABC to MIDI are included and can be invoked automatically. Note that dna2abc just generates the ABC and MIDI files, you'll need an external program to play them.
dna2abc is released under the GPL (see License.txt in the release). You're free to do pretty much anything with it except sell it or modify it without sharing your modifications.
Both distributions contain all the Tcl/Tk source, the documentation, and example files. Each distribution contains a FreeWrap executable for the corresponding operating system (that includes the BLT extension), the TkTable binaries for that OS, and a program to convert ABC to MIDI.
Just unpack the distribution in the directory of your choice, and either run the included FreeWrap'd executable, or source dna2abc.tcl in wish. The program assumes that it will find the lib-* directories in the same directory as the executable.
These text files comprise the documentation, they are included in the releases (and available from the Help menu in the program).