Index of /~dst/DeCSS/Gallery/Castleman

      Name                    Last modified       Size  Description

[DIR] Parent Directory 04-Jan-2003 01:19 - [   ] COPYING 06-Mar-2001 05:18 18k [   ] cmidi.jar 06-Mar-2001 03:13 6k [SND] css_descramble.mid 06-Mar-2001 03:05 77k [DIR] src/ 08-Mar-2001 14:17 -

Java Application to convert text to MIDI and back again. This requires
Java 1.1 or better (Java 1.2+ recommended).

The basic principle is to take a textfile and take the ASCII values of the
characters as MIDI notes. Both are in the range 1..127, so this is
possible. However, C files have a lot of whitespace in them, which would
not be fun to listen to. So, rather than indicate whitespace as a note of
its own, we vary the length of the note. A normal character is a 32nd
note, a character preceeded by a space is a 16th note, and a character
preceeded by a newline is an 8th note.

Copyright 2001 Michael Castleman, <mlc67@columbia.edu>. See file COPYING
for details.

To run under Java 1.2 or better:
--------------------------------

To convert a C file to a MIDI:
$ java -cp cmidi.jar CMidi file.c output.mid

To convert the output MIDI back to C:
$ java -cp cmidi.jar MidiC output.mid file.c

To rebuild, if you don't trust my binary (make sure JDK binaries are in
your PATH):
$ cd src ; make

To run under Java 1.1:
----------------------

To convert a C file to a MIDI:
$ java -classpath cmidi.jar:/path/to/jdk/lib/classes.zip CMidi file.c output.mid

To convert the output MIDI back to C:
$ java -classpath cmidi.jar:/path/to/jdk/lib/classes.zip MidiC output.mid file.c