index.html ?> Ramid II: Score output for ramid.py

Ramid II

music notation output for the ramid.py melody composer
version 2.0
 

At the 2009 Music Hack Day Boston, I wrote ramid.py, which composes melodies and outputs MIDI files.  For the 2010 Hack Day I added PDF score output using Abjad, a Python library built on the LilyPond music notation system.

Links

Some ramid.py melodies (mp3, 850K)

PyraQuant, the C language predecessor to ramid.py, composed this short piece (mp3, 380K).

Ramid II composed:

Gnossienne_nr_404.mid / Gnossienne_nr_404.pdf, and

ramid_ii_qiyBEMYJ9.mid / ramid_ii_qiyBEMYJ9.pdf (bouncier).

Here's the theory of how these programs compose melodies.

Ramid II code

spianostaff.py has the class that paints a single melody across the treble/bass clef piano staff.

ramid_ii.py composes a melody and outputs MIDI (via pythonmidi) and/or PDF (via spianostaff, Abjad and LilyPond).

Tools, Platforms and APIs Used

Abjad -- Python API for building LilyPond scores.

LilyPond -- Music notation rendering system.

pythonmidi -- Max M's midi library is used in the original ramid.py and in Ramid II.  LilyPond can produce midi output but ramid*.py adds expression to the midi that's not in the score.

"a very interesting text file", "bar.txt" => "less interesting" ); $subst_url = array( "wander7out.gz" => "http://www.mac-guyver.com/math-fun/wander/wander7out.gz", "wandersweep.mp3" => "http://www.mac-guyver.com/math-fun/wander/wandersweep.mp3" ); echo "\n"; exec( "# /bin/ls -ld Makefile *.jpg *.mp3*.txt *.gz *.c *.tgz", $lines ); foreach( $lines as $line ) { echo "\n"; $parts=explode( " ", $line ); foreach( $parts as $path ) { } ; // Empty loop leaves path as last part $pieces=explode( "/", $path ); foreach( $pieces as $file ) { } ; // Empty loop leaves file as last part $size=ceil( filesize($file) / 1024 ); echo '\n"; if( isset( $cmt[$file] ) ) { echo "\n"; } echo "\n\n"; } echo "
'; if( isset( $subst_url[$file] ) ) $url = $subst_url[ $file ]; else $url = $file; if( $line[0]=="d" ) { echo "$file/"; } else { echo "$file (${size}K)"; } echo "$cmt[$file]
\n"; ?>

This page was made with a php script. Last change
--Steve Witham Up to my home page.