index.html ?>
![]() |
Ramid IImusic notation output for the ramid.py melody composerversion 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.
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.
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).
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 "';
if( isset( $subst_url[$file] ) ) $url = $subst_url[ $file ];
else $url = $file;
if( $line[0]=="d" ) {
echo "$file/ ";
} else {
echo "$file (${size}K) ";
}
echo " | \n";
if( isset( $cmt[$file] ) ) {
echo "$cmt[$file] | \n"; } echo "
This page was made with a
php script.
Last change
--Steve Witham
Up to my home page.