SciTE for running Csound and a couple other notes

I actually have something positive to write today instead of complaining all the time.

Even though it takes a little doing, the SciTE (Scintilla Text Editor) tool has been a very useful way for me to experiment with Csound compositions. However, it only works right on “.csd” files. So here’s what I’ve been doing to audition a lot of the sample files out of the various Csound distribution directories.

First you have to get SciTE and install it. The default installation has Csound as one of the languages that it understands. You can find it at: http://scintilla.sourceforge.net/SciTE.html

1. If the Csound piece is current in a pair of .orc and .sco files, I convert them to .csd. There are several ways to do this. One is to use the utility that comes with Csound called makecsd (of all things.) Its use is described in the Csound manual.

You can also easily do the conversion in any text editor, but an easier way is to use Flavio Tordini’s old Csound Editor http://flavio.tordini.org/csound-editor. When you open up a .sco or .orc file, it will locate the corresponding other file if it’s in the same directory. Then you can use a menu option to convert it to .csd and save it. (Note that Tordini has not updated this for a long time, but since people still find it useful, he graciously continues to make it available.)

You can actually run Csound from the Csound editor (and do many other things too) but for the time being I’m not using it. I like the syntax coloring, dual window and most of all line number features of SciTE.

2. Open the .csd file in SciTE. Under the Tools menu there will be a “Go” option. This will run the Csound program and put the log output in a pane to the right. Between the <CsOptions> and </CsOptions> tags in the the .csd you can put Csound options, which you may want to do to customize your situation or the level of message reporting. For instance, per the Csound manual:

-m NUM, --messagelevel=NUM
Message level for standard (terminal) output.
Takes the sum of any of the following values:
  • 1 = note amplitude messages
  • 2 = samples out of range message
  • 4 = warning messages
  • 128 = print benchmark information
And exactly one of these to select note amplitude format:
  • 0 = raw amplitudes, no colours
  • 32 = dB, no colors
  • 64 = dB, out of range highlighted with red
  • 96 = dB, all colors
  • 256 = raw, out of range highlighted with red
  • 512 = raw, all colours

The default is 135 (128+4+2+1), which means all messages, raw amplitude values, and printing elapsed time at the end of performance.

So you can see that you can add a –messagelevel=nnn option to tailor the messages as desired.
The other thing that’s worth looking into is some of the newer score operations. With these, you can mark sections of the score for repeats without having to laboriously cut and paste the same section over and over again. With the macro capability, you can even have sections which are mainly similar but possibly differ in some parameter(s). And there is a score repeat marker which provides an incrementing variable for each pass through the repeating section which you can use elsewhere in your orchestra.
These features are nice to know about and can simplify the use of complex scores. Of course, advanced users will probably use other tools and/or MIDI functions to generate event lists, but for beginners and intermediate folks, doing everything using Csound’s own tools has its attraction.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: