Date: Fri, 26 Jun 2009 14:21:46 -0700 (PDT)
Subject: [Csnd] Score Alignment Utility
I'm not a fan of typing down-left-space over and over after changing a single
Csound score pfield. Some time ago, I wrote a Perl script that
auto-magically does the work for me. I formally started learning Python over
the weekend, and decided to port my favorite and most used Perl script, whle
making a few improvements on the way. I figure this might be useful for
others, so here it is:
scoref.zip
Here's an example score that displays the unaligned code alongside various
alignments using the command-line options:
As for the bigger picture. Scripts that refactor Csound code can be
incorporated with existing text editors. For example, I use jedit. Jedit
supports java plugins and beanshell macros. Though I haven't done this yet,
my research leads me to believe that I will be able to create a macro that
aligns any highlighted code at the stroke of a key combo, without having to
make modifications scorerefactor.py.
In fact, I think I would only have to create a basic beanshell script that
would be able to run several command-line scripts. Another example of a
potentially useful script is a script that shifts the start times of a large
section of score code (I have a perl script for this as well). These
scripts, along with scripts developed by others could be loosely integrated
into other editors. Perhaps QuteSound?
Food for thought, anyways.
Best,
Jake